ctdbd: Add new runstate CTDB_RUNSTATE_FIRST_RECOVERY
[obnox/ctdb.git] / server / ctdb_recover.c
index 7fd0ac36ea110e1bf1ee5e86c4ac5c040f4cf7f0..6506f8bbce3be119845345a0537f2a04fcfc561f 100644 (file)
@@ -911,6 +911,10 @@ static void ctdb_end_recovery_callback(struct ctdb_context *ctdb, int status, vo
        talloc_free(state);
 
        gettimeofday(&ctdb->last_recovery_finished, NULL);
+
+       if (ctdb->runstate == CTDB_RUNSTATE_FIRST_RECOVERY) {
+               ctdb_set_runstate(ctdb, CTDB_RUNSTATE_STARTUP);
+       }
 }
 
 /*