From: Ronnie Sahlberg Date: Sun, 12 Dec 2010 03:22:20 +0000 (+1100) Subject: When assigning the single-public-ip during startup, X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=8a5e2f062ed18b07c368864527667a85f9a95755;hp=ae1aeacc05a39177d274ed8fb90e24163a59bae8;p=sahlberg%2Fctdb.git When assigning the single-public-ip during startup, flag the interface as initially being "link ok" so that we can add it and startup. The eventscript can later drop the flag if required --- diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c index 682d17ba..e3e6787c 100644 --- a/server/ctdb_takeover.c +++ b/server/ctdb_takeover.c @@ -1000,6 +1000,7 @@ int ctdb_set_single_public_ip(struct ctdb_context *ctdb, const char *ip) { struct ctdb_vnn *svnn; + struct ctdb_iface *cur = NULL; bool ok; int ret; @@ -1028,6 +1029,14 @@ int ctdb_set_single_public_ip(struct ctdb_context *ctdb, return -1; } + /* assume the single public ip interface is initially "good" */ + cur = ctdb_find_iface(ctdb, iface); + if (cur == NULL) { + DEBUG(DEBUG_CRIT,("Can not find public interface %s used by --single-public-ip", iface)); + return -1; + } + cur->link_up = true; + ret = ctdb_vnn_assign_iface(ctdb, svnn); if (ret != 0) { talloc_free(svnn);