The recent change to the recovery daemon to keep track of and
[sahlberg/ctdb.git] / tools / ctdb.c
index b2284b2156fa717fb899062bd6f52f2e26e02ab4..f91c77de80f181ef2c76455b8379c174a1d4f35d 100644 (file)
@@ -1032,6 +1032,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;
 }