From 2dfabd85d95fcb2b22112eb86c9dedd356c8590f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 5 Nov 2017 12:09:08 +0100 Subject: [PATCH] net: Remove "net serverid list" 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 Reviewed-by: Jeremy Allison --- source3/utils/net_serverid.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/source3/utils/net_serverid.c b/source3/utils/net_serverid.c index 0fc7a0118d2..c826f95cc0d 100644 --- a/source3/utils/net_serverid.c +++ b/source3/utils/net_serverid.c @@ -29,23 +29,6 @@ #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, -- 2.47.3