ctdb-daemon: Drop ctdbd --nlist option
authorMartin Schwenke <martin@meltin.net>
Wed, 14 Mar 2018 04:34:57 +0000 (15:34 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:20 +0000 (02:23 +0100)
Tests now deviate from the compile-time default by setting CTDB_BASE.

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

index 97a86a1554385ff4454973860d0dd3b16d872ee3..4f6d482da907eb18da6fbc3ad3720d112902d6b0 100644 (file)
          </para>
          <para>
            By default ctdbd will select the first address from the
-           nodes list that in can bind to.  See also
-           <citetitle>--nlist</citetitle>.
+           nodes list that in can bind to.    See also the
+           <citetitle>Private address</citetitle> section in
+           <citerefentry><refentrytitle>ctdb</refentrytitle>
+           <manvolnum>7</manvolnum></citerefentry>.
          </para>
          <para>
            This option is only required when automatic address
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>--nlist=<parameter>FILENAME</parameter></term>
-       <listitem>
-         <para>
-           FILENAME containing a list of the private IP addresses, one
-           per line, for each node in the cluster.  This file
-           <emphasis>must be the same on each node</emphasis> in the
-           cluster.
-         </para>
-         <para>
-           Default is <envar>CTDB_BASE</envar>/nodes, so usually
-           <filename>/usr/local/etc/ctdb/nodes</filename>.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>--no-lmaster</term>
        <listitem>
index 91e3132e38c9ae08a8e1aa75d0ffa2dfccb501f4..68e7e7d045586949cfd422d74b65491e32b01c07 100644 (file)
@@ -41,7 +41,6 @@
 
 static struct {
        const char *debuglevel;
-       const char *nlist;
        const char *transport;
        const char *myaddress;
        const char *notification_script;
@@ -62,7 +61,6 @@ static struct {
        int         torture;
 } options = {
        .debuglevel = "NOTICE",
-       .nlist = NULL,
        .transport = "tcp",
        .logging = "file:" LOGDIR "/log.ctdb",
        .db_dir = CTDB_VARDIR,
@@ -117,7 +115,6 @@ int main(int argc, const char *argv[])
                { "debug", 'd', POPT_ARG_STRING, &options.debuglevel, 0, "debug level", NULL },
                { "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL },
                { "logging", 0, POPT_ARG_STRING, &options.logging, 0, "logging method to be used", NULL },
-               { "nlist", 0, POPT_ARG_STRING, &options.nlist, 0, "node list file", "filename" },
                { "notification-script", 0, POPT_ARG_STRING, &options.notification_script, 0, "notification script", "filename" },
                { "listen", 0, POPT_ARG_STRING, &options.myaddress, 0, "address to listen on", "address" },
                { "transport", 0, POPT_ARG_STRING, &options.transport, 0, "protocol transport", NULL },
@@ -285,15 +282,11 @@ int main(int argc, const char *argv[])
        setenv("CTDB_BASE", CTDB_ETCDIR, 0);
 
        /* tell ctdb what nodes are available */
-       if (options.nlist != NULL) {
-               ctdb->nodes_file = options.nlist;
-       } else {
-               ctdb->nodes_file =
-                       talloc_asprintf(ctdb, "%s/nodes", getenv("CTDB_BASE"));
-               if (ctdb->nodes_file == NULL) {
-                       DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
-                       exit(1);
-               }
+       ctdb->nodes_file =
+               talloc_asprintf(ctdb, "%s/nodes", getenv("CTDB_BASE"));
+       if (ctdb->nodes_file == NULL) {
+               DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
+               exit(1);
        }
        ctdb_load_nodes_file(ctdb);