mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
ctdb-tools: Drop "ctdb natgwlist"
The new individual status options are better. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
cc3e9a651d
commit
d12858aa5b
@ -466,30 +466,6 @@ Duration of last recovery/failover: 2.248552 seconds
|
||||
</refsect3>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>natgwlist</title>
|
||||
<para>
|
||||
Show the current NAT gateway master and the status of all
|
||||
nodes in the current NAT gateway group. See the
|
||||
<citetitle>NAT GATEWAY</citetitle> section in
|
||||
<citerefentry><refentrytitle>ctdb</refentrytitle>
|
||||
<manvolnum>7</manvolnum></citerefentry> for more details.
|
||||
</para>
|
||||
|
||||
<refsect3>
|
||||
<title>Example</title>
|
||||
<screen>
|
||||
# ctdb natgwlist
|
||||
0 192.168.2.200
|
||||
Number of nodes:4
|
||||
pnn:0 192.168.2.200 OK (THIS NODE)
|
||||
pnn:1 192.168.2.201 OK
|
||||
pnn:2 192.168.2.202 OK
|
||||
pnn:3 192.168.2.203 OK
|
||||
</screen>
|
||||
</refsect3>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>natgw {master|list|status}</title>
|
||||
<para>
|
||||
|
@ -1148,31 +1148,6 @@ static int control_nodestatus(struct ctdb_context *ctdb, int argc, const char **
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
display the list of nodes belonging to this natgw configuration
|
||||
*/
|
||||
static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
{
|
||||
static char prog[PATH_MAX+1] = "";
|
||||
|
||||
if (argc != 0) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if (!ctdb_set_helper("NAT gateway helper", prog, sizeof(prog),
|
||||
"CTDB_NATGW_HELPER", CTDB_HELPER_BINDIR,
|
||||
"ctdb_natgw")) {
|
||||
DEBUG(DEBUG_ERR, ("Unable to set NAT gateway helper\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
execl(prog, prog, "natgwlist", NULL);
|
||||
|
||||
DEBUG(DEBUG_ERR,
|
||||
("Unable to run NAT gateway helper %s\n", strerror(errno)));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Display NAT gateway status */
|
||||
static int control_natgw(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
{
|
||||
@ -5858,7 +5833,6 @@ static const struct {
|
||||
{ "scriptstatus", control_scriptstatus, true, false, "show the status of the monitoring scripts (or all scripts)", "[all]"},
|
||||
{ "enablescript", control_enablescript, true, false, "enable an eventscript", "<script>"},
|
||||
{ "disablescript", control_disablescript, true, false, "disable an eventscript", "<script>"},
|
||||
{ "natgwlist", control_natgwlist, false, true, "show the nodes belonging to this natgw configuration"},
|
||||
{ "natgw", control_natgw, false, true, "show NAT gateway configuration ", "[master|list|status]"},
|
||||
{ "xpnn", control_xpnn, false, true, "find the pnn of the local node without talking to the daemon (unreliable)" },
|
||||
{ "getreclock", control_getreclock, true, false, "Show the reclock file of a node"},
|
||||
|
@ -23,7 +23,6 @@ $0 <option>
|
||||
master Display node number and private IP address of master node
|
||||
list List private IP addresses of nodes in group, annotate master
|
||||
status Show status of nodes in NAT gateway group
|
||||
natgwlist Combination of "master" and "status", for backward compatiblity
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
@ -171,22 +170,6 @@ $nodestatus
|
||||
EOF
|
||||
}
|
||||
|
||||
# For backward compatibility
|
||||
natgwlist ()
|
||||
{
|
||||
_ret=0
|
||||
find_master
|
||||
if [ $? -eq 2 ] ; then
|
||||
echo "-1 0.0.0.0"
|
||||
_ret=2
|
||||
fi
|
||||
_t=$(nodes_status) || return $?
|
||||
_n=$(echo "$_t" | wc -l)
|
||||
echo "Number of nodes:${_n}"
|
||||
echo "$_t"
|
||||
return $_ret
|
||||
}
|
||||
|
||||
prog=$(basename "$0")
|
||||
cmd="$1"
|
||||
|
||||
@ -194,6 +177,5 @@ case "$cmd" in
|
||||
master) find_master ;;
|
||||
list) nodes_list ;;
|
||||
status) nodes_status ;;
|
||||
natgwlist) natgwlist ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user