ctdb-ipalloc: A VNN can only host IPs if node is in RUNNING runstate
[obnox/samba/samba-obnox.git] / ctdb / server / ctdb_takeover.c
index 813e364f2aca7dc4a7b68aac4e2eb4ca91ebeca1..e5c97c46d21ebd0c6c4aaf70d109011b2f7b1652 100644 (file)
@@ -261,6 +261,11 @@ static bool ctdb_vnn_available(struct ctdb_context *ctdb,
 {
        int i;
 
+       /* Nodes that are not RUNNING can not host IPs */
+       if (ctdb->runstate != CTDB_RUNSTATE_RUNNING) {
+               return false;
+       }
+
        if (vnn->delete_pending) {
                return false;
        }