[SCM] CTDB repository - branch master updated - ctdb-1.13-236-g553455b

Amitay Isaacs amitay at samba.org
Thu Jul 26 06:29:06 MDT 2012


The branch, master has been updated
       via  553455b386aa7848a516a921dfc14eb87c8a3fc1 (commit)
       via  3880589db4d563e438126cf5080261fa06b9e242 (commit)
       via  38e8651b955afdbaf0ae87c24c55c052f8209290 (commit)
      from  5b2725d1ae052e848c2487cb10c5393a877d118c (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 553455b386aa7848a516a921dfc14eb87c8a3fc1
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 4 07:21:01 2012 +1000

    ctdbd: Log a meaningful message if the nodes file/list is empty
    
    Right now the message says it can't bind to any of the
    addresses... even when there aren't any!
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 3880589db4d563e438126cf5080261fa06b9e242
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 2 17:15:42 2012 +1000

    ctdbd: Remove the worked "Forced" from message about running eventscripts
    
    The eventscripts are run after a takeover run and in this case they're
    not forced.  The messages seems to imply that somone has run "ctdb
    eventscript" when that is not necessarily the case.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 38e8651b955afdbaf0ae87c24c55c052f8209290
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 2 14:09:32 2012 +1000

    ctdbd: Fix ctdb_control_release_ip() on local daemons
    
    When running on local daemons no IPs are actually assigned to
    interfaces.  Commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e broke
    ctdb_control_release_ip() for local daemons because it asks the system
    which interface the given IP is on, instead of the old behaviour of
    trusting CTDB's internal records.
    
    For local deamons (i.e. !ctdb->do_checkpublicip) revert to the old
    behaviour of looking up the interface internally.  This is good
    enough, given that the tests don't tend to misconfigure the addresses.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_takeover.c |   18 +++++++++++++-----
 server/eventscript.c   |    2 +-
 tcp/tcp_connect.c      |    9 +++++++++
 3 files changed, 23 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 99d765e..538f776 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -819,12 +819,20 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
 			ctdb_vnn_unassign_iface(ctdb, vnn);
 			return 0;
 		}
-	}
 
-	iface = ctdb_sys_find_ifname(&pip->addr);
-	if (iface == NULL) {
-		DEBUG(DEBUG_ERR, ("Could not find which interface the ip address is hosted on. can not release it\n"));
-		return 0;
+		iface = ctdb_sys_find_ifname(&pip->addr);
+		if (iface == NULL) {
+			DEBUG(DEBUG_ERR, ("Could not find which interface the ip address is hosted on. can not release it\n"));
+			return 0;
+		}
+	} else {
+		if (vnn->iface == NULL) {
+			DEBUG(DEBUG_DEBUG,("Redundant release of IP %s/%u (ip not held)\n",
+					   ctdb_addr_to_str(&pip->addr),
+					   vnn->public_netmask_bits));
+			return 0;
+		}
+		iface = strdup(ctdb_vnn_iface_string(vnn));
 	}
 
 	DEBUG(DEBUG_NOTICE,("Release of IP %s/%u on interface %s  node:%d\n",
diff --git a/server/eventscript.c b/server/eventscript.c
index fe4299b..3b9ec93 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -993,7 +993,7 @@ int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
 
 	state->c = talloc_steal(state, c);
 
-	DEBUG(DEBUG_NOTICE,("Forced running of eventscripts with arguments %s\n", indata.dptr));
+	DEBUG(DEBUG_NOTICE,("Running eventscripts with arguments %s\n", indata.dptr));
 
 	ctdb_disable_monitoring(ctdb);
 
diff --git a/tcp/tcp_connect.c b/tcp/tcp_connect.c
index 2814201..c94b88f 100644
--- a/tcp/tcp_connect.c
+++ b/tcp/tcp_connect.c
@@ -281,6 +281,15 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
 	int sock_size;
 	struct tevent_fd *fde;
 
+	/* If there are no nodes, then it won't be possible to find
+	 * the first one.  Log a failure and short circuit the whole
+	 * process.
+	 */
+	if (ctdb->num_nodes == 0) {
+		DEBUG(DEBUG_CRIT,("No nodes available to attempt bind to - is the nodes file empty?\n"));
+		return -1;
+	}
+
 	/* We only need to serialize this if we dont yet know the node ip */
 	if (!ctdb->node_ip) {
 		/* in order to ensure that we don't get two nodes with the


-- 
CTDB repository


More information about the samba-cvs mailing list