The recent change to the recovery daemon to keep track of and
[sahlberg/ctdb.git] / tools / ctdb.c
index 09c849cdd58d25612b5593fd37a26f556ab37c04..5137846235495d6ddb3f0947dbac36e4ea16af7f 100644 (file)
@@ -1072,6 +1072,15 @@ static int move_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr, uint32_t pnn
                return -1;
        }
 
+       /* update the recovery daemon so it now knows to expect the new
+          node assignment for this ip.
+       */
+       ret = ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_RECD_UPDATE_IP, data);
+       if (ret != 0) {
+               DEBUG(DEBUG_ERR,("Failed to send message to update the ip on the recovery master.\n"));
+               return -1;
+       }
+
        talloc_free(tmp_ctx);
        return 0;
 }