The branch, master has been updated
       via  b82524f240bf21769dd7624ca6026763d38b9396 (commit)
      from  b963f5e40b1e73a60363568da88557cad9e58a28 (commit)

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


- Log -----------------------------------------------------------------
commit b82524f240bf21769dd7624ca6026763d38b9396
Author: Ronnie Sahlberg <[email protected]>
Date:   Thu Sep 22 15:13:26 2011 +1000

    One of the entry points to release an ip reset the pnn field before 
invoking the eventscript.
    this triggered a check for "only run the eventscript if we host the 
address" to trigger and shortcir=cuit calling the eventscript.
    
    An effect of this would be that 'ctdb delip' would remove the ip from ctdb, 
but fail to delete it from the interface.
    
    S1028798

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

Summary of changes:
 server/ctdb_takeover.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 29f7acd..a7f1250 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -3370,13 +3370,14 @@ int32_t ctdb_control_del_public_address(struct 
ctdb_context *ctdb, TDB_DATA inda
                        TALLOC_CTX *mem_ctx;
 
                        DLIST_REMOVE(ctdb->vnn, vnn);
-                       if (vnn->iface != NULL) {
-                               ctdb_vnn_unassign_iface(ctdb, vnn);
-                       }
                        if (vnn->pnn != ctdb->pnn) {
+                               if (vnn->iface != NULL) {
+                                       ctdb_vnn_unassign_iface(ctdb, vnn);
+                               }
                                talloc_free(vnn);
                                return 0;
                        }
+                       vnn->pnn = -1;
 
                        mem_ctx = talloc_new(ctdb);
                        talloc_steal(mem_ctx, vnn);
@@ -3388,6 +3389,9 @@ int32_t ctdb_control_del_public_address(struct 
ctdb_context *ctdb, TDB_DATA inda
                                         ctdb_vnn_iface_string(vnn),
                                         ctdb_addr_to_str(&vnn->public_address),
                                         vnn->public_netmask_bits);
+                       if (vnn->iface != NULL) {
+                               ctdb_vnn_unassign_iface(ctdb, vnn);
+                       }
                        if (ret != 0) {
                                return -1;
                        }


-- 
CTDB repository

Reply via email to