From: Martin Schwenke Date: Tue, 20 Feb 2018 08:06:51 +0000 (+1100) Subject: ctdb-daemon: Drop ctdbd --public-interface option X-Git-Tag: talloc-2.1.12~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6d6f2220b5380532fc554697be832010fb93b53;p=thirdparty%2Fsamba.git ctdb-daemon: Drop ctdbd --public-interface option Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml index a72eb9bcea7..97a86a15543 100644 --- a/ctdb/doc/ctdbd.1.xml +++ b/ctdb/doc/ctdbd.1.xml @@ -298,20 +298,6 @@ - - --public-interface=INTERFACE - - - Default INTERFACE on which to attach public IP addresses. - - - When using public IP addresses, this is only required if - interfaces are not explicitly specified in the public - addresses file. - - - - --reclock=LOCK diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 23cb7dcd53b..62ba512ae50 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -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; diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index fb100aa6ffc..a1567b3a5ec 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -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)); diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index cca08f9e7c6..91e3132e38c 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -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"));