we must break the loop as soon as we find a suitable recmaster does exist
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 12 Oct 2009 22:49:05 +0000 (09:49 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 12 Oct 2009 22:49:05 +0000 (09:49 +1100)
otherwise "tdb ipreallocate" will silently fail to update the addresses.

tools/ctdb.c

index 0fe044aaf94cc820c39d9ccecca8868ff94c895d..ec70fe8c11281857cfc4bd3766c48ce3ca23294a 100644 (file)
@@ -1687,8 +1687,10 @@ again:
                if (nodemap->nodes[i].flags & (NODE_FLAGS_DELETED|NODE_FLAGS_BANNED|NODE_FLAGS_STOPPED)) {
                        continue;
                }
+               break;
        }
        if (i == nodemap->num) {
+               DEBUG(DEBUG_ERR,("No possible nodes to host addresses.\n"));
                return 0;
        }