ctdbd: Log add and delete of IPs
authorMartin Schwenke <martin@meltin.net>
Tue, 14 May 2013 05:38:08 +0000 (15:38 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 22 May 2013 04:24:22 +0000 (14:24 +1000)
At the moment, when someone deletes all the IPs on a node, all we see
are the release IP messages and we have to guess why.

Some would argue that add/release are more significant than
take/release so they should be logged.

Signed-off-by: Martin Schwenke <martin@meltin.net>
server/ctdb_takeover.c

index d738ad0d15eed27450ddc28ecb5122fdcc46c1f7..174a0450bbf7d15e30a6b9a5d1252d08e2afc300 100644 (file)
@@ -3824,6 +3824,8 @@ int32_t ctdb_control_add_public_address(struct ctdb_context *ctdb, TDB_DATA inda
                return -1;
        }
 
+       DEBUG(DEBUG_NOTICE,("Add IP %s\n", ctdb_addr_to_str(&pub->addr)));
+
        ret = ctdb_add_public_address(ctdb, &pub->addr, pub->mask, &pub->iface[0], true);
 
        if (ret != 0) {
@@ -3865,6 +3867,8 @@ int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb, TDB_DATA inda
                return -1;
        }
 
+       DEBUG(DEBUG_NOTICE,("Delete IP %s\n", ctdb_addr_to_str(&pub->addr)));
+
        /* walk over all public addresses until we find a match */
        for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
                if (ctdb_same_ip(&vnn->public_address, &pub->addr)) {