]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
specify which node to perform recovery to when using the recovery
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 00:37:43 +0000 (10:37 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 00:37:43 +0000 (10:37 +1000)
control

(This used to be ctdb commit c67f8a1783ce6f5af9940d2e22847ddcd939763d)

ctdb/tools/ctdb_control.c

index 29b9984ce5fcad761c51a62a4588a6ea51aaab05..117a6ad23d50412fe964aae2eb69a76bc52e724e 100644 (file)
@@ -49,7 +49,7 @@ static void usage(void)
        printf("  cleardb <vnn> <dbid>               deletes all records in a db\n");
        printf("  getrecmode <vnn>                   get recovery mode\n");
        printf("  setrecmode <vnn> <mode>            set recovery mode\n");
-       printf("  recover                            recover the cluster\n");
+       printf("  recover <vnn>                      recover the cluster\n");
        exit(1);
 }
 
@@ -240,9 +240,14 @@ static int control_recover(struct ctdb_context *ctdb, int argc, const char **arg
        int i, j, ret;
        struct ctdb_dbid_map dbmap;
 
-       vnn = ctdb_get_vnn(ctdb);
-       printf("recover\n");
-       printf("this vnn:%d\n",vnn);
+       if (argc < 1) {
+               usage();
+       }
+
+
+       vnn = strtoul(argv[0], NULL, 0);
+
+       printf("recover ctdb from node %d\n", vnn);
 
        /* 1: find a list of all nodes */
        printf("\n1: fetching list of nodes\n");