mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-tools: Drop check_srvids command from ctdb tool
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
0f424a1188
commit
31c2d0af04
@ -1834,25 +1834,6 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>check_srvids <parameter>SRVID</parameter> ...</title>
|
||||
<para>
|
||||
This command checks whether a set of srvid message ports are
|
||||
registered on the node or not. The command takes a list of
|
||||
values to check.
|
||||
</para>
|
||||
<refsect3>
|
||||
<title>Example</title>
|
||||
<screen>
|
||||
# ctdb check_srvids 1 2 3 14765
|
||||
Server id 0:1 does not exist
|
||||
Server id 0:2 does not exist
|
||||
Server id 0:3 does not exist
|
||||
Server id 0:14765 exists
|
||||
</screen>
|
||||
</refsect3>
|
||||
</refsect2>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<!-- UNDOCUMENTED: showban stats disablemonitor enablemonitor
|
||||
|
@ -3381,44 +3381,6 @@ static int control_deltickle(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int control_check_srvids(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
int argc, const char **argv)
|
||||
{
|
||||
uint64_t *srvid;
|
||||
uint8_t *result;
|
||||
int ret, i;
|
||||
|
||||
if (argc == 0) {
|
||||
usage("check_srvids");
|
||||
}
|
||||
|
||||
srvid = talloc_array(mem_ctx, uint64_t, argc);
|
||||
if (srvid == NULL) {
|
||||
fprintf(stderr, "Memory allocation error\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i=0; i<argc; i++) {
|
||||
srvid[i] = strtoull(argv[i], NULL, 0);
|
||||
}
|
||||
|
||||
ret = ctdb_ctrl_check_srvids(mem_ctx, ctdb->ev, ctdb->client,
|
||||
ctdb->cmd_pnn, TIMEOUT(), srvid, argc,
|
||||
&result);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Failed to check srvids on node %u\n",
|
||||
ctdb->cmd_pnn);
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i=0; i<argc; i++) {
|
||||
printf("SRVID 0x%" PRIx64 " %s\n", srvid[i],
|
||||
(result[i] ? "exists" : "does not exist"));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int control_listnodes(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
int argc, const char **argv)
|
||||
{
|
||||
@ -6067,8 +6029,6 @@ static const struct ctdb_cmd {
|
||||
"add a tickle", "<ip>:<port> <ip>:<port>" },
|
||||
{ "deltickle", control_deltickle, false, true,
|
||||
"delete a tickle", "<ip>:<port> <ip>:<port>" },
|
||||
{ "check_srvids", control_check_srvids, false, true,
|
||||
"check if srvid is registered", "<id> [<id> ...]" },
|
||||
{ "listnodes", control_listnodes, true, true,
|
||||
"list nodes in the cluster", NULL },
|
||||
{ "reloadnodes", control_reloadnodes, false, false,
|
||||
|
Loading…
Reference in New Issue
Block a user