]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-daemon: Drop --lvs option and support for CTDB_CAP_LVS
authorMartin Schwenke <martin@meltin.net>
Sun, 10 Apr 2016 22:10:23 +0000 (08:10 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 15 Apr 2016 07:35:51 +0000 (09:35 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Apr 15 09:35:51 CEST 2016 on sn-devel-144

ctdb/doc/ctdb.1.xml
ctdb/doc/ctdbd.1.xml
ctdb/protocol/protocol.h
ctdb/server/ctdbd.c
ctdb/tests/src/ctdb_test_stubs.c
ctdb/tests/tool/stubby.getcapabilities.001.sh
ctdb/tests/tool/stubby.getcapabilities.002.sh
ctdb/tests/tool/stubby.getcapabilities.004.sh
ctdb/tools/ctdb.c

index 20dcba09e08e152eb0a650c44eb18be2e724d393..7cab96f52ffd91667e1fff83f641cc48d972daa3 100644 (file)
@@ -800,7 +800,6 @@ pnn:3 10.0.0.14        OK
       <screen>
 RECMASTER: YES
 LMASTER: YES
-LVS: NO
       </screen>
 
     </refsect2>
index cf792135ccebef48dcc06693983a7153de38ddb5..0f75f77a5df44828019eb692e34524c9e055db11 100644 (file)
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>--lvs</term>
-       <listitem>
-         <para>
-           This option is used to activate the LVS capability on a CTDB
-           node.  Please see the <citetitle>LVS</citetitle> section in
-           <citerefentry><refentrytitle>ctdb</refentrytitle>
-           <manvolnum>7</manvolnum></citerefentry> for more
-           information.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
        <listitem>
index 9c112df6be7b7ab006ccf75294fd7b4d9ae59bf8..e3ac7214bd6e51ca686ccd2667d2ee0d2bd9c9e6 100644 (file)
@@ -711,8 +711,7 @@ struct ctdb_public_ip_list {
  */
 #define CTDB_CAP_RECMASTER             0x00000001
 #define CTDB_CAP_LMASTER               0x00000002
-/* This capability is set if CTDB_LVS_PUBLIC_IP is set */
-#define CTDB_CAP_LVS                   0x00000004
+#define CTDB_CAP_LVS                   0x00000004 /* obsolete */
 #define CTDB_CAP_NATGW                 0x00000008 /* obsolete */
 
 /*
index 1565eae6059c09efdb05daed883a090dca2c8006..6d8a7d4becad66186803d5c029343bb8bb5c3ce5 100644 (file)
@@ -59,7 +59,6 @@ static struct {
        int         start_as_stopped;
        int         no_lmaster;
        int         no_recmaster;
-       int         lvs;
        int         script_log_level;
        int         no_publicipcheck;
        int         max_persistent_check_errors;
@@ -138,7 +137,6 @@ int main(int argc, const char *argv[])
                { "start-as-stopped", 0, POPT_ARG_NONE, &options.start_as_stopped, 0, "Node starts in stopped state", NULL },
                { "no-lmaster", 0, POPT_ARG_NONE, &options.no_lmaster, 0, "disable lmaster role on this node", NULL },
                { "no-recmaster", 0, POPT_ARG_NONE, &options.no_recmaster, 0, "disable recmaster role on this node", NULL },
-               { "lvs", 0, POPT_ARG_NONE, &options.lvs, 0, "lvs is enabled on this node", NULL },
                { "script-log-level", 0, POPT_ARG_INT, &options.script_log_level, 0, "log level of event script output", NULL },
                { "nopublicipcheck", 0, POPT_ARG_NONE, &options.no_publicipcheck, 0, "don't check we have/don't have the correct public ip addresses", NULL },
                { "max-persistent-check-errors", 0, POPT_ARG_INT,
@@ -236,9 +234,6 @@ int main(int argc, const char *argv[])
        if (options.no_recmaster != 0) {
                ctdb->capabilities &= ~CTDB_CAP_RECMASTER;
        }
-       if (options.lvs != 0) {
-               ctdb->capabilities |= CTDB_CAP_LVS;
-       }
 
        /* Initialise this node's PNN to the unknown value.  This will
         * be set to the correct value by either ctdb_add_node() as
index 83ba3987d01727328359eb580fc21bb5a8095e77..8ed2840d458aa7a0b4ffb381395beb74922bc1e7 100644 (file)
@@ -29,8 +29,7 @@ static struct ctdb_node_capabilities *global_caps = NULL;
  * By default, capablities for each node are
  * CTDB_CAP_RECMASTER|CTDB_CAP_LMASTER.  These 2
  * capabilities can be faked off by adding, for example,
- * -CTDB_CAP_RECMASTER.  LVS can be faked on by adding
- * CTDB_CAP_LVS.
+ * -CTDB_CAP_RECMASTER.
  */
 
 /* A fake flag that is only supported by some functions */
@@ -102,8 +101,6 @@ static void ctdb_test_stubs_read_nodemap(struct ctdb_context *ctdb)
                                capabilities &= ~CTDB_CAP_RECMASTER;
                        } else if (strcmp(tok, "-CTDB_CAP_LMASTER") == 0) {
                                capabilities &= ~CTDB_CAP_LMASTER;
-                       } else if (strcmp(tok, "CTDB_CAP_LVS") == 0) {
-                               capabilities |= CTDB_CAP_LVS;
                        } else if (strcmp(tok, "TIMEOUT") == 0) {
                                /* This can be done with just a flag
                                 * value but it is probably clearer
index e89f7a015f807f2d2bdc203d5979f07285301be3..e924d5ad2fb68a32c898f7ce8443e3413e052497 100755 (executable)
@@ -7,7 +7,6 @@ define_test "3 nodes, all ok"
 required_result 0 <<EOF
 RECMASTER: YES
 LMASTER: YES
-LVS: NO
 EOF
 
 simple_test <<EOF
index 112a912fd045ad914ddba671c6e6489966e6f44d..9a5d9803355dbb70f7de5f37bcdd13b655cc7b75 100755 (executable)
@@ -7,7 +7,6 @@ define_test "3 nodes, 1 disconnected"
 required_result 0 <<EOF
 RECMASTER: YES
 LMASTER: YES
-LVS: NO
 EOF
 
 simple_test <<EOF
index 4412883d4f1a59609e2ec0d390b9590dfeb4d375..077b34eccebb2443e6764518323b5a3512db31e1 100755 (executable)
@@ -8,7 +8,7 @@ set -e
 
 input="\
 NODEMAP
-0       192.168.20.41   0x0     CURRENT RECMASTER CTDB_CAP_LVS
+0       192.168.20.41   0x0     CURRENT RECMASTER
 1       192.168.20.42   0x0    -CTDB_CAP_LMASTER
 2       192.168.20.43   0x0    -CTDB_CAP_RECMASTER
 
@@ -26,7 +26,6 @@ VNNMAP
 required_result 0 <<EOF
 RECMASTER: YES
 LMASTER: YES
-LVS: YES
 EOF
 
 simple_test -n 0 <<EOF
@@ -36,7 +35,6 @@ EOF
 required_result 0 <<EOF
 RECMASTER: YES
 LMASTER: NO
-LVS: NO
 EOF
 
 simple_test -n 1 <<EOF
@@ -46,7 +44,6 @@ EOF
 required_result 0 <<EOF
 RECMASTER: NO
 LMASTER: YES
-LVS: NO
 EOF
 
 simple_test -n 2 <<EOF
index b4816adfb45018ea2ecad4842a148f40cac71ae7..84d8132fdcc6f5a7b9ef851db3db3c94cad7adb1 100644 (file)
@@ -3107,13 +3107,11 @@ static int control_getcapabilities(struct ctdb_context *ctdb, int argc, const ch
        if (!options.machinereadable){
                printf("RECMASTER: %s\n", (capabilities&CTDB_CAP_RECMASTER)?"YES":"NO");
                printf("LMASTER: %s\n", (capabilities&CTDB_CAP_LMASTER)?"YES":"NO");
-               printf("LVS: %s\n", (capabilities&CTDB_CAP_LVS)?"YES":"NO");
        } else {
                printm(":RECMASTER:LMASTER:LVS:\n");
-               printm(":%d:%d:%d:\n",
+               printm(":%d:%d:\n",
                        !!(capabilities&CTDB_CAP_RECMASTER),
-                       !!(capabilities&CTDB_CAP_LMASTER),
-                       !!(capabilities&CTDB_CAP_LVS));
+                       !!(capabilities&CTDB_CAP_LMASTER));
        }
        return 0;
 }