<screen>
RECMASTER: YES
LMASTER: YES
-LVS: NO
</screen>
</refsect2>
</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>
*/
#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 */
/*
int start_as_stopped;
int no_lmaster;
int no_recmaster;
- int lvs;
int script_log_level;
int no_publicipcheck;
int max_persistent_check_errors;
{ "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,
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
* 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 */
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
required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
-LVS: NO
EOF
simple_test <<EOF
required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
-LVS: NO
EOF
simple_test <<EOF
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
required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
-LVS: YES
EOF
simple_test -n 0 <<EOF
required_result 0 <<EOF
RECMASTER: YES
LMASTER: NO
-LVS: NO
EOF
simple_test -n 1 <<EOF
required_result 0 <<EOF
RECMASTER: NO
LMASTER: YES
-LVS: NO
EOF
simple_test -n 2 <<EOF
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;
}