ctdb-daemon: Broadcast IP rellocation request from monitor code
authorMartin Schwenke <martin@meltin.net>
Mon, 30 Mar 2015 09:51:51 +0000 (20:51 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 10 May 2015 01:22:13 +0000 (03:22 +0200)
No need to just send it to the recovery master.

This reduces the need for main daemon code to know which node is the
recovery master.  The end goal is for the main daemon to not need to
know which node is the recovery master - this information would be
stored in the recovery daemon (and subsequently a separate cluster
management daemon).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_monitor.c

index 5c0c055a63e1700a611e1683b1f3527636109bcc..c502f0e40e510d7e00d331755e813e6a4742c5ed 100644 (file)
@@ -187,11 +187,14 @@ after_change_status:
        }
 
        /* ask the recmaster to reallocate all addresses */
-       DEBUG(DEBUG_ERR,("Node became %s. Ask recovery master %u to perform ip reallocation\n",
-                        state_str, ctdb->recovery_master));
-       ret = ctdb_daemon_send_message(ctdb, ctdb->recovery_master, CTDB_SRVID_TAKEOVER_RUN, rddata);
+       DEBUG(DEBUG_ERR,
+             ("Node became %s. Ask recovery master to reallocate IPs\n",
+              state_str));
+       ret = ctdb_daemon_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_TAKEOVER_RUN, rddata);
        if (ret != 0) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to send ip takeover run request message to %u\n", ctdb->recovery_master));
+               DEBUG(DEBUG_ERR,
+                     (__location__
+                      " Failed to send IP takeover run request\n"));
        }
 }