maybe_set "-d" "$CTDB_DEBUGLEVEL"
maybe_set "--notification-script" "$CTDB_NOTIFY_SCRIPT"
maybe_set "--start-as-disabled" "$CTDB_START_AS_DISABLED" "yes"
+ maybe_set "--start-as-stopped " "$CTDB_START_AS_STOPPED" "yes"
maybe_set "--no-recmaster" "$CTDB_CAPABILITY_RECMASTER" "no"
maybe_set "--no-lmaster" "$CTDB_CAPABILITY_LMASTER" "no"
maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
DEBUG(DEBUG_INFO, ("This node is configured to start in DISABLED state\n"));
node->flags |= NODE_FLAGS_DISABLED;
}
+ /* do we start out in STOPPED mode? */
+ if (ctdb->start_as_stopped != 0) {
+ DEBUG(DEBUG_INFO, ("This node is configured to start in STOPPED state\n"));
+ node->flags |= NODE_FLAGS_STOPPED;
+ }
}
ctdb->num_nodes++;
int no_setsched;
int use_syslog;
int start_as_disabled;
+ int start_as_stopped;
int no_lmaster;
int no_recmaster;
int lvs;
{ "nosetsched", 0, POPT_ARG_NONE, &options.no_setsched, 0, "disable setscheduler SCHED_FIFO call", NULL },
{ "syslog", 0, POPT_ARG_NONE, &options.use_syslog, 0, "log messages to syslog", NULL },
{ "start-as-disabled", 0, POPT_ARG_NONE, &options.start_as_disabled, 0, "Node starts in disabled state", NULL },
+ { "start-as-stopped", 0, POPT_ARG_NONE, &options.start_as_stopped, 0, "Node starts in stopped state", NULL },
{ "no-lmaster", 0, POPT_ARG_NONE, &options.no_lmaster, 0, "disable lmaster role on this node", NULL },
{ "no-recmaster", 0, POPT_ARG_NONE, &options.no_recmaster, 0, "disable recmaster role on this node", NULL },
{ "lvs", 0, POPT_ARG_NONE, &options.lvs, 0, "lvs is enabled on this node", NULL },
ctdb = ctdb_cmdline_init(ev);
ctdb->start_as_disabled = options.start_as_disabled;
+ ctdb->start_as_stopped = options.start_as_stopped;
script_log_level = options.script_log_level;
DEBUG(DEBUG_INFO, ("This node is configured to start in DISABLED state\n"));
ctdb->nodes[i]->flags |= NODE_FLAGS_DISABLED;
}
+ /* do we start out in STOPPED mode? */
+ if (ctdb->start_as_stopped != 0) {
+ DEBUG(DEBUG_INFO, ("This node is configured to start in STOPPED state\n"));
+ ctdb->nodes[i]->flags |= NODE_FLAGS_STOPPED;
+ }
if (listen(ctcp->listen_fd, 10) == -1) {
goto failed;