ctdb regsrvids is much more useful for testing if it sleeps once it has registered...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 22 Feb 2010 04:34:26 +0000 (15:34 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 22 Feb 2010 04:34:26 +0000 (15:34 +1100)
Othervise, as soon as it terminates, ctdbd will deregister the id automatically.

tools/ctdb.c

index 406b86a66bf53f825947975abacade917ae5a513..09c849cdd58d25612b5593fd37a26f556ab37c04 100644 (file)
@@ -1559,6 +1559,8 @@ static int regsrvid(struct ctdb_context *ctdb, int argc, const char **argv)
                DEBUG(DEBUG_ERR, ("Unable to register server_id from node %u\n", options.pnn));
                return ret;
        }
+       DEBUG(DEBUG_ERR,("Srvid registered. Sleeping for 999 seconds\n"));
+       sleep(999);
        return -1;
 }