diff --git a/GNUmakefile b/GNUmakefile index b17fb4c..f28dea8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -58,6 +58,8 @@ BUILD_COUNTER ?= build.counter LAST_COUNT = $(shell test ! -e $(BUILD_COUNTER) && echo 0; test -e $(BUILD_COUNTER) && cat $(BUILD_COUNTER)) COUNT = $(shell expr 1 + $(LAST_COUNT)) +SPECVERSION ?= $(COUNT) + init: ./autogen.sh @@ -144,7 +146,7 @@ srpm-%: export $(PACKAGE)-%.spec if [ -e $(BUILD_COUNTER) ]; then \ echo $(COUNT) > $(BUILD_COUNTER); \ fi - sed -i 's/global\ specversion.*/global\ specversion\ $(COUNT)/' $(PACKAGE).spec + sed -i 's/global\ specversion.*/global\ specversion\ $(SPECVERSION)/' $(PACKAGE).spec sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' $(PACKAGE).spec case "$(WITH)" in \ *pre_release*) \ diff --git a/attrd/commands.c b/attrd/commands.c index c48ef1b..12771ee 100644 --- a/attrd/commands.c +++ b/attrd/commands.c @@ -202,21 +202,27 @@ attrd_client_message(crm_client_t *client, xmlNode *xml) crm_debug("Setting %s to %s", regex, value); if (regcomp(r_patt, regex, REG_EXTENDED)) { crm_err("Bad regex '%s' for update", regex); - regfree(r_patt); - free(r_patt); - return; - } - g_hash_table_iter_init(&aIter, attributes); - while (g_hash_table_iter_next(&aIter, (gpointer *) & attr, NULL)) { - int status = regexec(r_patt, attr, 0, NULL, 0); + } else { - if(status == 0) { - crm_trace("Matched %s with %s", attr, regex); - crm_xml_add(xml, F_ATTRD_ATTRIBUTE, attr); - send_attrd_message(NULL, xml); + g_hash_table_iter_init(&aIter, attributes); + while (g_hash_table_iter_next(&aIter, (gpointer *) & attr, NULL)) { + int status = regexec(r_patt, attr, 0, NULL, 0); + + if(status == 0) { + crm_trace("Matched %s with %s", attr, regex); + crm_xml_add(xml, F_ATTRD_ATTRIBUTE, attr); + send_attrd_message(NULL, xml); + } } } + + free(key); + free(set); + free(host); + + regfree(r_patt); + free(r_patt); return; } else if(host == NULL) { diff --git a/cib/callbacks.c b/cib/callbacks.c index 610aa0a..9fb2de9 100644 --- a/cib/callbacks.c +++ b/cib/callbacks.c @@ -382,6 +382,9 @@ do_local_notify(xmlNode * notify_src, const char *client_id, /* send callback to originating child */ crm_client_t *client_obj = NULL; int local_rc = pcmk_ok; + int call_id = 0; + + crm_element_value_int(notify_src, F_CIB_CALLID, &call_id); if (client_id != NULL) { client_obj = crm_client_get_by_id(client_id); @@ -389,7 +392,7 @@ do_local_notify(xmlNode * notify_src, const char *client_id, if (client_obj == NULL) { local_rc = -ECONNRESET; - crm_trace("No client to sent the response to. F_CIB_CLIENTID not set."); + crm_trace("No client to sent response %d to, F_CIB_CLIENTID not set.", call_id); } else { int rid = 0; @@ -405,13 +408,13 @@ do_local_notify(xmlNode * notify_src, const char *client_id, rid, client_obj->name, from_peer ? "(originator of delegated request)" : ""); } else { - crm_trace("Sending response to %s %s", - client_obj->name, from_peer ? "(originator of delegated request)" : ""); + crm_trace("Sending response [call %d] to %s %s", + call_id, client_obj->name, from_peer ? "(originator of delegated request)" : ""); } } else { - crm_trace("Sending an event to %s %s", - client_obj->name, from_peer ? "(originator of delegated request)" : ""); + crm_trace("Sending event %d to %s %s", + call_id, client_obj->name, from_peer ? "(originator of delegated request)" : ""); } switch (client_obj->kind) { diff --git a/crmd/control.c b/crmd/control.c index 99ef659..8989859 100644 --- a/crmd/control.c +++ b/crmd/control.c @@ -945,17 +945,23 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void throttle_load_target = strtof(value, NULL) / 100; } + value = getenv("SBD_WATCHDOG_TIMEOUT"); + + if(value == NULL) { + value = crmd_pref(config_hash, "stonith-watchdog-timeout"); + } + value = crmd_pref(config_hash, "stonith-watchdog-timeout"); - if(crm_get_msec(value) > 0 && daemon_option("watchdog") == NULL) { + if(crm_get_msec(value) > 0 && !daemon_option_enabled(crm_system_name, "watchdog")) { do_crm_log_always(LOG_EMERG, "Shutting down pacemaker, no watchdog device configured"); crmd_exit(DAEMON_RESPAWN_STOP); - } else if(crm_get_msec(value) <= 0 && daemon_option("watchdog")) { + } else if(crm_get_msec(value) <= 0 && daemon_option_enabled(crm_system_name, "watchdog")) { crm_warn("Watchdog enabled but no stonith-watchdog-timeout configured"); } value = crmd_pref(config_hash, "no-quorum-policy"); - if (safe_str_eq(value, "suicide") && daemon_option("watchdog")) { + if (safe_str_eq(value, "suicide") && daemon_option_enabled(crm_system_name, "watchdog")) { no_quorum_suicide_escalation = TRUE; } diff --git a/crmd/election.c b/crmd/election.c index e0bd6c4..a4f2e99 100644 --- a/crmd/election.c +++ b/crmd/election.c @@ -208,6 +208,9 @@ do_dc_takeover(long long action, fsa_register_cib_callback(rc, FALSE, NULL, feature_update_callback); update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, + XML_ATTR_HAVE_WATCHDOG, daemon_option("watchdog"), FALSE, NULL, NULL); + + update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "dc-version", VERSION "-" BUILD_VERSION, FALSE, NULL, NULL); update_attr_delegate(fsa_cib_conn, cib_none, XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, diff --git a/crmd/pengine.c b/crmd/pengine.c index ab426be..2f7513f 100644 --- a/crmd/pengine.c +++ b/crmd/pengine.c @@ -237,6 +237,48 @@ do_pe_invoke(long long action, fsa_register_cib_callback(fsa_pe_query, FALSE, NULL, do_pe_invoke_callback); } +static void +force_local_option(xmlNode *xml, const char *attr_name, const char *attr_value) +{ + int max = 0; + int lpc = 0; + int xpath_max = 1024; + char *xpath_string = NULL; + xmlXPathObjectPtr xpathObj = NULL; + + xpath_string = calloc(1, xpath_max); + lpc = snprintf(xpath_string, xpath_max, "%.128s//%s//nvpair[@name='%.128s']", + get_object_path(XML_CIB_TAG_CRMCONFIG), XML_CIB_TAG_PROPSET, attr_name); + CRM_LOG_ASSERT(lpc > 0); + + xpathObj = xpath_search(xml, xpath_string); + max = numXpathResults(xpathObj); + free(xpath_string); + + for (lpc = 0; lpc < max; lpc++) { + xmlNode *match = getXpathResult(xpathObj, lpc); + crm_trace("Forcing %s/%s = %s", ID(match), attr_name, attr_value); + crm_xml_add(match, XML_NVPAIR_ATTR_VALUE, attr_value); + } + + if(max == 0) { + char *attr_id = crm_concat(CIB_OPTIONS_FIRST, attr_name, '-'); + + crm_trace("Creating %s/%s = %s", attr_id, attr_name, attr_value); + xml = create_xml_node(xml, XML_CIB_TAG_CRMCONFIG); + xml = create_xml_node(xml, XML_CIB_TAG_PROPSET); + crm_xml_add(xml, XML_ATTR_ID, CIB_OPTIONS_FIRST); + + xml = create_xml_node(xml, XML_CIB_TAG_NVPAIR); + + crm_xml_add(xml, XML_ATTR_ID, attr_id); + crm_xml_add(xml, XML_NVPAIR_ATTR_NAME, attr_name); + crm_xml_add(xml, XML_NVPAIR_ATTR_VALUE, attr_value); + + free(attr_id); + } +} + void do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data) { @@ -279,6 +321,7 @@ do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void crm_xml_add(output, XML_ATTR_DC_UUID, fsa_our_uuid); crm_xml_add_int(output, XML_ATTR_HAVE_QUORUM, fsa_has_quorum); + force_local_option(output, XML_ATTR_HAVE_WATCHDOG, daemon_option("watchdog")); if (ever_had_quorum && crm_have_quorum == FALSE) { crm_xml_add_int(output, XML_ATTR_QUORUM_PANIC, 1); diff --git a/crmd/remote_lrmd_ra.c b/crmd/remote_lrmd_ra.c index f3dedeb..2f658ee 100644 --- a/crmd/remote_lrmd_ra.c +++ b/crmd/remote_lrmd_ra.c @@ -140,8 +140,6 @@ recurring_helper(gpointer data) ra_data->recurring_cmds = g_list_remove(ra_data->recurring_cmds, cmd); - cmd->call_id = generate_callid(); - ra_data->cmds = g_list_append(ra_data->cmds, cmd); mainloop_set_trigger(ra_data->work); } @@ -177,6 +175,24 @@ report_remote_ra_result(remote_ra_cmd_t * cmd) op.interval = cmd->interval; op.rc = cmd->rc; op.op_status = cmd->op_status; + op.t_run = cmd->start_time; + op.t_rcchange = cmd->start_time; + if (cmd->reported_success && cmd->rc != PCMK_OCF_OK) { + op.t_rcchange = time(NULL); + /* This edge case will likely never ever occur, but if it does the + * result is that a failure will not be processed correctly. This is only + * remotely possible because we are able to detect a connection resource's tcp + * connection has failed at any moment after start has completed. The actual + * recurring operation is just a connectivity ping. + * + * basically, we are not guaranteed that the first successful monitor op and + * a subsequent failed monitor op will not occur in the same timestamp. We have to + * make it look like the operations occurred at separate times though. */ + if (op.t_rcchange == op.t_run) { + op.t_rcchange++; + } + } + if (cmd->params) { lrmd_key_value_t *tmp; diff --git a/crmd/te_utils.c b/crmd/te_utils.c index 66ed1da..69c22e3 100644 --- a/crmd/te_utils.c +++ b/crmd/te_utils.c @@ -126,19 +126,19 @@ tengine_stonith_notify(stonith_t * st, stonith_event_t * st_event) if (st_event->result == pcmk_ok && safe_str_eq("on", st_event->action)) { crm_notice("%s was successfully unfenced by %s (at the request of %s)", - st_event->target, st_event->executioner, st_event->origin); + st_event->target, st_event->executioner ? st_event->executioner : "", st_event->origin); /* TODO: Hook up st_event->device */ return; } else if (safe_str_eq("on", st_event->action)) { crm_err("Unfencing of %s by %s failed: %s (%d)", - st_event->target, st_event->executioner, + st_event->target, st_event->executioner ? st_event->executioner : "", pcmk_strerror(st_event->result), st_event->result); return; } else if (st_event->result == pcmk_ok && crm_str_eq(st_event->target, fsa_our_uname, TRUE)) { crm_crit("We were allegedly just fenced by %s for %s!", - st_event->executioner, st_event->origin); /* Dumps blackbox if enabled */ + st_event->executioner ? st_event->executioner : "", st_event->origin); /* Dumps blackbox if enabled */ qb_log_fini(); /* Try to get the above log message to disk - somehow */ diff --git a/cts/CIB.py b/cts/CIB.py index 6ce38e9..d26efdb 100644 --- a/cts/CIB.py +++ b/cts/CIB.py @@ -177,6 +177,8 @@ class CIB11(ConfigBase): for node in self.CM.Env["nodes"]: ftype = self.CM.Env.RandomGen.choice(["levels-and", "levels-or ", "broadcast "]) self.CM.log(" - Using %s fencing for node: %s" % (ftype, node)) + # for baremetal remote node tests + stt_nodes.append("remote_%s" % node) if ftype == "levels-and": stl.level(1, node, "FencingPass,Fencing") stt_nodes.append(node) diff --git a/cts/CTStests.py b/cts/CTStests.py index cd5b7ce..d2b7668 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -453,8 +453,8 @@ class StonithdTest(CTSTest): is_dc = self.CM.is_node_dc(node) watchpats = [] - watchpats.append("Operation .* for host '%s' with device .* returned: 0" % node) - watchpats.append("tengine_stonith_notify:.*Peer %s was terminated .*: OK" % node) + watchpats.append(self.templates["Pat:FenceOpOK"] % node) + watchpats.append(self.templates["Pat:NodeFenced"] % node) if self.Env["at-boot"] == 0: self.debug("Expecting %s to stay down" % node) @@ -2634,11 +2634,11 @@ AllTestClasses.append(RemoteLXC) ################################################################### -class RemoteBaremetal(CTSTest): +class RemoteDriver(CTSTest): ################################################################### def __init__(self, cm): CTSTest.__init__(self,cm) - self.name = "RemoteBaremetal" + self.name = "RemoteDriver" self.is_docker_unsafe = 1 self.start = StartTest(cm) self.startall = SimulStartLite(cm) @@ -2647,9 +2647,8 @@ class RemoteBaremetal(CTSTest): self.failed = 0 self.fail_string = "" self.remote_node_added = 0 - self.remote_node = "remote1" self.remote_rsc_added = 0 - self.remote_rsc = "remote1-rsc" + self.remote_rsc = "remote-rsc" self.cib_cmd = """cibadmin -C -o %s -X '%s' """ def del_rsc(self, node, rsc): @@ -2679,10 +2678,11 @@ class RemoteBaremetal(CTSTest): def add_primitive_rsc(self, node): rsc_xml = """ - + - + + """ % (self.remote_rsc) self.add_rsc(node, rsc_xml) if self.failed == 0: @@ -2691,21 +2691,38 @@ class RemoteBaremetal(CTSTest): def add_connection_rsc(self, node): rsc_xml = """ - - - + + + - - + + - """ % (self.remote_node, node) self.add_rsc(node, rsc_xml) if self.failed == 0: self.remote_node_added = 1 - def step1_start_metal(self, node): + def stop_pcmk_remote(self, node): + # disable pcmk remote + for i in range(10): + rc = self.rsh(node, "service pacemaker_remote stop") + if rc != 0: + time.sleep(6) + else: + break + + def start_pcmk_remote(self, node): + for i in range(10): + rc = self.rsh(node, "service pacemaker_remote start") + if rc != 0: + time.sleep(6) + else: + self.pcmk_started = 1 + break + + def start_metal(self, node): pcmk_started = 0 # make sure the resource doesn't already exist for some reason @@ -2717,13 +2734,7 @@ class RemoteBaremetal(CTSTest): self.fail_string = "Failed to shutdown cluster node %s" % (node) return - for i in range(10): - rc = self.rsh(node, "service pacemaker_remote start") - if rc != 0: - time.sleep(6) - else: - self.pcmk_started = 1 - break + self.start_pcmk_remote(node) if self.pcmk_started == 0: self.failed = 1 @@ -2735,6 +2746,7 @@ class RemoteBaremetal(CTSTest): watch = self.create_watch(pats, 120) watch.setwatch() pats.append(self.templates["Pat:RscOpOK"] % (self.remote_node, "start")) + pats.append(self.templates["Pat:DC_IDLE"]) self.add_connection_rsc(node) @@ -2745,7 +2757,112 @@ class RemoteBaremetal(CTSTest): self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) self.failed = 1 - def step2_add_rsc(self, node): + def migrate_connection(self, node): + if self.failed == 1: + return + + pats = [ ] + pats.append(self.templates["Pat:RscOpOK"] % (self.remote_node, "migrate_to")) + pats.append(self.templates["Pat:RscOpOK"] % (self.remote_node, "migrate_from")) + pats.append(self.templates["Pat:DC_IDLE"]) + watch = self.create_watch(pats, 120) + watch.setwatch() + + (rc, lines) = self.rsh(node, "crm_resource -M -r %s" % (self.remote_node), None) + if rc != 0: + self.fail_string = "failed to move remote node connection resource" + self.logger.log(self.fail_string) + self.failed = 1 + return + + self.set_timer("remoteMetalMigrate") + watch.lookforall() + self.log_timer("remoteMetalMigrate") + + if watch.unmatched: + self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) + self.logger.log(self.fail_string) + self.failed = 1 + return + + def fail_rsc(self, node): + if self.failed == 1: + return + + watchpats = [ ] + watchpats.append(self.templates["Pat:RscRemoteOpOK"] % (self.remote_rsc, "stop", self.remote_node)) + watchpats.append(self.templates["Pat:RscRemoteOpOK"] % (self.remote_rsc, "start", self.remote_node)) + watchpats.append(self.templates["Pat:DC_IDLE"]) + + watch = self.create_watch(watchpats, 120) + watch.setwatch() + + self.debug("causing dummy rsc to fail.") + + rc = self.rsh(node, "rm -f /var/run/resource-agents/Dummy*") + + self.set_timer("remoteRscFail") + watch.lookforall() + self.log_timer("remoteRscFail") + if watch.unmatched: + self.fail_string = "Unmatched patterns during rsc fail: %s" % (repr(watch.unmatched)) + self.logger.log(self.fail_string) + self.failed = 1 + + def fail_connection(self, node): + if self.failed == 1: + return + + watchpats = [ ] + watchpats.append(self.templates["Pat:FenceOpOK"] % self.remote_node) + watchpats.append(self.templates["Pat:NodeFenced"] % self.remote_node) + + watch = self.create_watch(watchpats, 120) + watch.setwatch() + + # force stop the pcmk remote daemon. this will result in fencing + self.debug("Force stopped active remote node") + self.stop_pcmk_remote(node) + + self.debug("Waiting for remote node to be fenced.") + self.set_timer("remoteMetalFence") + watch.lookforall() + self.log_timer("remoteMetalFence") + if watch.unmatched: + self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) + self.logger.log(self.fail_string) + self.failed = 1 + return + + self.debug("Waiting for the remote node to come back up") + self.CM.ns.WaitForNodeToComeUp(node, 120); + + pats = [ ] + watch = self.create_watch(pats, 120) + watch.setwatch() + pats.append(self.templates["Pat:RscOpOK"] % (self.remote_node, "start")) + if self.remote_rsc_added == 1: + pats.append(self.templates["Pat:RscOpOK"] % (self.remote_rsc, "monitor")) + + # start the remote node again watch it integrate back into cluster. + self.start_pcmk_remote(node) + if self.pcmk_started == 0: + self.failed = 1 + self.fail_string = "Failed to start pacemaker_remote on node %s" % (node) + self.logger.log(self.fail_string) + return + + self.debug("Waiting for remote node to rejoin cluster after being fenced.") + self.set_timer("remoteMetalRestart") + watch.lookforall() + self.log_timer("remoteMetalRestart") + if watch.unmatched: + self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) + self.failed = 1 + self.logger.log(self.fail_string) + return + + def add_dummy_rsc(self, node): if self.failed == 1: return @@ -2753,33 +2870,19 @@ class RemoteBaremetal(CTSTest): pats = [ ] watch = self.create_watch(pats, 120) watch.setwatch() - pats.append("process_lrm_event:.*Operation %s_start_0.*node=%s, .*confirmed.*true" % (self.remote_rsc, self.remote_node)) + pats.append(self.templates["Pat:RscRemoteOpOK"] % (self.remote_rsc, "start", self.remote_node)) + pats.append(self.templates["Pat:DC_IDLE"]) # Add a resource that must live on remote-node self.add_primitive_rsc(node) - # this crm_resource command actually occurs on the remote node - # which verifies that the ipc proxy works - time.sleep(1) - (rc, lines) = self.rsh(node, "crm_resource -W -r remote1-rsc --quiet", None) + # force that rsc to prefer the remote node. + (rc, line) = self.CM.rsh(node, "crm_resource -M -r %s -N %s -f" % (self.remote_rsc, self.remote_node), None) if rc != 0: - self.fail_string = "Failed to get location of resource remote1-rsc" + self.fail_string = "Failed to place remote resource on remote node." self.failed = 1 return - find = 0 - for line in lines: - if self.remote_node in line.split(): - find = 1 - break - - if find == 0: - rc = self.rsh(node, "crm_resource -M -r remote1-rsc -N %s" % (self.remote_node)) - if rc != 0: - self.fail_string = "Failed to place primitive on remote-node" - self.failed = 1 - return - self.set_timer("remoteMetalRsc") watch.lookforall() self.log_timer("remoteMetalRsc") @@ -2787,7 +2890,7 @@ class RemoteBaremetal(CTSTest): self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) self.failed = 1 - def step3_test_attributes(self, node): + def test_attributes(self, node): if self.failed == 1: return @@ -2827,9 +2930,10 @@ class RemoteBaremetal(CTSTest): self.set_timer("remoteMetalCleanup") if self.remote_rsc_added == 1: - self.rsh(node, "crm_resource -U -r remote1-rsc -N %s" % (self.remote_node)) + self.rsh(node, "crm_resource -U -r %s -N %s" % (self.remote_rsc, self.remote_node)) self.del_rsc(node, self.remote_rsc) if self.remote_node_added == 1: + self.rsh(node, "crm_resource -U -r %s" % (self.remote_node)) self.del_rsc(node, self.remote_node) watch.lookforall() self.log_timer("remoteMetalCleanup") @@ -2838,15 +2942,11 @@ class RemoteBaremetal(CTSTest): self.fail_string = "Unmatched patterns: %s" % (repr(watch.unmatched)) self.failed = 1 - # disable pcmk remote - for i in range(10): - rc = self.rsh(node, "service pacemaker_remote stop") - if rc != 0: - time.sleep(6) - else: - break + self.stop_pcmk_remote(node) - def setup_env(self): + def setup_env(self, node): + + self.remote_node = "remote_%s" % (node) sync_key = 0 # we are assuming if all nodes have a key, that it is @@ -2887,10 +2987,10 @@ class RemoteBaremetal(CTSTest): if not ret: return self.failure("Setup failed, start all nodes failed.") - self.setup_env() - self.step1_start_metal(node) - self.step2_add_rsc(node) - self.step3_test_attributes(node) + self.setup_env(node) + self.start_metal(node) + self.add_dummy_rsc(node) + self.test_attributes(node) self.cleanup_metal(node) self.debug("Waiting for the cluster to recover") @@ -2902,11 +3002,201 @@ class RemoteBaremetal(CTSTest): def errorstoignore(self): '''Return list of errors which should be ignored''' - return [ """is running on remote1 which isn't allowed""", + return [ """is running on remote.*which isn't allowed""", """Connection terminated""", """Failed to send remote""", ] -AllTestClasses.append(RemoteBaremetal) +# Remote driver is called by other tests. + +################################################################### +class RemoteBasic(CTSTest): +################################################################### + def __init__(self, cm): + CTSTest.__init__(self,cm) + self.name = "RemoteBasic" + self.start = StartTest(cm) + self.startall = SimulStartLite(cm) + self.driver = RemoteDriver(cm) + self.is_docker_unsafe = 1 + + def __call__(self, node): + '''Perform the 'RemoteBaremetal' test. ''' + self.incr("calls") + + ret = self.startall(None) + if not ret: + return self.failure("Setup failed, start all nodes failed.") + + self.driver.setup_env(node) + self.driver.start_metal(node) + self.driver.add_dummy_rsc(node) + self.driver.test_attributes(node) + self.driver.cleanup_metal(node) + + self.debug("Waiting for the cluster to recover") + self.CM.cluster_stable() + if self.driver.failed == 1: + return self.failure(self.driver.fail_string) + + return self.success() + + def is_applicable(self): + return self.driver.is_applicable() + + def errorstoignore(self): + return self.driver.errorstoignore() + +AllTestClasses.append(RemoteBasic) + +################################################################### +class RemoteStonithd(CTSTest): +################################################################### + def __init__(self, cm): + CTSTest.__init__(self,cm) + self.name = "RemoteStonithd" + self.start = StartTest(cm) + self.startall = SimulStartLite(cm) + self.driver = RemoteDriver(cm) + self.is_docker_unsafe = 1 + + def __call__(self, node): + '''Perform the 'RemoteStonithd' test. ''' + self.incr("calls") + + ret = self.startall(None) + if not ret: + return self.failure("Setup failed, start all nodes failed.") + + self.driver.setup_env(node) + self.driver.start_metal(node) + self.driver.add_dummy_rsc(node) + + self.driver.fail_connection(node) + self.driver.cleanup_metal(node) + + self.debug("Waiting for the cluster to recover") + self.CM.cluster_stable() + if self.driver.failed == 1: + return self.failure(self.driver.fail_string) + + return self.success() + + def is_applicable(self): + if not self.driver.is_applicable(): + return False + + if self.Env.has_key("DoFencing"): + return self.Env["DoFencing"] + + return True + + def errorstoignore(self): + ignore_pats = [ + """Unexpected disconnect on remote-node""", + """error: process_lrm_event: Operation remote_.*_monitor""", + """LogActions: Recover remote_""", + """Calculated Transition .* /var/lib/pacemaker/pengine/pe-error""", + """error: native_create_actions: Resource .*ocf::.* is active on 2 nodes attempting recovery""", + ] + + ignore_pats.extend(self.driver.errorstoignore()) + return ignore_pats + +AllTestClasses.append(RemoteStonithd) + +################################################################### +class RemoteMigrate(CTSTest): +################################################################### + def __init__(self, cm): + CTSTest.__init__(self,cm) + self.name = "RemoteMigrate" + self.start = StartTest(cm) + self.startall = SimulStartLite(cm) + self.driver = RemoteDriver(cm) + self.is_docker_unsafe = 1 + + def __call__(self, node): + '''Perform the 'RemoteMigrate' test. ''' + self.incr("calls") + + ret = self.startall(None) + if not ret: + return self.failure("Setup failed, start all nodes failed.") + + self.driver.setup_env(node) + self.driver.start_metal(node) + self.driver.add_dummy_rsc(node) + self.driver.migrate_connection(node) + self.driver.cleanup_metal(node) + + self.debug("Waiting for the cluster to recover") + self.CM.cluster_stable() + if self.driver.failed == 1: + return self.failure(self.driver.fail_string) + + return self.success() + + def is_applicable(self): + return self.driver.is_applicable() + + def errorstoignore(self): + return self.driver.errorstoignore() + +AllTestClasses.append(RemoteMigrate) + + +################################################################### +class RemoteRscFailure(CTSTest): +################################################################### + def __init__(self, cm): + + # fail a rsc on a remote node, verify recovery. + CTSTest.__init__(self,cm) + self.name = "RemoteRscFailure" + self.start = StartTest(cm) + self.startall = SimulStartLite(cm) + self.driver = RemoteDriver(cm) + self.is_docker_unsafe = 1 + + def __call__(self, node): + '''Perform the 'RemoteRscFailure' test. ''' + self.incr("calls") + + ret = self.startall(None) + if not ret: + return self.failure("Setup failed, start all nodes failed.") + + self.driver.setup_env(node) + self.driver.start_metal(node) + self.driver.add_dummy_rsc(node) + + # This is an important step. We are migrating the connection + # before failing the resource. This verifies that the migration + # has properly maintained control over the remote-node. + self.driver.migrate_connection(node) + + self.driver.fail_rsc(node) + self.driver.cleanup_metal(node) + + self.debug("Waiting for the cluster to recover") + self.CM.cluster_stable() + if self.driver.failed == 1: + return self.failure(self.driver.fail_string) + + return self.success() + + def is_applicable(self): + return self.driver.is_applicable() + + def errorstoignore(self): + ignore_pats = [ + """LogActions: Recover remote-rsc""", + ] + + ignore_pats.extend(self.driver.errorstoignore()) + return ignore_pats + +AllTestClasses.append(RemoteRscFailure) # vim:ts=4:sw=4:et: diff --git a/cts/patterns.py b/cts/patterns.py index 8d34e1c..e734f40 100644 --- a/cts/patterns.py +++ b/cts/patterns.py @@ -56,6 +56,9 @@ class BasePatterns: "Pat:Fencing_ok" : "stonith.*remote_op_done:.*Operation .* of %s by .*: OK", "Pat:RscOpOK" : "process_lrm_event:.*Operation %s_%s.*ok.*confirmed", + "Pat:RscRemoteOpOK" : "process_lrm_event:.*Operation %s_%s.*ok.*node=%s, .*confirmed.*true", + "Pat:NodeFenced" : "tengine_stonith_notify:.*Peer %s was terminated .*: OK", + "Pat:FenceOpOK" : "Operation .* for host '%s' with device .* returned: 0", } def get_component(self, key): diff --git a/cts/watcher.py b/cts/watcher.py index 5e6ee43..41e4100 100644 --- a/cts/watcher.py +++ b/cts/watcher.py @@ -31,7 +31,8 @@ from cts.remote import * from cts.logging import * has_log_watcher = {} -log_watcher_bin = CTSvars.CRM_DAEMON_DIR + "/cts_log_watcher.py" +log_watcher_file = "cts_log_watcher.py" +log_watcher_bin = CTSvars.CRM_DAEMON_DIR + "/" + log_watcher_file log_watcher = """ import sys, os, fcntl @@ -164,14 +165,16 @@ class FileObj(SearchObj): global log_watcher global log_watcher_bin - self.debug("Installing %s on %s" % (log_watcher_bin, host)) + self.debug("Installing %s on %s" % (log_watcher_file, host)) - os.system("cat << END >> %s\n%s\nEND" %(log_watcher_bin, log_watcher)) - os.system("chmod 755 %s" %(log_watcher_bin)) + os.system("cat << END >> %s\n%s\nEND" %(log_watcher_file, log_watcher)) + os.system("chmod 755 %s" %(log_watcher_file)) - self.rsh.cp(log_watcher_bin, "root@%s:%s" % (host, log_watcher_bin)) + self.rsh.cp(log_watcher_file, "root@%s:%s" % (host, log_watcher_bin)) has_log_watcher[host] = 1 + os.system("rm -f %s" %(log_watcher_file)) + self.harvest() def async_complete(self, pid, returncode, outLines, errLines): diff --git a/doc/Makefile.am b/doc/Makefile.am index 8798365..9194f1d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -29,6 +29,7 @@ publican_docs = generated_docs = generated_mans = +ASCIIDOC_CLI_TYPE := pcs DOCBOOK_FORMATS := html-desktop DOCBOOK_LANGS := en-US DOTs = $(wildcard */en-US/images/*.dot) @@ -154,17 +155,15 @@ pdf: make DOCBOOK_FORMATS="pdf" ASCIIDOC_CLI_TYPE=$(ASCIIDOC_CLI_TYPE) all-local # Make sure www-(pcs|crmsh) happen in serial -www: - make www-pcs - make www-crmsh - make $(generated_docs) $(ascii) +www: clean-local $(generated_docs) $(ascii) + make www-cli rsync -rtz --progress $(generated_docs) $(ascii) $(asciiman) root@www.clusterlabs.org:/var/www/html/doc/ www-crmsh: make ASCIIDOC_CLI_TYPE=crmsh clean-local www-cli www-pcs: - make ASCIIDOC_CLI_TYPE=pcs clean-local www-cli + make ASCIIDOC_CLI_TYPE=pcs www-cli www-cli: for book in $(docbook); do \ diff --git a/doc/Pacemaker_Explained/en-US/Ch-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Options.txt index cf1478f..3a6ee0b 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Options.txt @@ -89,22 +89,22 @@ cluster cannot start resources or fence other nodes. See +no-quorum-policy+ below. | dc-version | -indexterm:[dc-version,Cluster Peroperty] -indexterm:[Cluster,Peroperty,dc-version] +indexterm:[dc-version,Cluster Property] +indexterm:[Cluster,Property,dc-version] Version of Pacemaker on the cluster's DC. Often includes the hash which identifies the exact Git changeset it was built from. Used for diagnostic purposes. | cluster-infrastructure | -indexterm:[cluster-infrastructure,Cluster Peroperty] -indexterm:[Cluster,Peroperty,cluster-infrastructure] +indexterm:[cluster-infrastructure,Cluster Property] +indexterm:[Cluster,Property,cluster-infrastructure] The messaging stack on which Pacemaker is currently running. Used for informational and diagnostic purposes. | expected-quorum-votes | -indexterm:[expected-quorum-votes,Cluster Peroperty] -indexterm:[Cluster,Peroperty,expected-quorum-votes] +indexterm:[expected-quorum-votes,Cluster Property] +indexterm:[Cluster,Property,expected-quorum-votes] The number of nodes expected to be in the cluster Used to calculate quorum in Corosync 1.x (not CMAN) based clusters. diff --git a/extra/resources/ping b/extra/resources/ping index b9a69b8..e7b9973 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -77,7 +77,7 @@ The name of the attributes to set. This is the name to be used in the constrain The number by which to multiply the number of connected ping nodes by Value multiplier - + @@ -93,7 +93,7 @@ The list of ping nodes to count. Number of ping attempts, per host, before declaring it dead no. of ping attempts - + @@ -121,6 +121,15 @@ Default never fails. + + +Use fping rather than ping, if found. If set to 0, fping +will not be used even if present. + +Use fping if available + + + Enables to use default attrd_updater verbose logging on every call. @@ -154,7 +163,7 @@ ping_conditional_log() { ping_usage() { cat <$f_out 2>$f_err; rc=$? active=`grep alive $f_out|wc -l` @@ -274,7 +283,7 @@ ping_check() { ping_update() { - if have_binary fping; then + if ocf_is_true "$OCF_RESKEY_use_fping" && have_binary fping; then fping_check active=$? else @@ -306,6 +315,7 @@ ping_update() { : ${OCF_RESKEY_multiplier:="1"} : ${OCF_RESKEY_debug:="false"} : ${OCF_RESKEY_failure_score:="0"} +: ${OCF_RESKEY_use_fping:="1"} : ${OCF_RESKEY_CRM_meta_timeout:="20000"} : ${OCF_RESKEY_CRM_meta_globally_unique:="true"} diff --git a/extra/resources/remote b/extra/resources/remote index 9f141a2..d79c4c3 100644 --- a/extra/resources/remote +++ b/extra/resources/remote @@ -58,12 +58,12 @@ meta_data() { tcp port to connect to. tcp port - + - - + + diff --git a/fencing/main.c b/fencing/main.c index b03659e..fe6560d 100644 --- a/fencing/main.c +++ b/fencing/main.c @@ -1002,15 +1002,22 @@ update_cib_cache_cb(const char *event, xmlNode * msg) stonith_enabled_s = crm_element_value(stonith_enabled_xml, XML_NVPAIR_ATTR_VALUE); } - if(daemon_option("watchdog")) { - stonith_watchdog_xml = get_xpath_object("//nvpair[@name='stonith-watchdog-timeout']", local_cib, LOG_TRACE); - } + if(daemon_option_enabled(crm_system_name, "watchdog")) { + const char *value = getenv("SBD_WATCHDOG_TIMEOUT"); - if (stonith_watchdog_xml) { - const char *value = crm_element_value(stonith_watchdog_xml, XML_NVPAIR_ATTR_VALUE); - stonith_watchdog_timeout_ms = crm_get_msec(value); - } else { - stonith_watchdog_timeout_ms = 0; + if(value == NULL) { + stonith_watchdog_xml = get_xpath_object("//nvpair[@name='stonith-watchdog-timeout']", local_cib, LOG_TRACE); + if (stonith_watchdog_xml) { + value = crm_element_value(stonith_watchdog_xml, XML_NVPAIR_ATTR_VALUE); + } + } + + if(value) { + stonith_watchdog_timeout_ms = crm_get_msec(value); + + } else { + stonith_watchdog_timeout_ms = 0; + } } if (stonith_enabled_s && crm_is_true(stonith_enabled_s) == FALSE) { @@ -1354,11 +1361,12 @@ main(int argc, char **argv) topology = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, free_topology_entry); - if(daemon_option("watchdog")) { + if(daemon_option_enabled(crm_system_name, "watchdog")) { xmlNode *xml; stonith_key_value_t *params = NULL; - stonith_key_value_add(params, STONITH_ATTR_HOSTLIST, stonith_our_uname); + params = stonith_key_value_add(params, STONITH_ATTR_HOSTLIST, stonith_our_uname); + xml = create_device_registration_xml("watchdog", "internal", STONITH_WATCHDOG_AGENT, params, NULL); stonith_device_register(xml, NULL, FALSE); diff --git a/fencing/remote.c b/fencing/remote.c index 3f4f5ca..63c0274 100644 --- a/fencing/remote.c +++ b/fencing/remote.c @@ -277,11 +277,9 @@ remote_op_done(remote_fencing_op_t * op, xmlNode * data, int rc, int dup) } if (!op->delegate && data) { - xmlNode *ndata = get_xpath_object("//@" F_STONITH_DELEGATE, data, LOG_WARNING); + xmlNode *ndata = get_xpath_object("//@" F_STONITH_DELEGATE, data, LOG_TRACE); if(ndata) { op->delegate = crm_element_value_copy(ndata, F_STONITH_DELEGATE); - } else { - op->delegate = crm_element_value_copy(data, F_ORIG); } } @@ -1055,9 +1053,10 @@ call_remote_stonith(remote_fencing_op_t * op, st_query_result_t * peer) } else { timeout_one = TIMEOUT_MULTIPLY_FACTOR * get_peer_timeout(peer, op->base_timeout); - crm_info("Requesting that %s perform op %s %s for %s (%ds)", - peer->host, op->action, op->target, op->client_name, timeout_one); + crm_info("Requesting that %s perform op %s %s for %s (%ds, %ds)", + peer->host, op->action, op->target, op->client_name, timeout_one, stonith_watchdog_timeout_ms); crm_xml_add(remote_op, F_STONITH_MODE, "smart"); + } op->state = st_exec; @@ -1065,7 +1064,17 @@ call_remote_stonith(remote_fencing_op_t * op, st_query_result_t * peer) g_source_remove(op->op_timer_one); } - if(device && stonith_watchdog_timeout_ms && safe_str_eq(device, "watchdog")) { + if(stonith_watchdog_timeout_ms > 0 && device && safe_str_eq(device, "watchdog")) { + crm_notice("Waiting %ds for %s to self-terminate for %s.%.8s (%p)", + stonith_watchdog_timeout_ms/1000, op->target, op->client_name, op->id, device); + op->op_timer_one = g_timeout_add(stonith_watchdog_timeout_ms, remote_op_watchdog_done, op); + + /* TODO: We should probably look into peer->device_list to verify watchdog is going to be in use */ + } else if(stonith_watchdog_timeout_ms > 0 + && safe_str_eq(peer->host, op->target) + && safe_str_neq(op->action, "on")) { + crm_notice("Waiting %ds for %s to self-terminate for %s.%.8s (%p)", + stonith_watchdog_timeout_ms/1000, op->target, op->client_name, op->id, device); op->op_timer_one = g_timeout_add(stonith_watchdog_timeout_ms, remote_op_watchdog_done, op); } else { @@ -1094,6 +1103,14 @@ call_remote_stonith(remote_fencing_op_t * op, st_query_result_t * peer) /* if the operation never left the query state, * but we have all the expected replies, then no devices * are available to execute the fencing operation. */ + if(stonith_watchdog_timeout_ms && (device == NULL || safe_str_eq(device, "watchdog"))) { + crm_notice("Waiting %ds for %s to self-terminate for %s.%.8s (%p)", + stonith_watchdog_timeout_ms/1000, op->target, op->client_name, op->id, device); + + op->op_timer_one = g_timeout_add(stonith_watchdog_timeout_ms, remote_op_watchdog_done, op); + return; + } + if (op->state == st_query) { crm_info("None of the %d peers have devices capable of terminating %s for %s (%d)", op->replies, op->target, op->client_name, op->state); diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index 1ff425c..d3c2643 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -86,6 +86,7 @@ # define XML_ATTR_QUORUM_PANIC "no-quorum-panic" # define XML_ATTR_HAVE_QUORUM "have-quorum" +# define XML_ATTR_HAVE_WATCHDOG "have-watchdog" # define XML_ATTR_EXPECTED_VOTES "expected-quorum-votes" # define XML_ATTR_GENERATION "epoch" # define XML_ATTR_GENERATION_ADMIN "admin_epoch" @@ -298,6 +299,8 @@ # define XML_CONS_TAG_RSC_SET "resource_set" # define XML_CONS_ATTR_SYMMETRICAL "symmetrical" +# define XML_LOCATION_ATTR_DISCOVERY "resource-discovery" + # define XML_COLOC_ATTR_SOURCE "rsc" # define XML_COLOC_ATTR_SOURCE_ROLE "rsc-role" # define XML_COLOC_ATTR_TARGET "with-rsc" @@ -321,6 +324,7 @@ # define XML_NVPAIR_ATTR_VALUE "value" # define XML_NODE_ATTR_STATE "state" +# define XML_NODE_ATTR_RSC_DISCOVERY "resource-discovery-enabled" # define XML_CONFIG_ATTR_DC_DEADTIME "dc-deadtime" # define XML_CONFIG_ATTR_ELECTION_FAIL "election-timeout" diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index d0ba856..f08a910 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -136,6 +136,8 @@ struct node_shared_s { gboolean shutdown; gboolean expected_up; gboolean is_dc; + gboolean rsc_discovery_enabled; + int num_resources; GListPtr running_rsc; /* resource_t* */ GListPtr allocated_rsc; /* resource_t* */ @@ -156,6 +158,7 @@ struct node_shared_s { struct node_s { int weight; gboolean fixed; + int rsc_discover_mode; int count; struct node_shared_s *details; }; @@ -252,6 +255,7 @@ struct resource_s { int migration_threshold; gboolean is_remote_node; + gboolean exclusive_discover; unsigned long long flags; diff --git a/lib/cib/cib_utils.c b/lib/cib/cib_utils.c index 022a8ab..15b354b 100644 --- a/lib/cib/cib_utils.c +++ b/lib/cib/cib_utils.c @@ -665,7 +665,7 @@ cib_native_callback(cib_t * cib, xmlNode * msg, int call_id, int rc) crm_trace("Invoking global callback for call %d", call_id); cib->op_callback(msg, call_id, rc, output); } - crm_trace("OP callback activated."); + crm_trace("OP callback activated for %d", call_id); } void diff --git a/lib/common/mainloop.c b/lib/common/mainloop.c index ac395ec..f2295ff 100644 --- a/lib/common/mainloop.c +++ b/lib/common/mainloop.c @@ -799,7 +799,7 @@ mainloop_add_fd(const char *name, int priority, int fd, void *userdata, { mainloop_io_t *client = NULL; - if (fd > 0) { + if (fd >= 0) { client = calloc(1, sizeof(mainloop_io_t)); client->name = strdup(name); client->userdata = userdata; diff --git a/lib/common/utils.c b/lib/common/utils.c index dc54e6d..6b8b12c 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -2008,6 +2008,7 @@ attrd_update_delegate(crm_ipc_t * ipc, char command, const char *host, const cha case 'u': crm_xml_add(update, F_ATTRD_TASK, "update"); crm_xml_add(update, F_ATTRD_REGEX, name); + break; case 'D': case 'U': case 'v': diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index 7d70f91..3c616cd 100644 --- a/lib/common/watchdog.c +++ b/lib/common/watchdog.c @@ -211,10 +211,10 @@ pcmk_panic_local(void) if(ppid > 1) { /* child daemon */ - crm_exit(pcmk_err_panic); + exit(pcmk_err_panic); } else { /* pacemakerd or orphan child */ - crm_exit(DAEMON_RESPAWN_STOP); + exit(DAEMON_RESPAWN_STOP); } } @@ -222,6 +222,7 @@ static void pcmk_panic_sbd(void) { union sigval signal_value; + pid_t ppid = getppid(); do_crm_log_always(LOG_EMERG, "Signaling sbd(%d) to panic", sbd_pid); @@ -232,7 +233,13 @@ pcmk_panic_sbd(void) pcmk_panic_local(); } - crm_exit(DAEMON_RESPAWN_STOP); + if(ppid > 1) { + /* child daemon */ + exit(pcmk_err_panic); + } else { + /* pacemakerd or orphan child */ + exit(DAEMON_RESPAWN_STOP); + } } void @@ -275,17 +282,27 @@ pcmk_locate_sbd(void) } /* Look for the pid file */ + pidfile = g_strdup_printf("%s/sbd.pid", HA_STATE_DIR); /* Read the pid file */ if(pidfile) { int rc = crm_pidfile_inuse(pidfile, 1); if(rc < pcmk_ok && rc != -ENOENT) { sbd_pid = crm_read_pidfile(pidfile); + crm_trace("SBD detected at pid=%d (file)"); } } - /* Fall back to /proc for systems that support it */ - sbd_pid = pcmk_locate_proc_entry("sbd"); + if(sbd_pid < 0) { + /* Fall back to /proc for systems that support it */ + sbd_pid = pcmk_locate_proc_entry("sbd"); + crm_trace("SBD detected at pid=%d (proc)"); + } + + if(sbd_pid < 0) { + sbd_pid = 0; + } + free(pidfile); return sbd_pid; } diff --git a/lib/common/xml.c b/lib/common/xml.c index 06de44c..58d0a00 100644 --- a/lib/common/xml.c +++ b/lib/common/xml.c @@ -386,6 +386,7 @@ static int __xml_build_schema_list(void) xslt = get_schema_path(NULL, transform); if(stat(xslt, &s) != 0) { crm_err("Transform %s not found", xslt); + free(xslt); __xml_schema_add(2, version, NULL, NULL, NULL, -1); break; } else { @@ -1950,9 +1951,11 @@ bool xml_patch_versions(xmlNode *patchset, int add[3], int del[3]) return -EINVAL; } - for(lpc = 0; lpc < DIMOF(vfields); lpc++) { - crm_element_value_int(tmp, vfields[lpc], &(del[lpc])); - crm_trace("Got %d for del[%s]", del[lpc], vfields[lpc]); + if (tmp) { + for(lpc = 0; lpc < DIMOF(vfields); lpc++) { + crm_element_value_int(tmp, vfields[lpc], &(del[lpc])); + crm_trace("Got %d for del[%s]", del[lpc], vfields[lpc]); + } } switch(format) { @@ -1973,9 +1976,11 @@ bool xml_patch_versions(xmlNode *patchset, int add[3], int del[3]) return -EINVAL; } - for(lpc = 0; lpc < DIMOF(vfields); lpc++) { - crm_element_value_int(tmp, vfields[lpc], &(add[lpc])); - crm_trace("Got %d for add[%s]", add[lpc], vfields[lpc]); + if (tmp) { + for(lpc = 0; lpc < DIMOF(vfields); lpc++) { + crm_element_value_int(tmp, vfields[lpc], &(add[lpc])); + crm_trace("Got %d for add[%s]", add[lpc], vfields[lpc]); + } } return pcmk_ok; diff --git a/lib/pengine/common.c b/lib/pengine/common.c index e98e1d3..e5e4ea7 100644 --- a/lib/pengine/common.c +++ b/lib/pengine/common.c @@ -106,6 +106,8 @@ pe_cluster_option pe_opts[] = { "Action to send to STONITH device", NULL }, { "stonith-timeout", NULL, "time", NULL, "60s", &check_timer, "How long to wait for the STONITH action to complete", NULL }, + { XML_ATTR_HAVE_WATCHDOG, NULL, "boolean", NULL, "false", &check_boolean, + "Enable watchdog integration", "Set automatically by the cluster if SBD is detected. User configured values are ignored." }, { "startup-fencing", "startup_fencing", "boolean", NULL, "true", &check_boolean, "STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" }, diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 7127c12..a19bdff 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -140,6 +140,12 @@ unpack_config(xmlNode * config, pe_working_set_t * data_set) crm_info("Startup probes: disabled (dangerous)"); } + value = pe_pref(data_set->config_hash, XML_ATTR_HAVE_WATCHDOG); + if (value && crm_is_true(value)) { + crm_notice("Relying on watchdog integration for fencing"); + set_bit(data_set->flags, pe_flag_have_stonith_resource); + } + value = pe_pref(data_set->config_hash, "stonith-timeout"); data_set->stonith_timeout = crm_get_msec(value); crm_debug("STONITH timeout: %d", data_set->stonith_timeout); @@ -294,6 +300,7 @@ create_node(const char *id, const char *uname, const char *type, const char *sco new_node->details->uname = uname; new_node->details->online = FALSE; new_node->details->shutdown = FALSE; + new_node->details->rsc_discovery_enabled = TRUE; new_node->details->running_rsc = NULL; new_node->details->type = node_ping; @@ -308,6 +315,13 @@ create_node(const char *id, const char *uname, const char *type, const char *sco new_node->details->attrs = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); + + if (is_remote_node(new_node)) { + g_hash_table_insert(new_node->details->attrs, strdup("#kind"), strdup("remote")); + } else { + g_hash_table_insert(new_node->details->attrs, strdup("#kind"), strdup("cluster")); + } + new_node->details->utilization = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); @@ -657,7 +671,10 @@ link_rsc2remotenode(pe_working_set_t *data_set, resource_t *new_rsc) * as cluster nodes. */ if (new_rsc->container == NULL) { handle_startup_fencing(data_set, remote_node); - return; + } else { + /* At this point we know if the remote node is a container or baremetal + * remote node, update the #kind attribute if a container is involved */ + g_hash_table_replace(remote_node->details->attrs, strdup("#kind"), strdup("container")); } } @@ -723,10 +740,12 @@ unpack_resources(xmlNode * xml_resources, pe_working_set_t * data_set) } data_set->resources = g_list_sort(data_set->resources, sort_rsc_priority); + if (is_set(data_set->flags, pe_flag_quick_location)) { + /* Ignore */ + + } else if (is_set(data_set->flags, pe_flag_stonith_enabled) + && is_set(data_set->flags, pe_flag_have_stonith_resource) == FALSE) { - if (is_not_set(data_set->flags, pe_flag_quick_location) - && is_set(data_set->flags, pe_flag_stonith_enabled) - && is_set(data_set->flags, pe_flag_have_stonith_resource) == FALSE) { crm_config_err("Resource start-up disabled since no STONITH resources have been defined"); crm_config_err("Either configure some or disable STONITH with the stonith-enabled option"); crm_config_err("NOTE: Clusters with shared data need STONITH to ensure data integrity"); @@ -988,6 +1007,7 @@ unpack_status(xmlNode * status, pe_working_set_t * data_set) if (crm_str_eq((const char *)state->name, XML_CIB_TAG_STATE, TRUE)) { xmlNode *attrs = NULL; + const char *resource_discovery_enabled = NULL; id = crm_element_value(state, XML_ATTR_ID); uname = crm_element_value(state, XML_ATTR_UNAME); @@ -1027,6 +1047,12 @@ unpack_status(xmlNode * status, pe_working_set_t * data_set) this_node->details->maintenance = TRUE; } + resource_discovery_enabled = g_hash_table_lookup(this_node->details->attrs, XML_NODE_ATTR_RSC_DISCOVERY); + if (resource_discovery_enabled && !crm_is_true(resource_discovery_enabled)) { + crm_warn("ignoring %s attribute on node %s, disabling resource discovery is not allowed on cluster nodes", + XML_NODE_ATTR_RSC_DISCOVERY, this_node->details->uname); + } + crm_trace("determining node state"); determine_online_status(state, this_node, data_set); @@ -1102,6 +1128,7 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set) /* process attributes */ for (state = __xml_first_child(status); state != NULL; state = __xml_next(state)) { + const char *resource_discovery_enabled = NULL; xmlNode *attrs = NULL; if (crm_str_eq((const char *)state->name, XML_CIB_TAG_STATE, TRUE) == FALSE) { continue; @@ -1125,6 +1152,26 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set) crm_info("Node %s is in standby-mode", this_node->details->uname); this_node->details->standby = TRUE; } + + if (crm_is_true(g_hash_table_lookup(this_node->details->attrs, "maintenance"))) { + crm_info("Node %s is in maintenance-mode", this_node->details->uname); + this_node->details->maintenance = TRUE; + } + + resource_discovery_enabled = g_hash_table_lookup(this_node->details->attrs, XML_NODE_ATTR_RSC_DISCOVERY); + if (resource_discovery_enabled && !crm_is_true(resource_discovery_enabled)) { + if (is_baremetal_remote_node(this_node) && is_not_set(data_set->flags, pe_flag_stonith_enabled)) { + crm_warn("ignoring %s attribute on baremetal remote node %s, disabling resource discovery requires stonith to be enabled.", + XML_NODE_ATTR_RSC_DISCOVERY, this_node->details->uname); + } else { + /* if we're here, this is either a baremetal node and fencing is enabled, + * or this is a container node which we don't care if fencing is enabled + * or not on. container nodes are 'fenced' by recovering the container resource + * regardless of whether fencing is enabled. */ + crm_info("Node %s has resource discovery disabled", this_node->details->uname); + this_node->details->rsc_discovery_enabled = FALSE; + } + } } /* process node rsc status */ @@ -1858,7 +1905,7 @@ process_rsc_state(resource_t * rsc, node_t * node, * reconnect to the remote-node in this transition or not. */ if (is_set(rsc->flags, pe_rsc_failed) && rsc->is_remote_node) { node_t *tmpnode = pe_find_node(data_set->nodes, rsc->id); - if (tmpnode->details->unclean) { + if (tmpnode && tmpnode->details->unclean) { tmpnode->details->unseen = FALSE; } } @@ -3050,8 +3097,7 @@ add_node_attrs(xmlNode * xml_obj, node_t * node, gboolean overwrite, pe_working_ g_hash_table_insert(node->details->attrs, strdup("#uname"), strdup(node->details->uname)); - g_hash_table_insert(node->details->attrs, - strdup("#kind"), strdup(node->details->remote_rsc?"container":"cluster")); + g_hash_table_insert(node->details->attrs, strdup("#" XML_ATTR_ID), strdup(node->details->id)); if (safe_str_eq(node->details->id, data_set->dc_uuid)) { data_set->dc_node = node; diff --git a/lib/services/dbus.c b/lib/services/dbus.c index 587589c..f4632f2 100644 --- a/lib/services/dbus.c +++ b/lib/services/dbus.c @@ -355,6 +355,11 @@ pcmk_dbus_get_property( DBusMessage *reply = pcmk_dbus_send_recv(msg, connection, NULL); output = pcmk_dbus_lookup_result(reply, query_data); + free(query_data->target); + free(query_data->object); + free(query_data->name); + free(query_data); + if(reply) { dbus_message_unref(reply); } diff --git a/lib/services/services.c b/lib/services/services.c index 8590b56..753e257 100644 --- a/lib/services/services.c +++ b/lib/services/services.c @@ -313,6 +313,7 @@ services_action_free(svc_action_t * op) if (op->opaque->repeat_timer) { g_source_remove(op->opaque->repeat_timer); + op->opaque->repeat_timer = 0; } if (op->opaque->stderr_gsource) { mainloop_del_fd(op->opaque->stderr_gsource); @@ -425,6 +426,7 @@ services_action_kick(const char *name, const char *action, int interval /* ms */ } else { if (op->opaque->repeat_timer) { g_source_remove(op->opaque->repeat_timer); + op->opaque->repeat_timer = 0; } recurring_action_timer(op); return TRUE; @@ -459,6 +461,7 @@ handle_duplicate_recurring(svc_action_t * op, void (*action_callback) (svc_actio if (dup->pid != 0) { if (op->opaque->repeat_timer) { g_source_remove(op->opaque->repeat_timer); + op->opaque->repeat_timer = 0; } recurring_action_timer(dup); } diff --git a/lib/services/services_linux.c b/lib/services/services_linux.c index 961ff18..2279e4e 100644 --- a/lib/services/services_linux.c +++ b/lib/services/services_linux.c @@ -227,6 +227,7 @@ recurring_action_timer(gpointer data) op->stdout_data = NULL; free(op->stderr_data); op->stderr_data = NULL; + op->opaque->repeat_timer = 0; services_action_async(op, NULL); return FALSE; diff --git a/lib/services/systemd.c b/lib/services/systemd.c index c967430..9a7b078 100644 --- a/lib/services/systemd.c +++ b/lib/services/systemd.c @@ -303,10 +303,14 @@ systemd_unit_listall(void) gboolean systemd_unit_exists(const char *name) { + char *unit = NULL; + /* Note: Makes a blocking dbus calls * Used by resources_find_service_class() when resource class=service */ - if(systemd_unit_by_name(name, NULL)) { + unit = systemd_unit_by_name(name, NULL); + if(unit) { + free(unit); return TRUE; } return FALSE; @@ -542,9 +546,15 @@ systemd_unit_exec_with_unit(svc_action_t * op, const char *unit) reply = pcmk_dbus_send_recv(msg, systemd_proxy, &error); systemd_exec_result(reply, op); + if(reply) { dbus_message_unref(reply); } + if(msg) { + dbus_message_unref(msg); + } + + return FALSE; } if(msg) { @@ -563,6 +573,8 @@ systemd_unit_exec_with_unit(svc_action_t * op, const char *unit) gboolean systemd_unit_exec(svc_action_t * op) { + char *unit = NULL; + CRM_ASSERT(op); CRM_ASSERT(systemd_init()); op->rc = PCMK_OCF_UNKNOWN_ERROR; @@ -580,7 +592,9 @@ systemd_unit_exec(svc_action_t * op) return TRUE; } - systemd_unit_by_name(op->agent, op); + unit = systemd_unit_by_name(op->agent, op); + free(unit); + if (op->synchronous == FALSE) { return TRUE; } diff --git a/lrmd/lrmd.c b/lrmd/lrmd.c index 7075b9f..d3ede18 100644 --- a/lrmd/lrmd.c +++ b/lrmd/lrmd.c @@ -837,7 +837,9 @@ action_complete(svc_action_t * action) } cmd_reset(cmd); - rsc->active = NULL; + if(rsc) { + rsc->active = NULL; + } schedule_lrmd_cmd(rsc, cmd); return; diff --git a/mcp/pacemaker.c b/mcp/pacemaker.c index ba3c88f..c7852c3 100644 --- a/mcp/pacemaker.c +++ b/mcp/pacemaker.c @@ -1038,6 +1038,10 @@ main(int argc, char **argv) crm_exit(ENOPROTOOPT); } + if(pcmk_locate_sbd() > 0) { + setenv("PCMK_watchdog", "true", 1); + } + find_and_track_existing_processes(); cluster.destroy = mcp_cpg_destroy; diff --git a/mcp/pacemaker.service.in b/mcp/pacemaker.service.in index b9f3336..7871167 100644 --- a/mcp/pacemaker.service.in +++ b/mcp/pacemaker.service.in @@ -18,6 +18,7 @@ KillMode=process NotifyAccess=main SysVStartPriority=99 EnvironmentFile=-@sysconfdir@/sysconfig/pacemaker +EnvironmentFile=-@sysconfdir@/sysconfig/sbd SuccessExitStatus=100 ExecStart=@sbindir@/pacemakerd -f diff --git a/pengine/allocate.c b/pengine/allocate.c index 8d02d9b..e708e26 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -755,7 +755,7 @@ apply_system_health(pe_working_set_t * data_set) for (; gIter2 != NULL; gIter2 = gIter2->next) { resource_t *rsc = (resource_t *) gIter2->data; - rsc2node_new(health_strategy, rsc, system_health, node, data_set); + rsc2node_new(health_strategy, rsc, system_health, NULL, node, data_set); } } @@ -861,6 +861,10 @@ probe_resources(pe_working_set_t * data_set) /* TODO enable container node probes once ordered probing is implemented. */ continue; + } else if (node->details->rsc_discovery_enabled == FALSE) { + /* resource discovery is disabled for this node */ + continue; + } else if (probe_complete == NULL) { probe_complete = get_pseudo_op(CRM_OP_PROBED, data_set); if (is_set(data_set->flags, pe_flag_have_remote_nodes)) { diff --git a/pengine/constraints.c b/pengine/constraints.c index 1aa848e..88e382b 100644 --- a/pengine/constraints.c +++ b/pengine/constraints.c @@ -658,6 +658,7 @@ unpack_rsc_location(xmlNode * xml_obj, resource_t * rsc_lh, const char * role, const char *id_lh = crm_element_value(xml_obj, XML_COLOC_ATTR_SOURCE); const char *id = crm_element_value(xml_obj, XML_ATTR_ID); const char *node = crm_element_value(xml_obj, XML_CIB_TAG_NODE); + const char *discovery = crm_element_value(xml_obj, XML_LOCATION_ATTR_DISCOVERY); if (rsc_lh == NULL) { /* only a warn as BSC adds the constraint then the resource */ @@ -676,7 +677,7 @@ unpack_rsc_location(xmlNode * xml_obj, resource_t * rsc_lh, const char * role, if (!match) { return FALSE; } - location = rsc2node_new(id, rsc_lh, score_i, match, data_set); + location = rsc2node_new(id, rsc_lh, score_i, discovery, match, data_set); } else { xmlNode *rule_xml = NULL; @@ -720,6 +721,7 @@ unpack_rsc_location(xmlNode * xml_obj, resource_t * rsc_lh, const char * role, } } } + return TRUE; } @@ -958,7 +960,7 @@ generate_location_rule(resource_t * rsc, xmlNode * rule_xml, pe_working_set_t * do_and = FALSE; } - location_rule = rsc2node_new(rule_id, rsc, 0, NULL, data_set); + location_rule = rsc2node_new(rule_id, rsc, 0, NULL, NULL, data_set); if (location_rule == NULL) { return NULL; diff --git a/pengine/native.c b/pengine/native.c index 5db8c60..0020344 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -2097,9 +2097,14 @@ native_rsc_location(resource_t * rsc, rsc_to_node_t * constraint) other_node->weight = merge_weights(other_node->weight, node->weight); } else { - node_t *new_node = node_copy(node); + other_node = node_copy(node); - g_hash_table_insert(rsc->allowed_nodes, (gpointer) new_node->details->id, new_node); + g_hash_table_insert(rsc->allowed_nodes, (gpointer) other_node->details->id, other_node); + } + + if (other_node->rsc_discover_mode < constraint->discover_mode) { + /* exclusive > never > always... always is default */ + other_node->rsc_discover_mode = constraint->discover_mode; } } @@ -2704,6 +2709,7 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete, char *key = NULL; action_t *probe = NULL; node_t *running = NULL; + node_t *allowed = NULL; resource_t *top = uber_parent(rsc); static const char *rc_master = NULL; @@ -2780,6 +2786,23 @@ native_create_probe(resource_t * rsc, node_t * node, action_t * complete, return FALSE; } + allowed = g_hash_table_lookup(rsc->allowed_nodes, node->details->id); + if (rsc->exclusive_discover || top->exclusive_discover) { + if (allowed == NULL) { + /* exclusive discover is enabled and this node is not in the allowed list. */ + return FALSE; + } else if (allowed->rsc_discover_mode != discover_exclusive) { + /* exclusive discover is enabled and this node is not marked + * as a node this resource should be discovered on */ + return FALSE; + } + } + if (allowed && allowed->rsc_discover_mode == discover_never) { + /* this resource is marked as not needing to be discovered on this node */ + return FALSE; + } + + key = generate_op_key(rsc->id, RSC_STATUS, 0); probe = custom_action(rsc, key, RSC_STATUS, node, FALSE, TRUE, data_set); update_action_flags(probe, pe_action_optional | pe_action_clear); diff --git a/pengine/pengine.h b/pengine/pengine.h index 653fadf..87fa150 100644 --- a/pengine/pengine.h +++ b/pengine/pengine.h @@ -75,11 +75,18 @@ struct rsc_ticket_s { int role_lh; }; +enum rsc_discover_e { + discover_always = 0, + discover_never, + discover_exclusive, +}; + struct rsc_to_node_s { const char *id; resource_t *rsc_lh; enum rsc_role_e role_filter; + enum rsc_discover_e discover_mode; GListPtr node_list_rh; /* node_t* */ }; diff --git a/pengine/regression.sh b/pengine/regression.sh index bdc7d3a..a9a5605 100755 --- a/pengine/regression.sh +++ b/pengine/regression.sh @@ -768,5 +768,10 @@ do_test remote-disable "Disable a baremetal remote-node" do_test remote-orphaned "Properly shutdown orphaned connection resource" do_test remote-recover "Recover connection resource after cluster-node fails." do_test remote-stale-node-entry "Make sure we properly handle leftover remote-node entries in the node section" + +echo "" +do_test resource-discovery "Exercises resource-discovery location constraint option." +do_test rsc-discovery-per-node "Disable resource discovery per node" + echo "" test_results diff --git a/pengine/test10/remote-disable.dot b/pengine/test10/remote-disable.dot index 2e21fef..fbcea60 100644 --- a/pengine/test10/remote-disable.dot +++ b/pengine/test10/remote-disable.dot @@ -1,8 +1,4 @@ digraph "g" { -"FAKE2_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] -"FAKE2_start_0 18builder" -> "FAKE2_monitor_60000 18builder" [ style = bold] -"FAKE2_start_0 18builder" [ style=bold color="green" fontcolor="black"] -"FAKE2_stop_0 remote1" -> "FAKE2_start_0 18builder" [ style = bold] "FAKE2_stop_0 remote1" -> "all_stopped" [ style = bold] "FAKE2_stop_0 remote1" -> "remote1_stop_0 18builder" [ style = bold] "FAKE2_stop_0 remote1" [ style=bold color="green" fontcolor="black"] diff --git a/pengine/test10/remote-disable.exp b/pengine/test10/remote-disable.exp index 3273bb2..99c1c55 100644 --- a/pengine/test10/remote-disable.exp +++ b/pengine/test10/remote-disable.exp @@ -14,32 +14,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -47,7 +21,7 @@ - + diff --git a/pengine/test10/remote-disable.scores b/pengine/test10/remote-disable.scores index 4efd7d8..d66861f 100644 --- a/pengine/test10/remote-disable.scores +++ b/pengine/test10/remote-disable.scores @@ -3,9 +3,9 @@ native_color: FAKE1 allocation score on 18builder: 0 native_color: FAKE1 allocation score on 18node1: 0 native_color: FAKE1 allocation score on 18node2: 0 native_color: FAKE1 allocation score on remote1: 0 -native_color: FAKE2 allocation score on 18builder: 0 -native_color: FAKE2 allocation score on 18node1: 0 -native_color: FAKE2 allocation score on 18node2: 0 +native_color: FAKE2 allocation score on 18builder: -INFINITY +native_color: FAKE2 allocation score on 18node1: -INFINITY +native_color: FAKE2 allocation score on 18node2: -INFINITY native_color: FAKE2 allocation score on remote1: 0 native_color: FAKE3 allocation score on 18builder: 0 native_color: FAKE3 allocation score on 18node1: 0 diff --git a/pengine/test10/remote-disable.summary b/pengine/test10/remote-disable.summary index 57b06fe..0627647 100644 --- a/pengine/test10/remote-disable.summary +++ b/pengine/test10/remote-disable.summary @@ -12,14 +12,12 @@ RemoteOnline: [ remote1 ] Transition Summary: * Stop remote1 (18builder) - * Move FAKE2 (Started remote1 -> 18builder) + * Stop FAKE2 (remote1) Executing cluster transition: * Resource action: FAKE2 stop on remote1 * Resource action: remote1 stop on 18builder - * Resource action: FAKE2 start on 18builder * Pseudo action: all_stopped - * Resource action: FAKE2 monitor=60000 on 18builder Revised cluster status: Online: [ 18builder 18node1 18node2 ] @@ -28,7 +26,7 @@ RemoteOFFLINE: [ remote1 ] shooter (stonith:fence_xvm): Started 18node1 remote1 (ocf::pacemaker:remote): Stopped FAKE1 (ocf::heartbeat:Dummy): Started 18node2 - FAKE2 (ocf::heartbeat:Dummy): Started 18builder + FAKE2 (ocf::heartbeat:Dummy): Stopped FAKE3 (ocf::heartbeat:Dummy): Started 18builder FAKE4 (ocf::heartbeat:Dummy): Started 18node1 diff --git a/pengine/test10/remote-disable.xml b/pengine/test10/remote-disable.xml index eae0055..1637801 100644 --- a/pengine/test10/remote-disable.xml +++ b/pengine/test10/remote-disable.xml @@ -52,7 +52,13 @@ - + + + + + + + diff --git a/pengine/test10/resource-discovery.dot b/pengine/test10/resource-discovery.dot new file mode 100644 index 0000000..efb2434 --- /dev/null +++ b/pengine/test10/resource-discovery.dot @@ -0,0 +1,185 @@ + digraph "g" { +"FAKE1_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKE1_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKE1_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKE1_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE1_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE1_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE1_start_0 18node2" -> "FAKE1_monitor_60000 18node2" [ style = bold] +"FAKE1_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE2_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE2_start_0 18node3" -> "FAKE2_monitor_60000 18node3" [ style = bold] +"FAKE2_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE2_stop_0 18node2" -> "FAKE2_start_0 18node3" [ style = bold] +"FAKE2_stop_0 18node2" -> "all_stopped" [ style = bold] +"FAKE2_stop_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE3_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE3_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE3_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE3_start_0 18node3" -> "FAKE3_monitor_60000 18node3" [ style = bold] +"FAKE3_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE3_stop_0 18builder" -> "FAKE3_start_0 18node3" [ style = bold] +"FAKE3_stop_0 18builder" -> "all_stopped" [ style = bold] +"FAKE3_stop_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE4_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE4_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE4_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE4_start_0 18node4" -> "FAKE4_monitor_60000 18node4" [ style = bold] +"FAKE4_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE4_stop_0 18node1" -> "FAKE4_start_0 18node4" [ style = bold] +"FAKE4_stop_0 18node1" -> "all_stopped" [ style = bold] +"FAKE4_stop_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKE5_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKE5_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKE5_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE5_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE5_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 remote1" -> "probe_complete remote1" [ style = bold] +"FAKE5_monitor_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKE5_start_0 remote1" -> "FAKE5_monitor_60000 remote1" [ style = bold] +"FAKE5_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1-clone_running_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:0_start_0 18builder" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:1_start_0 18node1" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:2_start_0 18node2" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:3_start_0 18node4" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:5_start_0 18node3" [ style = bold] +"FAKECLONE1-clone_start_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE1:0_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:0_start_0 18builder" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:0_start_0 18builder" -> "FAKECLONE1:0_monitor_60000 18builder" [ style = bold] +"FAKECLONE1:0_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:1_monitor_60000 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:1_start_0 18node1" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:1_start_0 18node1" -> "FAKECLONE1:1_monitor_60000 18node1" [ style = bold] +"FAKECLONE1:1_start_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:2_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:2_start_0 18node2" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:2_start_0 18node2" -> "FAKECLONE1:2_monitor_60000 18node2" [ style = bold] +"FAKECLONE1:2_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:3_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:3_start_0 18node4" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:3_start_0 18node4" -> "FAKECLONE1:3_monitor_60000 18node4" [ style = bold] +"FAKECLONE1:3_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:4_monitor_0 remote1" -> "probe_complete remote1" [ style = bold] +"FAKECLONE1:4_monitor_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:4_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:4_start_0 remote1" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:4_start_0 remote1" -> "FAKECLONE1:4_monitor_60000 remote1" [ style = bold] +"FAKECLONE1:4_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:5_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:5_start_0 18node3" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:5_start_0 18node3" -> "FAKECLONE1:5_monitor_60000 18node3" [ style = bold] +"FAKECLONE1:5_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2-clone_running_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:0_start_0 18builder" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:1_start_0 18node1" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:2_start_0 18node2" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:3_start_0 18node4" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:5_start_0 18node3" [ style = bold] +"FAKECLONE2-clone_start_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE2:0_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKECLONE2:0_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:0_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:0_start_0 18builder" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:0_start_0 18builder" -> "FAKECLONE2:0_monitor_60000 18builder" [ style = bold] +"FAKECLONE2:0_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKECLONE2:1_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_monitor_60000 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_start_0 18node1" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:1_start_0 18node1" -> "FAKECLONE2:1_monitor_60000 18node1" [ style = bold] +"FAKECLONE2:1_start_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:2_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:2_start_0 18node2" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:2_start_0 18node2" -> "FAKECLONE2:2_monitor_60000 18node2" [ style = bold] +"FAKECLONE2:2_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKECLONE2:3_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_start_0 18node4" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:3_start_0 18node4" -> "FAKECLONE2:3_monitor_60000 18node4" [ style = bold] +"FAKECLONE2:3_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:4_monitor_0 remote1" -> "probe_complete remote1" [ style = bold] +"FAKECLONE2:4_monitor_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:4_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:4_start_0 remote1" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:4_start_0 remote1" -> "FAKECLONE2:4_monitor_60000 remote1" [ style = bold] +"FAKECLONE2:4_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKECLONE2:5_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_start_0 18node3" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:5_start_0 18node3" -> "FAKECLONE2:5_monitor_60000 18node3" [ style = bold] +"FAKECLONE2:5_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"all_stopped" [ style=bold color="green" fontcolor="orange"] +"probe_complete 18builder" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18builder" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node1" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node1" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node2" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node2" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node3" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node3" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node4" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node4" [ style=bold color="green" fontcolor="black"] +"probe_complete remote1" -> "probe_complete" [ style = bold] +"probe_complete remote1" [ style=bold color="green" fontcolor="black"] +"probe_complete" -> "FAKE1_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKE2_stop_0 18node2" [ style = bold] +"probe_complete" -> "FAKE3_start_0 18node3" [ style = bold] +"probe_complete" -> "FAKE3_stop_0 18builder" [ style = bold] +"probe_complete" -> "FAKE4_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKE4_stop_0 18node1" [ style = bold] +"probe_complete" -> "FAKE5_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKECLONE1:0_start_0 18builder" [ style = bold] +"probe_complete" -> "FAKECLONE1:1_start_0 18node1" [ style = bold] +"probe_complete" -> "FAKECLONE1:2_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKECLONE1:3_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKECLONE1:5_start_0 18node3" [ style = bold] +"probe_complete" -> "FAKECLONE2:0_start_0 18builder" [ style = bold] +"probe_complete" -> "FAKECLONE2:1_start_0 18node1" [ style = bold] +"probe_complete" -> "FAKECLONE2:2_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKECLONE2:3_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKECLONE2:5_start_0 18node3" [ style = bold] +"probe_complete" [ style=bold color="green" fontcolor="orange"] +"probe_nodes_complete" -> "remote1_start_0 18builder" [ style = bold] +"probe_nodes_complete" [ style=bold color="green" fontcolor="orange"] +"remote1_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"remote1_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"remote1_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"remote1_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"remote1_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"remote1_start_0 18builder" -> "FAKE5_monitor_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKE5_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKE5_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE1:4_monitor_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE1:4_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE2:4_monitor_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE2:4_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "remote1_monitor_60000 18builder" [ style = bold] +"remote1_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"shooter_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"shooter_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"shooter_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"shooter_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +} diff --git a/pengine/test10/resource-discovery.exp b/pengine/test10/resource-discovery.exp new file mode 100644 index 0000000..2770f4e --- /dev/null +++ b/pengine/test10/resource-discovery.exp @@ -0,0 +1,1041 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/resource-discovery.scores b/pengine/test10/resource-discovery.scores new file mode 100644 index 0000000..e1fa78e --- /dev/null +++ b/pengine/test10/resource-discovery.scores @@ -0,0 +1,199 @@ +Allocation scores: +clone_color: FAKECLONE1-clone allocation score on 18builder: 0 +clone_color: FAKECLONE1-clone allocation score on 18node1: 0 +clone_color: FAKECLONE1-clone allocation score on 18node2: 0 +clone_color: FAKECLONE1-clone allocation score on 18node3: 0 +clone_color: FAKECLONE1-clone allocation score on 18node4: 0 +clone_color: FAKECLONE1-clone allocation score on remote1: 0 +clone_color: FAKECLONE1:0 allocation score on 18builder: 0 +clone_color: FAKECLONE1:0 allocation score on 18node1: 0 +clone_color: FAKECLONE1:0 allocation score on 18node2: 0 +clone_color: FAKECLONE1:0 allocation score on 18node3: 0 +clone_color: FAKECLONE1:0 allocation score on 18node4: 0 +clone_color: FAKECLONE1:0 allocation score on remote1: 0 +clone_color: FAKECLONE1:1 allocation score on 18builder: 0 +clone_color: FAKECLONE1:1 allocation score on 18node1: 0 +clone_color: FAKECLONE1:1 allocation score on 18node2: 0 +clone_color: FAKECLONE1:1 allocation score on 18node3: 0 +clone_color: FAKECLONE1:1 allocation score on 18node4: 0 +clone_color: FAKECLONE1:1 allocation score on remote1: 0 +clone_color: FAKECLONE1:2 allocation score on 18builder: 0 +clone_color: FAKECLONE1:2 allocation score on 18node1: 0 +clone_color: FAKECLONE1:2 allocation score on 18node2: 0 +clone_color: FAKECLONE1:2 allocation score on 18node3: 0 +clone_color: FAKECLONE1:2 allocation score on 18node4: 0 +clone_color: FAKECLONE1:2 allocation score on remote1: 0 +clone_color: FAKECLONE1:3 allocation score on 18builder: 0 +clone_color: FAKECLONE1:3 allocation score on 18node1: 0 +clone_color: FAKECLONE1:3 allocation score on 18node2: 0 +clone_color: FAKECLONE1:3 allocation score on 18node3: 0 +clone_color: FAKECLONE1:3 allocation score on 18node4: 0 +clone_color: FAKECLONE1:3 allocation score on remote1: 0 +clone_color: FAKECLONE1:4 allocation score on 18builder: 0 +clone_color: FAKECLONE1:4 allocation score on 18node1: 0 +clone_color: FAKECLONE1:4 allocation score on 18node2: 0 +clone_color: FAKECLONE1:4 allocation score on 18node3: 0 +clone_color: FAKECLONE1:4 allocation score on 18node4: 0 +clone_color: FAKECLONE1:4 allocation score on remote1: 0 +clone_color: FAKECLONE1:5 allocation score on 18builder: 0 +clone_color: FAKECLONE1:5 allocation score on 18node1: 0 +clone_color: FAKECLONE1:5 allocation score on 18node2: 0 +clone_color: FAKECLONE1:5 allocation score on 18node3: 0 +clone_color: FAKECLONE1:5 allocation score on 18node4: 0 +clone_color: FAKECLONE1:5 allocation score on remote1: 0 +clone_color: FAKECLONE2-clone allocation score on 18builder: 0 +clone_color: FAKECLONE2-clone allocation score on 18node1: 0 +clone_color: FAKECLONE2-clone allocation score on 18node2: 0 +clone_color: FAKECLONE2-clone allocation score on 18node3: 0 +clone_color: FAKECLONE2-clone allocation score on 18node4: 0 +clone_color: FAKECLONE2-clone allocation score on remote1: 0 +clone_color: FAKECLONE2:0 allocation score on 18builder: 0 +clone_color: FAKECLONE2:0 allocation score on 18node1: 0 +clone_color: FAKECLONE2:0 allocation score on 18node2: 0 +clone_color: FAKECLONE2:0 allocation score on 18node3: 0 +clone_color: FAKECLONE2:0 allocation score on 18node4: 0 +clone_color: FAKECLONE2:0 allocation score on remote1: 0 +clone_color: FAKECLONE2:1 allocation score on 18builder: 0 +clone_color: FAKECLONE2:1 allocation score on 18node1: 0 +clone_color: FAKECLONE2:1 allocation score on 18node2: 0 +clone_color: FAKECLONE2:1 allocation score on 18node3: 0 +clone_color: FAKECLONE2:1 allocation score on 18node4: 0 +clone_color: FAKECLONE2:1 allocation score on remote1: 0 +clone_color: FAKECLONE2:2 allocation score on 18builder: 0 +clone_color: FAKECLONE2:2 allocation score on 18node1: 0 +clone_color: FAKECLONE2:2 allocation score on 18node2: 0 +clone_color: FAKECLONE2:2 allocation score on 18node3: 0 +clone_color: FAKECLONE2:2 allocation score on 18node4: 0 +clone_color: FAKECLONE2:2 allocation score on remote1: 0 +clone_color: FAKECLONE2:3 allocation score on 18builder: 0 +clone_color: FAKECLONE2:3 allocation score on 18node1: 0 +clone_color: FAKECLONE2:3 allocation score on 18node2: 0 +clone_color: FAKECLONE2:3 allocation score on 18node3: 0 +clone_color: FAKECLONE2:3 allocation score on 18node4: 0 +clone_color: FAKECLONE2:3 allocation score on remote1: 0 +clone_color: FAKECLONE2:4 allocation score on 18builder: 0 +clone_color: FAKECLONE2:4 allocation score on 18node1: 0 +clone_color: FAKECLONE2:4 allocation score on 18node2: 0 +clone_color: FAKECLONE2:4 allocation score on 18node3: 0 +clone_color: FAKECLONE2:4 allocation score on 18node4: 0 +clone_color: FAKECLONE2:4 allocation score on remote1: 0 +clone_color: FAKECLONE2:5 allocation score on 18builder: 0 +clone_color: FAKECLONE2:5 allocation score on 18node1: 0 +clone_color: FAKECLONE2:5 allocation score on 18node2: 0 +clone_color: FAKECLONE2:5 allocation score on 18node3: 0 +clone_color: FAKECLONE2:5 allocation score on 18node4: 0 +clone_color: FAKECLONE2:5 allocation score on remote1: 0 +native_color: FAKE1 allocation score on 18builder: 0 +native_color: FAKE1 allocation score on 18node1: 0 +native_color: FAKE1 allocation score on 18node2: 0 +native_color: FAKE1 allocation score on 18node3: 0 +native_color: FAKE1 allocation score on 18node4: 0 +native_color: FAKE1 allocation score on remote1: -INFINITY +native_color: FAKE2 allocation score on 18builder: 0 +native_color: FAKE2 allocation score on 18node1: 0 +native_color: FAKE2 allocation score on 18node2: -INFINITY +native_color: FAKE2 allocation score on 18node3: 0 +native_color: FAKE2 allocation score on 18node4: 0 +native_color: FAKE2 allocation score on remote1: 0 +native_color: FAKE3 allocation score on 18builder: 0 +native_color: FAKE3 allocation score on 18node1: 0 +native_color: FAKE3 allocation score on 18node2: 0 +native_color: FAKE3 allocation score on 18node3: INFINITY +native_color: FAKE3 allocation score on 18node4: 0 +native_color: FAKE3 allocation score on remote1: 0 +native_color: FAKE4 allocation score on 18builder: 0 +native_color: FAKE4 allocation score on 18node1: 0 +native_color: FAKE4 allocation score on 18node2: 0 +native_color: FAKE4 allocation score on 18node3: 0 +native_color: FAKE4 allocation score on 18node4: 0 +native_color: FAKE4 allocation score on remote1: 0 +native_color: FAKE5 allocation score on 18builder: 0 +native_color: FAKE5 allocation score on 18node1: 0 +native_color: FAKE5 allocation score on 18node2: 0 +native_color: FAKE5 allocation score on 18node3: 0 +native_color: FAKE5 allocation score on 18node4: 0 +native_color: FAKE5 allocation score on remote1: 0 +native_color: FAKECLONE1:0 allocation score on 18builder: 0 +native_color: FAKECLONE1:0 allocation score on 18node1: 0 +native_color: FAKECLONE1:0 allocation score on 18node2: 0 +native_color: FAKECLONE1:0 allocation score on 18node3: 0 +native_color: FAKECLONE1:0 allocation score on 18node4: 0 +native_color: FAKECLONE1:0 allocation score on remote1: 0 +native_color: FAKECLONE1:1 allocation score on 18builder: -INFINITY +native_color: FAKECLONE1:1 allocation score on 18node1: 0 +native_color: FAKECLONE1:1 allocation score on 18node2: 0 +native_color: FAKECLONE1:1 allocation score on 18node3: 0 +native_color: FAKECLONE1:1 allocation score on 18node4: 0 +native_color: FAKECLONE1:1 allocation score on remote1: 0 +native_color: FAKECLONE1:2 allocation score on 18builder: -INFINITY +native_color: FAKECLONE1:2 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:2 allocation score on 18node2: 0 +native_color: FAKECLONE1:2 allocation score on 18node3: 0 +native_color: FAKECLONE1:2 allocation score on 18node4: 0 +native_color: FAKECLONE1:2 allocation score on remote1: 0 +native_color: FAKECLONE1:3 allocation score on 18builder: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node3: 0 +native_color: FAKECLONE1:3 allocation score on 18node4: 0 +native_color: FAKECLONE1:3 allocation score on remote1: 0 +native_color: FAKECLONE1:4 allocation score on 18builder: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node3: 0 +native_color: FAKECLONE1:4 allocation score on 18node4: -INFINITY +native_color: FAKECLONE1:4 allocation score on remote1: 0 +native_color: FAKECLONE1:5 allocation score on 18builder: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node3: 0 +native_color: FAKECLONE1:5 allocation score on 18node4: -INFINITY +native_color: FAKECLONE1:5 allocation score on remote1: -INFINITY +native_color: FAKECLONE2:0 allocation score on 18builder: 0 +native_color: FAKECLONE2:0 allocation score on 18node1: 0 +native_color: FAKECLONE2:0 allocation score on 18node2: 0 +native_color: FAKECLONE2:0 allocation score on 18node3: 0 +native_color: FAKECLONE2:0 allocation score on 18node4: 0 +native_color: FAKECLONE2:0 allocation score on remote1: 0 +native_color: FAKECLONE2:1 allocation score on 18builder: -INFINITY +native_color: FAKECLONE2:1 allocation score on 18node1: 0 +native_color: FAKECLONE2:1 allocation score on 18node2: 0 +native_color: FAKECLONE2:1 allocation score on 18node3: 0 +native_color: FAKECLONE2:1 allocation score on 18node4: 0 +native_color: FAKECLONE2:1 allocation score on remote1: 0 +native_color: FAKECLONE2:2 allocation score on 18builder: -INFINITY +native_color: FAKECLONE2:2 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:2 allocation score on 18node2: 0 +native_color: FAKECLONE2:2 allocation score on 18node3: 0 +native_color: FAKECLONE2:2 allocation score on 18node4: 0 +native_color: FAKECLONE2:2 allocation score on remote1: 0 +native_color: FAKECLONE2:3 allocation score on 18builder: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node3: 0 +native_color: FAKECLONE2:3 allocation score on 18node4: 0 +native_color: FAKECLONE2:3 allocation score on remote1: 0 +native_color: FAKECLONE2:4 allocation score on 18builder: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node3: 0 +native_color: FAKECLONE2:4 allocation score on 18node4: -INFINITY +native_color: FAKECLONE2:4 allocation score on remote1: 0 +native_color: FAKECLONE2:5 allocation score on 18builder: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node3: 0 +native_color: FAKECLONE2:5 allocation score on 18node4: -INFINITY +native_color: FAKECLONE2:5 allocation score on remote1: -INFINITY +native_color: remote1 allocation score on 18builder: 0 +native_color: remote1 allocation score on 18node1: 0 +native_color: remote1 allocation score on 18node2: 0 +native_color: remote1 allocation score on 18node3: 0 +native_color: remote1 allocation score on 18node4: 0 +native_color: remote1 allocation score on remote1: -INFINITY +native_color: shooter allocation score on 18builder: 0 +native_color: shooter allocation score on 18node1: 0 +native_color: shooter allocation score on 18node2: 0 +native_color: shooter allocation score on 18node3: 0 +native_color: shooter allocation score on 18node4: 0 +native_color: shooter allocation score on remote1: -INFINITY diff --git a/pengine/test10/resource-discovery.summary b/pengine/test10/resource-discovery.summary new file mode 100644 index 0000000..af0e5b3 --- /dev/null +++ b/pengine/test10/resource-discovery.summary @@ -0,0 +1,124 @@ + +Current cluster status: +Online: [ 18builder 18node1 18node2 18node3 18node4 ] +RemoteOFFLINE: [ remote1 ] + + shooter (stonith:fence_xvm): Started 18node1 + remote1 (ocf::pacemaker:remote): Stopped + FAKE1 (ocf::heartbeat:Dummy): Stopped + FAKE2 (ocf::heartbeat:Dummy): Started 18node2 + FAKE3 (ocf::heartbeat:Dummy): Started 18builder + FAKE4 (ocf::heartbeat:Dummy): Started 18node1 + FAKE5 (ocf::heartbeat:Dummy): Stopped + Clone Set: FAKECLONE1-clone [FAKECLONE1] + Stopped: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + Clone Set: FAKECLONE2-clone [FAKECLONE2] + Stopped: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + +Transition Summary: + * Start remote1 (18builder) + * Start FAKE1 (18node2) + * Move FAKE2 (Started 18node2 -> 18node3) + * Move FAKE3 (Started 18builder -> 18node3) + * Move FAKE4 (Started 18node1 -> 18node4) + * Start FAKE5 (remote1) + * Start FAKECLONE1:0 (18builder) + * Start FAKECLONE1:1 (18node1) + * Start FAKECLONE1:2 (18node2) + * Start FAKECLONE1:3 (18node4) + * Start FAKECLONE1:4 (remote1) + * Start FAKECLONE1:5 (18node3) + * Start FAKECLONE2:0 (18builder) + * Start FAKECLONE2:1 (18node1) + * Start FAKECLONE2:2 (18node2) + * Start FAKECLONE2:3 (18node4) + * Start FAKECLONE2:4 (remote1) + * Start FAKECLONE2:5 (18node3) + +Executing cluster transition: + * Resource action: shooter monitor on 18node4 + * Resource action: shooter monitor on 18node3 + * Resource action: remote1 monitor on 18node4 + * Resource action: remote1 monitor on 18node3 + * Resource action: FAKE1 monitor on 18node4 + * Resource action: FAKE1 monitor on 18node3 + * Resource action: FAKE1 monitor on 18node2 + * Resource action: FAKE1 monitor on 18node1 + * Resource action: FAKE1 monitor on 18builder + * Resource action: FAKE3 monitor on 18node3 + * Resource action: FAKE4 monitor on 18node4 + * Resource action: FAKE5 monitor on 18node4 + * Resource action: FAKE5 monitor on 18node3 + * Resource action: FAKE5 monitor on 18node2 + * Resource action: FAKE5 monitor on 18node1 + * Resource action: FAKE5 monitor on 18builder + * Pseudo action: FAKECLONE1-clone_start_0 + * Resource action: FAKECLONE2:0 monitor on 18builder + * Resource action: FAKECLONE2:1 monitor on 18node1 + * Resource action: FAKECLONE2:3 monitor on 18node4 + * Resource action: FAKECLONE2:5 monitor on 18node3 + * Pseudo action: FAKECLONE2-clone_start_0 + * Pseudo action: probe_nodes_complete + * Resource action: remote1 start on 18builder + * Resource action: FAKE5 monitor on remote1 + * Resource action: FAKECLONE1:4 monitor on remote1 + * Resource action: FAKECLONE2:4 monitor on remote1 + * Pseudo action: probe_complete + * Resource action: remote1 monitor=60000 on 18builder + * Resource action: FAKE1 start on 18node2 + * Resource action: FAKE2 stop on 18node2 + * Resource action: FAKE3 stop on 18builder + * Resource action: FAKE4 stop on 18node1 + * Resource action: FAKE5 start on remote1 + * Resource action: FAKECLONE1:0 start on 18builder + * Resource action: FAKECLONE1:1 start on 18node1 + * Resource action: FAKECLONE1:2 start on 18node2 + * Resource action: FAKECLONE1:3 start on 18node4 + * Resource action: FAKECLONE1:4 start on remote1 + * Resource action: FAKECLONE1:5 start on 18node3 + * Pseudo action: FAKECLONE1-clone_running_0 + * Resource action: FAKECLONE2:0 start on 18builder + * Resource action: FAKECLONE2:1 start on 18node1 + * Resource action: FAKECLONE2:2 start on 18node2 + * Resource action: FAKECLONE2:3 start on 18node4 + * Resource action: FAKECLONE2:4 start on remote1 + * Resource action: FAKECLONE2:5 start on 18node3 + * Pseudo action: FAKECLONE2-clone_running_0 + * Pseudo action: all_stopped + * Resource action: FAKE1 monitor=60000 on 18node2 + * Resource action: FAKE2 start on 18node3 + * Resource action: FAKE3 start on 18node3 + * Resource action: FAKE4 start on 18node4 + * Resource action: FAKE5 monitor=60000 on remote1 + * Resource action: FAKECLONE1:0 monitor=60000 on 18builder + * Resource action: FAKECLONE1:1 monitor=60000 on 18node1 + * Resource action: FAKECLONE1:2 monitor=60000 on 18node2 + * Resource action: FAKECLONE1:3 monitor=60000 on 18node4 + * Resource action: FAKECLONE1:4 monitor=60000 on remote1 + * Resource action: FAKECLONE1:5 monitor=60000 on 18node3 + * Resource action: FAKECLONE2:0 monitor=60000 on 18builder + * Resource action: FAKECLONE2:1 monitor=60000 on 18node1 + * Resource action: FAKECLONE2:2 monitor=60000 on 18node2 + * Resource action: FAKECLONE2:3 monitor=60000 on 18node4 + * Resource action: FAKECLONE2:4 monitor=60000 on remote1 + * Resource action: FAKECLONE2:5 monitor=60000 on 18node3 + * Resource action: FAKE2 monitor=60000 on 18node3 + * Resource action: FAKE3 monitor=60000 on 18node3 + * Resource action: FAKE4 monitor=60000 on 18node4 + +Revised cluster status: +Online: [ 18builder 18node1 18node2 18node3 18node4 ] +RemoteOnline: [ remote1 ] + + shooter (stonith:fence_xvm): Started 18node1 + remote1 (ocf::pacemaker:remote): Started 18builder + FAKE1 (ocf::heartbeat:Dummy): Started 18node2 + FAKE2 (ocf::heartbeat:Dummy): Started 18node3 + FAKE3 (ocf::heartbeat:Dummy): Started 18node3 + FAKE4 (ocf::heartbeat:Dummy): Started 18node4 + FAKE5 (ocf::heartbeat:Dummy): Started remote1 + Clone Set: FAKECLONE1-clone [FAKECLONE1] + Started: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + Clone Set: FAKECLONE2-clone [FAKECLONE2] + Started: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + diff --git a/pengine/test10/resource-discovery.xml b/pengine/test10/resource-discovery.xml new file mode 100644 index 0000000..5836804 --- /dev/null +++ b/pengine/test10/resource-discovery.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/rsc-discovery-per-node.dot b/pengine/test10/rsc-discovery-per-node.dot new file mode 100644 index 0000000..8f5889a --- /dev/null +++ b/pengine/test10/rsc-discovery-per-node.dot @@ -0,0 +1,195 @@ + digraph "g" { +"FAKE1_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKE1_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKE1_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKE1_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE1_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE1_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE1_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE1_start_0 18node2" -> "FAKE1_monitor_60000 18node2" [ style = bold] +"FAKE1_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE2_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE2_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE2_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE2_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE2_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE2_start_0 18node3" -> "FAKE2_monitor_60000 18node3" [ style = bold] +"FAKE2_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE2_stop_0 18node2" -> "FAKE2_start_0 18node3" [ style = bold] +"FAKE2_stop_0 18node2" -> "all_stopped" [ style = bold] +"FAKE2_stop_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE3_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE3_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE3_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE3_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE3_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE3_start_0 18node4" -> "FAKE3_monitor_60000 18node4" [ style = bold] +"FAKE3_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE3_stop_0 18builder" -> "FAKE3_start_0 18node4" [ style = bold] +"FAKE3_stop_0 18builder" -> "all_stopped" [ style = bold] +"FAKE3_stop_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE4_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE4_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE4_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE4_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE4_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKE4_start_0 remote1" -> "FAKE4_monitor_60000 remote1" [ style = bold] +"FAKE4_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKE4_stop_0 18node1" -> "FAKE4_start_0 remote1" [ style = bold] +"FAKE4_stop_0 18node1" -> "all_stopped" [ style = bold] +"FAKE4_stop_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKE5_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKE5_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKE5_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKE5_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKE5_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKE5_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"FAKE5_start_0 18builder" -> "FAKE5_monitor_60000 18builder" [ style = bold] +"FAKE5_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1-clone_running_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:0_start_0 18node1" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:1_start_0 18node2" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:2_start_0 18node3" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:3_start_0 18node4" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"FAKECLONE1-clone_start_0" -> "FAKECLONE1:5_start_0 18builder" [ style = bold] +"FAKECLONE1-clone_start_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE1:0_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKECLONE1:0_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:0_monitor_60000 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:0_start_0 18node1" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:0_start_0 18node1" -> "FAKECLONE1:0_monitor_60000 18node1" [ style = bold] +"FAKECLONE1:0_start_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:1_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKECLONE1:1_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:1_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:1_start_0 18node2" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:1_start_0 18node2" -> "FAKECLONE1:1_monitor_60000 18node2" [ style = bold] +"FAKECLONE1:1_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:2_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKECLONE1:2_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:2_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:2_start_0 18node3" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:2_start_0 18node3" -> "FAKECLONE1:2_monitor_60000 18node3" [ style = bold] +"FAKECLONE1:2_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:3_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKECLONE1:3_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:3_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:3_start_0 18node4" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:3_start_0 18node4" -> "FAKECLONE1:3_monitor_60000 18node4" [ style = bold] +"FAKECLONE1:3_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:4_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:4_start_0 remote1" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:4_start_0 remote1" -> "FAKECLONE1:4_monitor_60000 remote1" [ style = bold] +"FAKECLONE1:4_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:5_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKECLONE1:5_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:5_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE1:5_start_0 18builder" -> "FAKECLONE1-clone_running_0" [ style = bold] +"FAKECLONE1:5_start_0 18builder" -> "FAKECLONE1:5_monitor_60000 18builder" [ style = bold] +"FAKECLONE1:5_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2-clone_running_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:0_start_0 18node1" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:1_start_0 18node2" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:2_start_0 18node3" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:3_start_0 18node4" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"FAKECLONE2-clone_start_0" -> "FAKECLONE2:5_start_0 18builder" [ style = bold] +"FAKECLONE2-clone_start_0" [ style=bold color="green" fontcolor="orange"] +"FAKECLONE2:0_monitor_0 18node1" -> "probe_complete 18node1" [ style = bold] +"FAKECLONE2:0_monitor_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:0_monitor_60000 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:0_start_0 18node1" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:0_start_0 18node1" -> "FAKECLONE2:0_monitor_60000 18node1" [ style = bold] +"FAKECLONE2:0_start_0 18node1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_monitor_0 18node2" -> "probe_complete 18node2" [ style = bold] +"FAKECLONE2:1_monitor_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_monitor_60000 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:1_start_0 18node2" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:1_start_0 18node2" -> "FAKECLONE2:1_monitor_60000 18node2" [ style = bold] +"FAKECLONE2:1_start_0 18node2" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:2_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"FAKECLONE2:2_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:2_monitor_60000 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:2_start_0 18node3" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:2_start_0 18node3" -> "FAKECLONE2:2_monitor_60000 18node3" [ style = bold] +"FAKECLONE2:2_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"FAKECLONE2:3_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_monitor_60000 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:3_start_0 18node4" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:3_start_0 18node4" -> "FAKECLONE2:3_monitor_60000 18node4" [ style = bold] +"FAKECLONE2:3_start_0 18node4" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:4_monitor_60000 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:4_start_0 remote1" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:4_start_0 remote1" -> "FAKECLONE2:4_monitor_60000 remote1" [ style = bold] +"FAKECLONE2:4_start_0 remote1" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_monitor_0 18builder" -> "probe_complete 18builder" [ style = bold] +"FAKECLONE2:5_monitor_0 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"FAKECLONE2:5_start_0 18builder" -> "FAKECLONE2-clone_running_0" [ style = bold] +"FAKECLONE2:5_start_0 18builder" -> "FAKECLONE2:5_monitor_60000 18builder" [ style = bold] +"FAKECLONE2:5_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"all_stopped" [ style=bold color="green" fontcolor="orange"] +"probe_complete 18builder" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18builder" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node1" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node1" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node2" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node2" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node3" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node3" [ style=bold color="green" fontcolor="black"] +"probe_complete 18node4" -> "probe_nodes_complete" [ style = bold] +"probe_complete 18node4" [ style=bold color="green" fontcolor="black"] +"probe_complete" -> "FAKE1_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKE2_start_0 18node3" [ style = bold] +"probe_complete" -> "FAKE2_stop_0 18node2" [ style = bold] +"probe_complete" -> "FAKE3_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKE3_stop_0 18builder" [ style = bold] +"probe_complete" -> "FAKE4_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKE4_stop_0 18node1" [ style = bold] +"probe_complete" -> "FAKE5_start_0 18builder" [ style = bold] +"probe_complete" -> "FAKECLONE1:0_start_0 18node1" [ style = bold] +"probe_complete" -> "FAKECLONE1:1_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKECLONE1:2_start_0 18node3" [ style = bold] +"probe_complete" -> "FAKECLONE1:3_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKECLONE1:5_start_0 18builder" [ style = bold] +"probe_complete" -> "FAKECLONE2:0_start_0 18node1" [ style = bold] +"probe_complete" -> "FAKECLONE2:1_start_0 18node2" [ style = bold] +"probe_complete" -> "FAKECLONE2:2_start_0 18node3" [ style = bold] +"probe_complete" -> "FAKECLONE2:3_start_0 18node4" [ style = bold] +"probe_complete" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"probe_complete" -> "FAKECLONE2:5_start_0 18builder" [ style = bold] +"probe_complete" [ style=bold color="green" fontcolor="orange"] +"probe_nodes_complete" -> "remote1_start_0 18builder" [ style = bold] +"probe_nodes_complete" [ style=bold color="green" fontcolor="orange"] +"remote1_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"remote1_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"remote1_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"remote1_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +"remote1_monitor_60000 18builder" [ style=bold color="green" fontcolor="black"] +"remote1_start_0 18builder" -> "FAKE4_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKE4_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE1:4_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE1:4_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE2:4_monitor_60000 remote1" [ style = bold] +"remote1_start_0 18builder" -> "FAKECLONE2:4_start_0 remote1" [ style = bold] +"remote1_start_0 18builder" -> "remote1_monitor_60000 18builder" [ style = bold] +"remote1_start_0 18builder" [ style=bold color="green" fontcolor="black"] +"shooter_monitor_0 18node3" -> "probe_complete 18node3" [ style = bold] +"shooter_monitor_0 18node3" [ style=bold color="green" fontcolor="black"] +"shooter_monitor_0 18node4" -> "probe_complete 18node4" [ style = bold] +"shooter_monitor_0 18node4" [ style=bold color="green" fontcolor="black"] +} diff --git a/pengine/test10/rsc-discovery-per-node.exp b/pengine/test10/rsc-discovery-per-node.exp new file mode 100644 index 0000000..8de04cd --- /dev/null +++ b/pengine/test10/rsc-discovery-per-node.exp @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/rsc-discovery-per-node.scores b/pengine/test10/rsc-discovery-per-node.scores new file mode 100644 index 0000000..a0ad11f --- /dev/null +++ b/pengine/test10/rsc-discovery-per-node.scores @@ -0,0 +1,199 @@ +Allocation scores: +clone_color: FAKECLONE1-clone allocation score on 18builder: 0 +clone_color: FAKECLONE1-clone allocation score on 18node1: 0 +clone_color: FAKECLONE1-clone allocation score on 18node2: 0 +clone_color: FAKECLONE1-clone allocation score on 18node3: 0 +clone_color: FAKECLONE1-clone allocation score on 18node4: 0 +clone_color: FAKECLONE1-clone allocation score on remote1: 0 +clone_color: FAKECLONE1:0 allocation score on 18builder: 0 +clone_color: FAKECLONE1:0 allocation score on 18node1: 0 +clone_color: FAKECLONE1:0 allocation score on 18node2: 0 +clone_color: FAKECLONE1:0 allocation score on 18node3: 0 +clone_color: FAKECLONE1:0 allocation score on 18node4: 0 +clone_color: FAKECLONE1:0 allocation score on remote1: 0 +clone_color: FAKECLONE1:1 allocation score on 18builder: 0 +clone_color: FAKECLONE1:1 allocation score on 18node1: 0 +clone_color: FAKECLONE1:1 allocation score on 18node2: 0 +clone_color: FAKECLONE1:1 allocation score on 18node3: 0 +clone_color: FAKECLONE1:1 allocation score on 18node4: 0 +clone_color: FAKECLONE1:1 allocation score on remote1: 0 +clone_color: FAKECLONE1:2 allocation score on 18builder: 0 +clone_color: FAKECLONE1:2 allocation score on 18node1: 0 +clone_color: FAKECLONE1:2 allocation score on 18node2: 0 +clone_color: FAKECLONE1:2 allocation score on 18node3: 0 +clone_color: FAKECLONE1:2 allocation score on 18node4: 0 +clone_color: FAKECLONE1:2 allocation score on remote1: 0 +clone_color: FAKECLONE1:3 allocation score on 18builder: 0 +clone_color: FAKECLONE1:3 allocation score on 18node1: 0 +clone_color: FAKECLONE1:3 allocation score on 18node2: 0 +clone_color: FAKECLONE1:3 allocation score on 18node3: 0 +clone_color: FAKECLONE1:3 allocation score on 18node4: 0 +clone_color: FAKECLONE1:3 allocation score on remote1: 0 +clone_color: FAKECLONE1:4 allocation score on 18builder: 0 +clone_color: FAKECLONE1:4 allocation score on 18node1: 0 +clone_color: FAKECLONE1:4 allocation score on 18node2: 0 +clone_color: FAKECLONE1:4 allocation score on 18node3: 0 +clone_color: FAKECLONE1:4 allocation score on 18node4: 0 +clone_color: FAKECLONE1:4 allocation score on remote1: 0 +clone_color: FAKECLONE1:5 allocation score on 18builder: 0 +clone_color: FAKECLONE1:5 allocation score on 18node1: 0 +clone_color: FAKECLONE1:5 allocation score on 18node2: 0 +clone_color: FAKECLONE1:5 allocation score on 18node3: 0 +clone_color: FAKECLONE1:5 allocation score on 18node4: 0 +clone_color: FAKECLONE1:5 allocation score on remote1: 0 +clone_color: FAKECLONE2-clone allocation score on 18builder: 0 +clone_color: FAKECLONE2-clone allocation score on 18node1: 0 +clone_color: FAKECLONE2-clone allocation score on 18node2: 0 +clone_color: FAKECLONE2-clone allocation score on 18node3: 0 +clone_color: FAKECLONE2-clone allocation score on 18node4: 0 +clone_color: FAKECLONE2-clone allocation score on remote1: 0 +clone_color: FAKECLONE2:0 allocation score on 18builder: 0 +clone_color: FAKECLONE2:0 allocation score on 18node1: 0 +clone_color: FAKECLONE2:0 allocation score on 18node2: 0 +clone_color: FAKECLONE2:0 allocation score on 18node3: 0 +clone_color: FAKECLONE2:0 allocation score on 18node4: 0 +clone_color: FAKECLONE2:0 allocation score on remote1: 0 +clone_color: FAKECLONE2:1 allocation score on 18builder: 0 +clone_color: FAKECLONE2:1 allocation score on 18node1: 0 +clone_color: FAKECLONE2:1 allocation score on 18node2: 0 +clone_color: FAKECLONE2:1 allocation score on 18node3: 0 +clone_color: FAKECLONE2:1 allocation score on 18node4: 0 +clone_color: FAKECLONE2:1 allocation score on remote1: 0 +clone_color: FAKECLONE2:2 allocation score on 18builder: 0 +clone_color: FAKECLONE2:2 allocation score on 18node1: 0 +clone_color: FAKECLONE2:2 allocation score on 18node2: 0 +clone_color: FAKECLONE2:2 allocation score on 18node3: 0 +clone_color: FAKECLONE2:2 allocation score on 18node4: 0 +clone_color: FAKECLONE2:2 allocation score on remote1: 0 +clone_color: FAKECLONE2:3 allocation score on 18builder: 0 +clone_color: FAKECLONE2:3 allocation score on 18node1: 0 +clone_color: FAKECLONE2:3 allocation score on 18node2: 0 +clone_color: FAKECLONE2:3 allocation score on 18node3: 0 +clone_color: FAKECLONE2:3 allocation score on 18node4: 0 +clone_color: FAKECLONE2:3 allocation score on remote1: 0 +clone_color: FAKECLONE2:4 allocation score on 18builder: 0 +clone_color: FAKECLONE2:4 allocation score on 18node1: 0 +clone_color: FAKECLONE2:4 allocation score on 18node2: 0 +clone_color: FAKECLONE2:4 allocation score on 18node3: 0 +clone_color: FAKECLONE2:4 allocation score on 18node4: 0 +clone_color: FAKECLONE2:4 allocation score on remote1: 0 +clone_color: FAKECLONE2:5 allocation score on 18builder: 0 +clone_color: FAKECLONE2:5 allocation score on 18node1: 0 +clone_color: FAKECLONE2:5 allocation score on 18node2: 0 +clone_color: FAKECLONE2:5 allocation score on 18node3: 0 +clone_color: FAKECLONE2:5 allocation score on 18node4: 0 +clone_color: FAKECLONE2:5 allocation score on remote1: 0 +native_color: FAKE1 allocation score on 18builder: 0 +native_color: FAKE1 allocation score on 18node1: 0 +native_color: FAKE1 allocation score on 18node2: 0 +native_color: FAKE1 allocation score on 18node3: 0 +native_color: FAKE1 allocation score on 18node4: 0 +native_color: FAKE1 allocation score on remote1: 0 +native_color: FAKE2 allocation score on 18builder: 0 +native_color: FAKE2 allocation score on 18node1: 0 +native_color: FAKE2 allocation score on 18node2: 0 +native_color: FAKE2 allocation score on 18node3: 0 +native_color: FAKE2 allocation score on 18node4: 0 +native_color: FAKE2 allocation score on remote1: 0 +native_color: FAKE3 allocation score on 18builder: 0 +native_color: FAKE3 allocation score on 18node1: 0 +native_color: FAKE3 allocation score on 18node2: 0 +native_color: FAKE3 allocation score on 18node3: 0 +native_color: FAKE3 allocation score on 18node4: 0 +native_color: FAKE3 allocation score on remote1: 0 +native_color: FAKE4 allocation score on 18builder: 0 +native_color: FAKE4 allocation score on 18node1: 0 +native_color: FAKE4 allocation score on 18node2: 0 +native_color: FAKE4 allocation score on 18node3: 0 +native_color: FAKE4 allocation score on 18node4: 0 +native_color: FAKE4 allocation score on remote1: 0 +native_color: FAKE5 allocation score on 18builder: 0 +native_color: FAKE5 allocation score on 18node1: 0 +native_color: FAKE5 allocation score on 18node2: 0 +native_color: FAKE5 allocation score on 18node3: 0 +native_color: FAKE5 allocation score on 18node4: 0 +native_color: FAKE5 allocation score on remote1: 0 +native_color: FAKECLONE1:0 allocation score on 18builder: 0 +native_color: FAKECLONE1:0 allocation score on 18node1: 0 +native_color: FAKECLONE1:0 allocation score on 18node2: 0 +native_color: FAKECLONE1:0 allocation score on 18node3: 0 +native_color: FAKECLONE1:0 allocation score on 18node4: 0 +native_color: FAKECLONE1:0 allocation score on remote1: 0 +native_color: FAKECLONE1:1 allocation score on 18builder: 0 +native_color: FAKECLONE1:1 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:1 allocation score on 18node2: 0 +native_color: FAKECLONE1:1 allocation score on 18node3: 0 +native_color: FAKECLONE1:1 allocation score on 18node4: 0 +native_color: FAKECLONE1:1 allocation score on remote1: 0 +native_color: FAKECLONE1:2 allocation score on 18builder: 0 +native_color: FAKECLONE1:2 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:2 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:2 allocation score on 18node3: 0 +native_color: FAKECLONE1:2 allocation score on 18node4: 0 +native_color: FAKECLONE1:2 allocation score on remote1: 0 +native_color: FAKECLONE1:3 allocation score on 18builder: 0 +native_color: FAKECLONE1:3 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node3: -INFINITY +native_color: FAKECLONE1:3 allocation score on 18node4: 0 +native_color: FAKECLONE1:3 allocation score on remote1: 0 +native_color: FAKECLONE1:4 allocation score on 18builder: 0 +native_color: FAKECLONE1:4 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node3: -INFINITY +native_color: FAKECLONE1:4 allocation score on 18node4: -INFINITY +native_color: FAKECLONE1:4 allocation score on remote1: 0 +native_color: FAKECLONE1:5 allocation score on 18builder: 0 +native_color: FAKECLONE1:5 allocation score on 18node1: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node2: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node3: -INFINITY +native_color: FAKECLONE1:5 allocation score on 18node4: -INFINITY +native_color: FAKECLONE1:5 allocation score on remote1: -INFINITY +native_color: FAKECLONE2:0 allocation score on 18builder: 0 +native_color: FAKECLONE2:0 allocation score on 18node1: 0 +native_color: FAKECLONE2:0 allocation score on 18node2: 0 +native_color: FAKECLONE2:0 allocation score on 18node3: 0 +native_color: FAKECLONE2:0 allocation score on 18node4: 0 +native_color: FAKECLONE2:0 allocation score on remote1: 0 +native_color: FAKECLONE2:1 allocation score on 18builder: 0 +native_color: FAKECLONE2:1 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:1 allocation score on 18node2: 0 +native_color: FAKECLONE2:1 allocation score on 18node3: 0 +native_color: FAKECLONE2:1 allocation score on 18node4: 0 +native_color: FAKECLONE2:1 allocation score on remote1: 0 +native_color: FAKECLONE2:2 allocation score on 18builder: 0 +native_color: FAKECLONE2:2 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:2 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:2 allocation score on 18node3: 0 +native_color: FAKECLONE2:2 allocation score on 18node4: 0 +native_color: FAKECLONE2:2 allocation score on remote1: 0 +native_color: FAKECLONE2:3 allocation score on 18builder: 0 +native_color: FAKECLONE2:3 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node3: -INFINITY +native_color: FAKECLONE2:3 allocation score on 18node4: 0 +native_color: FAKECLONE2:3 allocation score on remote1: 0 +native_color: FAKECLONE2:4 allocation score on 18builder: 0 +native_color: FAKECLONE2:4 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node3: -INFINITY +native_color: FAKECLONE2:4 allocation score on 18node4: -INFINITY +native_color: FAKECLONE2:4 allocation score on remote1: 0 +native_color: FAKECLONE2:5 allocation score on 18builder: 0 +native_color: FAKECLONE2:5 allocation score on 18node1: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node2: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node3: -INFINITY +native_color: FAKECLONE2:5 allocation score on 18node4: -INFINITY +native_color: FAKECLONE2:5 allocation score on remote1: -INFINITY +native_color: remote1 allocation score on 18builder: 0 +native_color: remote1 allocation score on 18node1: 0 +native_color: remote1 allocation score on 18node2: 0 +native_color: remote1 allocation score on 18node3: 0 +native_color: remote1 allocation score on 18node4: 0 +native_color: remote1 allocation score on remote1: -INFINITY +native_color: shooter allocation score on 18builder: 0 +native_color: shooter allocation score on 18node1: 0 +native_color: shooter allocation score on 18node2: 0 +native_color: shooter allocation score on 18node3: 0 +native_color: shooter allocation score on 18node4: 0 +native_color: shooter allocation score on remote1: -INFINITY diff --git a/pengine/test10/rsc-discovery-per-node.summary b/pengine/test10/rsc-discovery-per-node.summary new file mode 100644 index 0000000..69d5ee3 --- /dev/null +++ b/pengine/test10/rsc-discovery-per-node.summary @@ -0,0 +1,131 @@ + +Current cluster status: +Online: [ 18builder 18node1 18node2 18node3 18node4 ] +RemoteOFFLINE: [ remote1 ] + + shooter (stonith:fence_xvm): Started 18node1 + remote1 (ocf::pacemaker:remote): Stopped + FAKE1 (ocf::heartbeat:Dummy): Stopped + FAKE2 (ocf::heartbeat:Dummy): Started 18node2 + FAKE3 (ocf::heartbeat:Dummy): Started 18builder + FAKE4 (ocf::heartbeat:Dummy): Started 18node1 + FAKE5 (ocf::heartbeat:Dummy): Stopped + Clone Set: FAKECLONE1-clone [FAKECLONE1] + Stopped: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + Clone Set: FAKECLONE2-clone [FAKECLONE2] + Stopped: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + +Transition Summary: + * Start remote1 (18builder) + * Start FAKE1 (18node2) + * Move FAKE2 (Started 18node2 -> 18node3) + * Move FAKE3 (Started 18builder -> 18node4) + * Move FAKE4 (Started 18node1 -> remote1) + * Start FAKE5 (18builder) + * Start FAKECLONE1:0 (18node1) + * Start FAKECLONE1:1 (18node2) + * Start FAKECLONE1:2 (18node3) + * Start FAKECLONE1:3 (18node4) + * Start FAKECLONE1:4 (remote1) + * Start FAKECLONE1:5 (18builder) + * Start FAKECLONE2:0 (18node1) + * Start FAKECLONE2:1 (18node2) + * Start FAKECLONE2:2 (18node3) + * Start FAKECLONE2:3 (18node4) + * Start FAKECLONE2:4 (remote1) + * Start FAKECLONE2:5 (18builder) + +Executing cluster transition: + * Resource action: shooter monitor on 18node4 + * Resource action: shooter monitor on 18node3 + * Resource action: remote1 monitor on 18node4 + * Resource action: remote1 monitor on 18node3 + * Resource action: FAKE1 monitor on 18node4 + * Resource action: FAKE1 monitor on 18node3 + * Resource action: FAKE1 monitor on 18node2 + * Resource action: FAKE1 monitor on 18node1 + * Resource action: FAKE1 monitor on 18builder + * Resource action: FAKE2 monitor on 18node4 + * Resource action: FAKE2 monitor on 18node3 + * Resource action: FAKE3 monitor on 18node4 + * Resource action: FAKE3 monitor on 18node3 + * Resource action: FAKE4 monitor on 18node4 + * Resource action: FAKE4 monitor on 18node3 + * Resource action: FAKE5 monitor on 18node4 + * Resource action: FAKE5 monitor on 18node3 + * Resource action: FAKE5 monitor on 18node2 + * Resource action: FAKE5 monitor on 18node1 + * Resource action: FAKE5 monitor on 18builder + * Resource action: FAKECLONE1:0 monitor on 18node1 + * Resource action: FAKECLONE1:1 monitor on 18node2 + * Resource action: FAKECLONE1:2 monitor on 18node3 + * Resource action: FAKECLONE1:3 monitor on 18node4 + * Resource action: FAKECLONE1:5 monitor on 18builder + * Pseudo action: FAKECLONE1-clone_start_0 + * Resource action: FAKECLONE2:0 monitor on 18node1 + * Resource action: FAKECLONE2:1 monitor on 18node2 + * Resource action: FAKECLONE2:2 monitor on 18node3 + * Resource action: FAKECLONE2:3 monitor on 18node4 + * Resource action: FAKECLONE2:5 monitor on 18builder + * Pseudo action: FAKECLONE2-clone_start_0 + * Pseudo action: probe_nodes_complete + * Pseudo action: probe_complete + * Resource action: remote1 start on 18builder + * Resource action: FAKE1 start on 18node2 + * Resource action: FAKE2 stop on 18node2 + * Resource action: FAKE3 stop on 18builder + * Resource action: FAKE4 stop on 18node1 + * Resource action: FAKE5 start on 18builder + * Resource action: FAKECLONE1:0 start on 18node1 + * Resource action: FAKECLONE1:1 start on 18node2 + * Resource action: FAKECLONE1:2 start on 18node3 + * Resource action: FAKECLONE1:3 start on 18node4 + * Resource action: FAKECLONE1:4 start on remote1 + * Resource action: FAKECLONE1:5 start on 18builder + * Pseudo action: FAKECLONE1-clone_running_0 + * Resource action: FAKECLONE2:0 start on 18node1 + * Resource action: FAKECLONE2:1 start on 18node2 + * Resource action: FAKECLONE2:2 start on 18node3 + * Resource action: FAKECLONE2:3 start on 18node4 + * Resource action: FAKECLONE2:4 start on remote1 + * Resource action: FAKECLONE2:5 start on 18builder + * Pseudo action: FAKECLONE2-clone_running_0 + * Pseudo action: all_stopped + * Resource action: remote1 monitor=60000 on 18builder + * Resource action: FAKE1 monitor=60000 on 18node2 + * Resource action: FAKE2 start on 18node3 + * Resource action: FAKE3 start on 18node4 + * Resource action: FAKE4 start on remote1 + * Resource action: FAKE5 monitor=60000 on 18builder + * Resource action: FAKECLONE1:0 monitor=60000 on 18node1 + * Resource action: FAKECLONE1:1 monitor=60000 on 18node2 + * Resource action: FAKECLONE1:2 monitor=60000 on 18node3 + * Resource action: FAKECLONE1:3 monitor=60000 on 18node4 + * Resource action: FAKECLONE1:4 monitor=60000 on remote1 + * Resource action: FAKECLONE1:5 monitor=60000 on 18builder + * Resource action: FAKECLONE2:0 monitor=60000 on 18node1 + * Resource action: FAKECLONE2:1 monitor=60000 on 18node2 + * Resource action: FAKECLONE2:2 monitor=60000 on 18node3 + * Resource action: FAKECLONE2:3 monitor=60000 on 18node4 + * Resource action: FAKECLONE2:4 monitor=60000 on remote1 + * Resource action: FAKECLONE2:5 monitor=60000 on 18builder + * Resource action: FAKE2 monitor=60000 on 18node3 + * Resource action: FAKE3 monitor=60000 on 18node4 + * Resource action: FAKE4 monitor=60000 on remote1 + +Revised cluster status: +Online: [ 18builder 18node1 18node2 18node3 18node4 ] +RemoteOnline: [ remote1 ] + + shooter (stonith:fence_xvm): Started 18node1 + remote1 (ocf::pacemaker:remote): Started 18builder + FAKE1 (ocf::heartbeat:Dummy): Started 18node2 + FAKE2 (ocf::heartbeat:Dummy): Started 18node3 + FAKE3 (ocf::heartbeat:Dummy): Started 18node4 + FAKE4 (ocf::heartbeat:Dummy): Started remote1 + FAKE5 (ocf::heartbeat:Dummy): Started 18builder + Clone Set: FAKECLONE1-clone [FAKECLONE1] + Started: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + Clone Set: FAKECLONE2-clone [FAKECLONE2] + Started: [ 18builder 18node1 18node2 18node3 18node4 remote1 ] + diff --git a/pengine/test10/rsc-discovery-per-node.xml b/pengine/test10/rsc-discovery-per-node.xml new file mode 100644 index 0000000..c111de8 --- /dev/null +++ b/pengine/test10/rsc-discovery-per-node.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pengine/test10/whitebox-start.dot b/pengine/test10/whitebox-start.dot index bec57b0..659ea97 100644 --- a/pengine/test10/whitebox-start.dot +++ b/pengine/test10/whitebox-start.dot @@ -1,4 +1,16 @@ digraph "g" { +"A_monitor_10000 lxc1" [ style=bold color="green" fontcolor="black"] +"A_start_0 lxc1" -> "A_monitor_10000 lxc1" [ style = bold] +"A_start_0 lxc1" [ style=bold color="green" fontcolor="black"] +"A_stop_0 18node1" -> "A_start_0 lxc1" [ style = bold] +"A_stop_0 18node1" -> "all_stopped" [ style = bold] +"A_stop_0 18node1" [ style=bold color="green" fontcolor="black"] +"B_monitor_10000 18node3" [ style=bold color="green" fontcolor="black"] +"B_start_0 18node3" -> "B_monitor_10000 18node3" [ style = bold] +"B_start_0 18node3" [ style=bold color="green" fontcolor="black"] +"B_stop_0 lxc2" -> "B_start_0 18node3" [ style = bold] +"B_stop_0 lxc2" -> "all_stopped" [ style = bold] +"B_stop_0 lxc2" [ style=bold color="green" fontcolor="black"] "M-clone_running_0" [ style=bold color="green" fontcolor="orange"] "M-clone_start_0" -> "M-clone_running_0" [ style = bold] "M-clone_start_0" -> "M_start_0 lxc1" [ style = bold] @@ -7,9 +19,12 @@ digraph "g" { "M_start_0 lxc1" -> "M-clone_running_0" [ style = bold] "M_start_0 lxc1" -> "M_monitor_10000 lxc1" [ style = bold] "M_start_0 lxc1" [ style=bold color="green" fontcolor="black"] +"all_stopped" [ style=bold color="green" fontcolor="orange"] "container1_start_0 18node1" -> "lxc1_start_0 18node1" [ style = bold] "container1_start_0 18node1" [ style=bold color="green" fontcolor="black"] "lxc1_monitor_30000 18node1" [ style=bold color="green" fontcolor="black"] +"lxc1_start_0 18node1" -> "A_monitor_10000 lxc1" [ style = bold] +"lxc1_start_0 18node1" -> "A_start_0 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "M_monitor_10000 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "M_start_0 lxc1" [ style = bold] "lxc1_start_0 18node1" -> "lxc1_monitor_30000 18node1" [ style = bold] diff --git a/pengine/test10/whitebox-start.exp b/pengine/test10/whitebox-start.exp index 0ee104c..68ede8e 100644 --- a/pengine/test10/whitebox-start.exp +++ b/pengine/test10/whitebox-start.exp @@ -20,7 +20,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -65,20 +65,96 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -89,5 +165,19 @@ + + + + + + + + + + + + + + + - diff --git a/pengine/test10/whitebox-start.scores b/pengine/test10/whitebox-start.scores index 1a00b28..1f0f273 100644 --- a/pengine/test10/whitebox-start.scores +++ b/pengine/test10/whitebox-start.scores @@ -32,11 +32,11 @@ clone_color: M:4 allocation score on lxc2: 0 native_color: A allocation score on 18node1: 100 native_color: A allocation score on 18node2: 0 native_color: A allocation score on 18node3: 0 -native_color: A allocation score on lxc1: 0 -native_color: A allocation score on lxc2: 0 -native_color: B allocation score on 18node1: 0 -native_color: B allocation score on 18node2: 0 -native_color: B allocation score on 18node3: 0 +native_color: A allocation score on lxc1: INFINITY +native_color: A allocation score on lxc2: INFINITY +native_color: B allocation score on 18node1: INFINITY +native_color: B allocation score on 18node2: INFINITY +native_color: B allocation score on 18node3: INFINITY native_color: B allocation score on lxc1: 0 native_color: B allocation score on lxc2: 100 native_color: C allocation score on 18node1: 0 diff --git a/pengine/test10/whitebox-start.summary b/pengine/test10/whitebox-start.summary index 2801abe..6819ebc 100644 --- a/pengine/test10/whitebox-start.summary +++ b/pengine/test10/whitebox-start.summary @@ -17,16 +17,25 @@ Containers: [ lxc2:container2 ] Transition Summary: * Start container1 (18node1) * Start M:4 (lxc1) + * Move A (Started 18node1 -> lxc1) + * Move B (Started lxc2 -> 18node3) * Start lxc1 (18node1) Executing cluster transition: * Resource action: container1 start on 18node1 * Pseudo action: M-clone_start_0 + * Resource action: A stop on 18node1 + * Resource action: B stop on lxc2 * Resource action: lxc1 start on 18node1 + * Pseudo action: all_stopped * Resource action: M start on lxc1 * Pseudo action: M-clone_running_0 + * Resource action: A start on lxc1 + * Resource action: B start on 18node3 * Resource action: lxc1 monitor=30000 on 18node1 * Resource action: M monitor=10000 on lxc1 + * Resource action: A monitor=10000 on lxc1 + * Resource action: B monitor=10000 on 18node3 Revised cluster status: Online: [ 18node1 18node2 18node3 ] @@ -37,8 +46,8 @@ Containers: [ lxc1:container1 lxc2:container2 ] shoot1 (stonith:fence_xvm): Started 18node3 Clone Set: M-clone [M] Started: [ 18node1 18node2 18node3 lxc1 lxc2 ] - A (ocf::pacemaker:Dummy): Started 18node1 - B (ocf::pacemaker:Dummy): Started lxc2 + A (ocf::pacemaker:Dummy): Started lxc1 + B (ocf::pacemaker:Dummy): Started 18node3 C (ocf::pacemaker:Dummy): Started lxc2 D (ocf::pacemaker:Dummy): Started 18node1 diff --git a/pengine/test10/whitebox-start.xml b/pengine/test10/whitebox-start.xml index 2dad074..67fcbaf 100644 --- a/pengine/test10/whitebox-start.xml +++ b/pengine/test10/whitebox-start.xml @@ -78,7 +78,18 @@ - + + + + + + + + + + + + diff --git a/pengine/utils.c b/pengine/utils.c index 7dfaf95..9782cb6 100644 --- a/pengine/utils.c +++ b/pengine/utils.c @@ -60,7 +60,8 @@ pe_free_rsc_to_node(GListPtr constraints) rsc_to_node_t * rsc2node_new(const char *id, resource_t * rsc, - int node_weight, node_t * foo_node, pe_working_set_t * data_set) + int node_weight, const char *discover_mode, + node_t * foo_node, pe_working_set_t * data_set) { rsc_to_node_t *new_con = NULL; @@ -79,6 +80,18 @@ rsc2node_new(const char *id, resource_t * rsc, new_con->node_list_rh = NULL; new_con->role_filter = RSC_ROLE_UNKNOWN; + + if (discover_mode == NULL || safe_str_eq(discover_mode, "always")) { + new_con->discover_mode = discover_always; + } else if (safe_str_eq(discover_mode, "never")) { + new_con->discover_mode = discover_never; + } else if (safe_str_eq(discover_mode, "exclusive")) { + new_con->discover_mode = discover_exclusive; + rsc->exclusive_discover = TRUE; + } else { + pe_err("Invalid %s value %s in location constraint", XML_LOCATION_ATTR_DISCOVERY, discover_mode); + } + if (foo_node != NULL) { node_t *copy = node_copy(foo_node); diff --git a/pengine/utils.h b/pengine/utils.h index 1939d40..5142e68 100644 --- a/pengine/utils.h +++ b/pengine/utils.h @@ -23,7 +23,8 @@ extern rsc_colocation_t *invert_constraint(rsc_colocation_t * constraint); extern rsc_to_node_t *copy_constraint(rsc_to_node_t * constraint); -extern rsc_to_node_t *rsc2node_new(const char *id, resource_t * rsc, int weight, node_t * node, +extern rsc_to_node_t *rsc2node_new(const char *id, resource_t * rsc, int weight, + const char *discovery_mode, node_t * node, pe_working_set_t * data_set); extern void pe_free_rsc_to_node(GListPtr constraints); diff --git a/tools/crm_resource.c b/tools/crm_resource.c index 56583e0..ff5effd 100644 --- a/tools/crm_resource.c +++ b/tools/crm_resource.c @@ -94,6 +94,10 @@ resource_ipc_connection_destroy(gpointer user_data) static void start_mainloop(void) { + if (crmd_replies_needed == 0) { + return; + } + mainloop = g_main_new(FALSE); fprintf(stderr, "Waiting for %d replies from the CRMd", crmd_replies_needed); crm_debug("Waiting for %d replies from the CRMd", crmd_replies_needed); @@ -789,6 +793,7 @@ delete_lrm_rsc(cib_t *cib_conn, crm_ipc_t * crmd_channel, const char *host_uname resource_t * rsc, pe_working_set_t * data_set) { int rc = pcmk_ok; + node_t *node = NULL; if (rsc == NULL) { return -ENXIO; @@ -807,7 +812,7 @@ delete_lrm_rsc(cib_t *cib_conn, crm_ipc_t * crmd_channel, const char *host_uname GListPtr lpc = NULL; for (lpc = data_set->nodes; lpc != NULL; lpc = lpc->next) { - node_t *node = (node_t *) lpc->data; + node = (node_t *) lpc->data; if (node->details->online) { delete_lrm_rsc(cib_conn, crmd_channel, node->details->uname, rsc, data_set); @@ -817,15 +822,20 @@ delete_lrm_rsc(cib_t *cib_conn, crm_ipc_t * crmd_channel, const char *host_uname return pcmk_ok; } - printf("Cleaning up %s on %s\n", rsc->id, host_uname); - rc = send_lrm_rsc_op(crmd_channel, CRM_OP_LRM_DELETE, host_uname, rsc->id, TRUE, data_set); + node = pe_find_node(data_set->nodes, host_uname); + + if (node && node->details->rsc_discovery_enabled) { + printf("Cleaning up %s on %s\n", rsc->id, host_uname); + rc = send_lrm_rsc_op(crmd_channel, CRM_OP_LRM_DELETE, host_uname, rsc->id, TRUE, data_set); + } else { + printf("Resource discovery disabled on %s. Unable to delete lrm state.\n", host_uname); + } if (rc == pcmk_ok) { char *attr_name = NULL; const char *id = rsc->id; - node_t *node = pe_find_node(data_set->nodes, host_uname); - if(node && node->details->remote_rsc == NULL) { + if(node && node->details->remote_rsc == NULL && node->details->rsc_discovery_enabled) { crmd_replies_needed++; } if (rsc->clone_name) { @@ -1970,6 +1980,7 @@ main(int argc, char **argv) node_t *current = NULL; node_t *dest = pe_find_node(data_set.nodes, host_uname); resource_t *rsc = pe_find_resource(data_set.resources, rsc_id); + gboolean cur_is_dest = FALSE; rc = -EINVAL; @@ -2032,11 +2043,16 @@ main(int argc, char **argv) } else if(scope_master && rsc->fns->state(rsc, TRUE) != RSC_ROLE_MASTER) { crm_trace("%s is already active on %s but not in correct state", rsc_id, dest->details->uname); - } else if (safe_str_eq(current->details->uname, dest->details->uname)) { - CMD_ERR("Error performing operation: %s is already %s on %s\n", - rsc_id, scope_master?"promoted":"active", dest->details->uname); - goto bail; + cur_is_dest = TRUE; + if (do_force) { + crm_info("%s is already %s on %s, reinforcing placement with location constraint.\n", + rsc_id, scope_master?"promoted":"active", dest->details->uname); + } else { + CMD_ERR("Error performing operation: %s is already %s on %s\n", + rsc_id, scope_master?"promoted":"active", dest->details->uname); + goto bail; + } } /* Clear any previous constraints for 'dest' */ @@ -2048,7 +2064,10 @@ main(int argc, char **argv) crm_trace("%s%s now prefers node %s%s", rsc->id, scope_master?" (master)":"", dest->details->uname, do_force?"(forced)":""); - if(do_force) { + /* only ban the previous location if current location != destination location. + * it is possible to use -M to enforce a location without regard of where the + * resource is currently located */ + if(do_force && (cur_is_dest == FALSE)) { /* Ban the original location if possible */ if(current) { ban_resource(rsc_id, current->details->uname, NULL, cib_conn); diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c index 07f0871..7c0dcc7 100644 --- a/tools/crm_simulate.c +++ b/tools/crm_simulate.c @@ -964,7 +964,7 @@ set_ticket_state_attr(const char *ticket_id, const char *attr_name, static void modify_configuration(pe_working_set_t * data_set, - const char *quorum, GListPtr node_up, GListPtr node_down, GListPtr node_fail, + const char *quorum, const char *watchdog, GListPtr node_up, GListPtr node_down, GListPtr node_fail, GListPtr op_inject, GListPtr ticket_grant, GListPtr ticket_revoke, GListPtr ticket_standby, GListPtr ticket_activate) { @@ -988,6 +988,16 @@ modify_configuration(pe_working_set_t * data_set, CRM_ASSERT(rc == pcmk_ok); } + if (watchdog) { + quiet_log(" + Setting watchdog: %s\n", watchdog); + + rc = update_attr_delegate(global_cib, cib_sync_call | cib_scope_local, + XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, + XML_ATTR_HAVE_WATCHDOG, watchdog, FALSE, NULL, NULL); + + CRM_ASSERT(rc == pcmk_ok); + } + for (gIter = node_up; gIter != NULL; gIter = gIter->next) { char *node = (char *)gIter->data; @@ -1245,6 +1255,7 @@ static struct crm_option long_options[] = { {"-spacer-", 0, 0, '-', "\t\tThe transition will normally stop at the failed action. Save the result with --save-output and re-run with --xml-file"}, {"set-datetime", 1, 0, 't', "Set date/time"}, {"quorum", 1, 0, 'q', "\tSpecify a value for quorum"}, + {"watchdog", 1, 0, 'w', "\tAssume a watchdog device is active"}, {"ticket-grant", 1, 0, 'g', "Grant a ticket"}, {"ticket-revoke", 1, 0, 'r', "Revoke a ticket"}, {"ticket-standby", 1, 0, 'b', "Make a ticket standby"}, @@ -1359,6 +1370,7 @@ main(int argc, char **argv) const char *xml_file = "-"; const char *quorum = NULL; + const char *watchdog = NULL; const char *test_dir = NULL; const char *dot_file = NULL; const char *graph_file = NULL; @@ -1445,6 +1457,10 @@ main(int argc, char **argv) simulate = TRUE; op_fail = g_list_append(op_fail, optarg); break; + case 'w': + modified++; + watchdog = optarg; + break; case 'q': modified++; quorum = optarg; @@ -1555,7 +1571,7 @@ main(int argc, char **argv) if (modified) { quiet_log("Performing requested modifications\n"); - modify_configuration(&data_set, quorum, node_up, node_down, node_fail, op_inject, + modify_configuration(&data_set, quorum, watchdog, node_up, node_down, node_fail, op_inject, ticket_grant, ticket_revoke, ticket_standby, ticket_activate); rc = global_cib->cmds->query(global_cib, NULL, &input, cib_sync_call); diff --git a/tools/regression.acls.exp b/tools/regression.acls.exp index 2abdf97..2cea125 100644 --- a/tools/regression.acls.exp +++ b/tools/regression.acls.exp @@ -1,4 +1,4 @@ -Created new pacemaker-1.3 configuration +Created new pacemaker configuration Setting up shadow instance A new shadow instance was created. To begin using it paste the following into your shell: CIB_shadow=tools-regression ; export CIB_shadow diff --git a/tools/regression.sh b/tools/regression.sh index 285dcba..0c4896c 100755 --- a/tools/regression.sh +++ b/tools/regression.sh @@ -578,6 +578,7 @@ for t in $tests; do -e 's/ last-run=\"[0-9]*\"//' \ -e 's/crm_feature_set="[^"]*" //'\ -e 's/validate-with="[^"]*" //'\ + -e 's/Created new pacemaker-.* configuration/Created new pacemaker configuration/'\ -e 's/.*__xml_acl_check/__xml_acl_check/g'\ -e 's/.*__xml_acl_post_process/__xml_acl_post_process/g'\ -e 's/.*error: unpack_resources:/error: unpack_resources:/g'\ diff --git a/tools/regression.tools.exp b/tools/regression.tools.exp index 5b12c84..287caf9 100644 --- a/tools/regression.tools.exp +++ b/tools/regression.tools.exp @@ -1,4 +1,4 @@ -Created new pacemaker-2.1 configuration +Created new pacemaker configuration Setting up shadow instance A new shadow instance was created. To begin using it paste the following into your shell: CIB_shadow=tools-regression ; export CIB_shadow diff --git a/xml/Makefile.am b/xml/Makefile.am index 4c21e55..e3a3d04 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -26,8 +26,8 @@ xslt_SCRIPTS = upgrade06.xsl upgrade-*.xsl RNGdir = $(dtddir) # See Readme.md for details on updating schema files -RNG_max = $(firstword $(shell ls -1 *.rng | sed -e 's/.*-//' -e 's/.rng//' | sort -unr)) -RNG_last = $(shell ls -1 *.rng | sed -e 's/.*-//' -e 's/.rng//' | sort -unr | head -n 2 | tail -n 1) +RNG_max ?= $(firstword $(shell ls -1 *.rng | sed -e 's/.*-//' -e 's/.rng//' | sort -unr)) +RNG_last ?= $(shell ls -1 *.rng | sed -e 's/.*-//' -e 's/.rng//' | sort -unr | head -n 2 | tail -n 1) RNG_versions = $(shell ls -1 *.rng | sed -e 's/.*-//' -e 's/.rng//' | sort -un) RNG_generated = pacemaker.rng $(foreach base,$(RNG_versions),pacemaker-$(base).rng) versions.rng diff --git a/xml/constraints-2.2.rng b/xml/constraints-2.2.rng new file mode 100644 index 0000000..216bf9c --- /dev/null +++ b/xml/constraints-2.2.rng @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group + listed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stop + demote + fence + freeze + + + + + + + + + always + never + exclusive + + + + + + start + promote + demote + stop + + + + + + Stopped + Started + Master + Slave + + + + + + Optional + Mandatory + Serialize + + + + + + + + + + + + diff --git a/xml/constraints-next.rng b/xml/constraints-next.rng index 051603d..0defe8f 100644 --- a/xml/constraints-next.rng +++ b/xml/constraints-next.rng @@ -49,6 +49,11 @@ + + + + + @@ -65,6 +70,14 @@ + + + group + listed + + + + @@ -206,6 +219,14 @@ + + + always + never + exclusive + + + start