net: Remove "net serverid list"
authorVolker Lendecke <vl@samba.org>
Sun, 5 Nov 2017 11:09:08 +0000 (12:09 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 4 Dec 2017 23:56:12 +0000 (00:56 +0100)
Traversing a clustered tdb is a pretty expensive operation. If someone
really needs this command-line interface, we can re-add it for the local
node using messaging_dgm_forall. If someone needs that globally, there's
the "onnode all" script that could be used. Alternatively, we could
implement an enhanced ping broadcast message also returning a processes
unique id.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/net_serverid.c

index 0fc7a0118d2dd84b6764d7b23699a633798a2de3..c826f95cc0dae26d2c7f80a8beed70c3cf33c49c 100644 (file)
 #include "util_tdb.h"
 #include "librpc/gen_ndr/ndr_open_files.h"
 
-static int net_serverid_list_fn(const struct server_id *id,
-                               uint32_t msg_flags, void *priv)
-{
-       struct server_id_buf idbuf;
-       d_printf("%s %llu 0x%x\n", server_id_str_buf(*id, &idbuf),
-                (unsigned long long)id->unique_id,
-                (unsigned int)msg_flags);
-       return 0;
-}
-
-static int net_serverid_list(struct net_context *c, int argc,
-                            const char **argv)
-{
-       d_printf("pid unique_id msg_flags\n");
-       return serverid_traverse_read(net_serverid_list_fn, NULL) ? 0 : -1;
-}
-
 struct wipedbs_record_marker {
        struct wipedbs_record_marker *prev, *next;
        TDB_DATA key, val;
@@ -671,14 +654,6 @@ static int net_serverid_exists(struct net_context *c, int argc,
 int net_serverid(struct net_context *c, int argc, const char **argv)
 {
        struct functable func[] = {
-               {
-                       "list",
-                       net_serverid_list,
-                       NET_TRANSPORT_LOCAL,
-                       N_("List all entries from serverid.tdb"),
-                       N_("net serverid list\n"
-                          "    List all entries from serverid.tdb")
-               },
                {
                        "wipedbs",
                        net_serverid_wipedbs,