back to 0 if it is to prevent an infinite loop.
this could happen if in the future we add a mechanism to add/remove
nodes to a cluster at runtime
(This used to be ctdb commit
217e80a468713fec86ccb0608460e3401046bb98)
static int start_node=0;
int j;
+ /* If we add facilities to add/remove nodes to a cluster at runtime
+ we must make sure that start_node is suddently not beyond the
+ end of the nodelist
+ */
+ if (start_node >= nodemap->num) {
+ start_node = 0;
+ }
+
j=start_node;
while (1) {
if (!(nodemap->nodes[j].flags & mask_flags) &&