ctdb-tools: Drop "ctdb natgwlist"
authorMartin Schwenke <martin@meltin.net>
Mon, 18 Apr 2016 07:13:38 +0000 (17:13 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Apr 2016 05:10:15 +0000 (07:10 +0200)
The new individual status options are better.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/doc/ctdb.1.xml
ctdb/tools/ctdb.c
ctdb/tools/ctdb_natgw

index fb7c468402d40c0bbe86ab32b18c5518290f8cbd..12ead0064861e1173f105d67ebb4903ef446a249 100644 (file)
@@ -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>
index f04adb122b1e6b848f6fb7a7a86d3b3171d40064..8d1feec9f064f8f5e4a5ad57d745e11647f70fc3 100644 (file)
@@ -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"},
index 2ed168df8a5ad36f9af48db0981a5520ccee7c47..a7238d0292013c07455ba09457b2bd0310f5b919 100755 (executable)
@@ -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