ctdb-daemon: Drop ctdbd --public-interface option
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Feb 2018 08:06:51 +0000 (19:06 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:19 +0000 (02:23 +0100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/doc/ctdbd.1.xml
ctdb/include/ctdb_private.h
ctdb/server/ctdb_takeover.c
ctdb/server/ctdbd.c

index a72eb9bcea7666508accbc8de13e31042edb7549..97a86a1554385ff4454973860d0dd3b16d872ee3 100644 (file)
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>--public-interface=<parameter>INTERFACE</parameter></term>
-       <listitem>
-         <para>
-           Default INTERFACE on which to attach public IP addresses.
-         </para>
-         <para>
-           When using public IP addresses, this is only required if
-           interfaces are not explicitly specified in the public
-           addresses file.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>--reclock=<parameter>LOCK</parameter></term>
        <listitem>
index 23cb7dcd53bae78c90967492cdc04487e6a21b15..62ba512ae50f2d4247a0bf6c9911f644556379bb 100644 (file)
@@ -303,7 +303,6 @@ struct ctdb_context {
        bool do_setsched;
        const char *event_script_dir;
        const char *notification_script;
-       const char *default_public_interface;
        pid_t ctdbd_pid;
        pid_t recoverd_pid;
        enum ctdb_runstate runstate;
index fb100aa6ffc172cf2cfb1ba8aa3b4241c001d852..a1567b3a5ecced74cfc27443d922498440b068b9 100644 (file)
@@ -1162,18 +1162,15 @@ int ctdb_set_public_addresses(struct ctdb_context *ctdb, bool check_addresses)
                }
                tok = strtok(line, " \t");
                addrstr = tok;
+
                tok = strtok(NULL, " \t");
                if (tok == NULL) {
-                       if (NULL == ctdb->default_public_interface) {
-                               DEBUG(DEBUG_CRIT,("No default public interface and no interface specified at line %u of public address list\n",
-                                        i+1));
-                               talloc_free(lines);
-                               return -1;
-                       }
-                       ifaces = ctdb->default_public_interface;
-               } else {
-                       ifaces = tok;
+                       D_ERR("No interface specified at line %u "
+                             "of public addresses file\n", i+1);
+                       talloc_free(lines);
+                       return -1;
                }
+               ifaces = tok;
 
                if (!addrstr || !parse_ip_mask(addrstr, ifaces, &addr, &mask)) {
                        DEBUG(DEBUG_CRIT,("Badly formed line %u in public address list\n", i+1));
index cca08f9e7c62bd583ecc71f88f0e4d928e2afef0..91e3132e38c9ae08a8e1aa75d0ffa2dfccb501f4 100644 (file)
@@ -50,7 +50,6 @@ static struct {
        const char *db_dir;
        const char *db_dir_persistent;
        const char *db_dir_state;
-       const char *public_interface;
        int         valgrinding;
        int         nosetsched;
        int         start_as_disabled;
@@ -117,7 +116,6 @@ int main(int argc, const char *argv[])
                POPT_AUTOHELP
                { "debug", 'd', POPT_ARG_STRING, &options.debuglevel, 0, "debug level", NULL },
                { "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL },
-               { "public-interface", 0, POPT_ARG_STRING, &options.public_interface, 0, "public interface", "interface"},
                { "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" },
@@ -308,11 +306,6 @@ int main(int argc, const char *argv[])
        ctdb->db_directory_state = options.db_dir_state;
        mkdir_p_or_die(ctdb->db_directory_state, 0700);
 
-       if (options.public_interface) {
-               ctdb->default_public_interface = talloc_strdup(ctdb, options.public_interface);
-               CTDB_NO_MEMORY(ctdb, ctdb->default_public_interface);
-       }
-
        ctdb->event_script_dir = talloc_asprintf(ctdb,
                                                 "%s/events.d",
                                                 getenv("CTDB_BASE"));