diff --git a/bug-728579_pacemaker-stonith-dev-id.diff b/bug-728579_pacemaker-stonith-dev-id.diff index a7a8b7c..6d4f646 100644 --- a/bug-728579_pacemaker-stonith-dev-id.diff +++ b/bug-728579_pacemaker-stonith-dev-id.diff @@ -4,11 +4,11 @@ Date: Fri Nov 11 14:03:56 2011 +0800 Medium: stonith: Expose IDs of stonith resources to stonith agents through "$CRM_meta_st_device_id" environment variable -diff --git a/fencing/commands.c b/fencing/commands.c -index 8269d30..103389f 100644 ---- a/fencing/commands.c -+++ b/fencing/commands.c -@@ -368,6 +368,8 @@ static stonith_device_t *build_device_from_xml(xmlNode *msg) +Index: pacemaker/fencing/commands.c +=================================================================== +--- pacemaker.orig/fencing/commands.c ++++ pacemaker/fencing/commands.c +@@ -376,6 +376,8 @@ static stonith_device_t *build_device_fr device->agent = crm_element_value_copy(dev, "agent"); device->namespace = crm_element_value_copy(dev, "namespace"); device->params = xml2list(dev); @@ -17,11 +17,11 @@ index 8269d30..103389f 100644 device->work = mainloop_add_trigger(G_PRIORITY_HIGH, stonith_device_dispatch, device); /* TODO: Hook up priority */ -diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c -index 205bda8..a16fab9 100644 ---- a/lib/fencing/st_client.c -+++ b/lib/fencing/st_client.c -@@ -483,6 +483,8 @@ run_stonith_agent(const char *agent, const char *action, const char *victim, +Index: pacemaker/lib/fencing/st_client.c +=================================================================== +--- pacemaker.orig/lib/fencing/st_client.c ++++ pacemaker/lib/fencing/st_client.c +@@ -558,6 +558,8 @@ run_stonith_agent(const char *agent, con } else { /* child */ @@ -29,8 +29,8 @@ index 205bda8..a16fab9 100644 + const char *st_dev_id_value = NULL; close(1); - if (dup(c_write_fd) < 0) -@@ -499,6 +501,11 @@ run_stonith_agent(const char *agent, const char *action, const char *victim, + /* coverity[leaked_handle] False positive */ +@@ -577,6 +579,11 @@ run_stonith_agent(const char *agent, con close(p_read_fd); close(p_write_fd); diff --git a/pacemaker-abi-compliance.diff b/pacemaker-abi-compliance.diff deleted file mode 100644 index 4bd6bb7..0000000 --- a/pacemaker-abi-compliance.diff +++ /dev/null @@ -1,48 +0,0 @@ -commit 7f95c09d53cae9c5a6e2348c2d4ad7fd5e59affe -Author: Gao,Yan -Date: Tue Dec 13 14:15:01 2011 +0800 - - Meidum: Core: Move several new fields since v1.1.6 to the end of the data types for ABI compliance - -diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h -index 1110248..8b00e09 100644 ---- a/include/crm/pengine/status.h -+++ b/include/crm/pengine/status.h -@@ -90,7 +90,6 @@ typedef struct pe_working_set_s { - GHashTable *config_hash; - GHashTable *domains; - GHashTable *tickets; -- GHashTable *template_rsc_sets; - - GListPtr nodes; - GListPtr resources; -@@ -113,6 +112,8 @@ typedef struct pe_working_set_s { - /* final output */ - xmlNode *graph; - -+ GHashTable *template_rsc_sets; -+ - } pe_working_set_t; - - struct node_shared_s { -diff --git a/include/crm/transition.h b/include/crm/transition.h -index 22f095f..02eff03 100644 ---- a/include/crm/transition.h -+++ b/include/crm/transition.h -@@ -96,7 +96,6 @@ typedef struct crm_graph_s { - int num_synapses; - - int batch_limit; -- int migration_limit; - int network_delay; - int stonith_timeout; - int transition_timeout; -@@ -108,6 +107,8 @@ typedef struct crm_graph_s { - int incomplete; - - GListPtr synapses; /* synpase_t* */ -+ -+ int migration_limit; - GHashTable *migrating; - - } crm_graph_t; diff --git a/pacemaker-cib-new-segfault.diff b/pacemaker-cib-new-segfault.diff deleted file mode 100644 index bcda772..0000000 --- a/pacemaker-cib-new-segfault.diff +++ /dev/null @@ -1,18 +0,0 @@ -commit 7da9e833b63d83c32852154481572f816754c114 -Author: Gao,Yan -Date: Tue Dec 20 05:45:15 2011 +0800 - - Medium: cib: Bug cl#5023 - Fix segfault caused by destroying an already freed hash table - -diff --git a/lib/cib/cib_client.c b/lib/cib/cib_client.c -index 26c0205..523c9d8 100644 ---- a/lib/cib/cib_client.c -+++ b/lib/cib/cib_client.c -@@ -412,6 +412,7 @@ cib_delete(cib_t * cib) - } - - g_hash_table_destroy(cib_op_callback_table); -+ cib_op_callback_table = NULL; - cib->cmds->free(cib); - cib = NULL; - } diff --git a/pacemaker-coverity-defects.diff b/pacemaker-coverity-defects.diff deleted file mode 100644 index e16d21b..0000000 --- a/pacemaker-coverity-defects.diff +++ /dev/null @@ -1,76 +0,0 @@ -commit 54001929bb3faf05d25176cdc84097ec5fa0979f -Author: Gao,Yan -Date: Mon Mar 26 12:22:32 2012 +0800 - - High: Resolve coverity RESOURCE_LEAK, REVERSE_INULL and UNREACHABLE defects - -diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c -index 4a8a20f..3485f78 100644 ---- a/lib/pengine/unpack.c -+++ b/lib/pengine/unpack.c -@@ -548,10 +548,12 @@ get_ticket_state_legacy(gpointer key, gpointer value, gpointer user_data) - } - - if (ticket_id == NULL || strlen(ticket_id) == 0) { -+ crm_free(state_key); - return; - } - - if (state_key == NULL || strlen(state_key) == 0) { -+ crm_free(state_key); - return; - } - -@@ -559,6 +561,7 @@ get_ticket_state_legacy(gpointer key, gpointer value, gpointer user_data) - if (ticket == NULL) { - ticket = ticket_new(ticket_id, data_set); - if (ticket == NULL) { -+ crm_free(state_key); - return; - } - } -diff --git a/tools/crm_ticket.c b/tools/crm_ticket.c -index e822de4..aec9e98 100644 ---- a/tools/crm_ticket.c -+++ b/tools/crm_ticket.c -@@ -308,7 +308,7 @@ find_ticket_state_attr_legacy(cib_t * the_cib, const char *attr, const char *tic - - if (attr_name) { - const char *attr_prefix = NULL; -- const char *long_key = NULL; -+ char *long_key = NULL; - - if (crm_str_eq(attr_name, "granted", TRUE)) { - attr_prefix = "granted-ticket"; -@@ -321,6 +321,8 @@ find_ticket_state_attr_legacy(cib_t * the_cib, const char *attr, const char *tic - offset += snprintf(xpath_string + offset, xpath_max - offset, " and "); - } - offset += snprintf(xpath_string + offset, xpath_max - offset, "@name=\"%s\"", long_key); -+ -+ crm_free(long_key); - } - offset += snprintf(xpath_string + offset, xpath_max - offset, "]"); - -@@ -763,6 +765,13 @@ main(int argc, char **argv) - set_working_set_defaults(&data_set); - - cib_conn = cib_new(); -+ if (cib_conn == NULL) { -+ rc = cib_connection; -+ CMD_ERR("Error initiating the connection to the CIB service: %s\n", -+ cib_error2string(rc)); -+ return rc; -+ } -+ - rc = cib_conn->cmds->signon(cib_conn, crm_system_name, cib_command); - if (rc != cib_ok) { - CMD_ERR("Error signing on to the CIB service: %s\n", cib_error2string(rc)); -@@ -933,7 +942,7 @@ main(int argc, char **argv) - - ticket = find_ticket(ticket_id, &data_set); - if (ticket == NULL) { -- return cib_NOTEXISTS; -+ rc = cib_NOTEXISTS; - goto bail; - } - diff --git a/pacemaker-crm-proc-flag.patch b/pacemaker-crm-proc-flag.patch new file mode 100644 index 0000000..c8158fd --- /dev/null +++ b/pacemaker-crm-proc-flag.patch @@ -0,0 +1,43 @@ +commit 3e12eebb6cb2636054f42198222e52a28da40056 +Author: Gao,Yan +Date: Fri May 18 10:48:49 2012 +0800 + + High: Core: Revert to the original process flags for the support of rolling-upgrade + +diff --git a/include/crm/ais.h b/include/crm/ais.h +index cf00fff..f2615d6 100644 +--- a/include/crm/ais.h ++++ b/include/crm/ais.h +@@ -107,22 +107,22 @@ enum crm_proc_flag { + crm_proc_none = 0x00000001, + + /* 3 messaging types */ +- crm_proc_heartbeat = 0x00000100, +- crm_proc_plugin = 0x00000200, +- crm_proc_cpg = 0x00000400, ++ crm_proc_heartbeat = 0x01000000, ++ crm_proc_plugin = 0x00000002, ++ crm_proc_cpg = 0x04000000, + +- crm_proc_lrmd = 0x00001000, +- crm_proc_cib = 0x00002000, +- crm_proc_crmd = 0x00004000, +- crm_proc_attrd = 0x00008000, ++ crm_proc_lrmd = 0x00000010, ++ crm_proc_cib = 0x00000100, ++ crm_proc_crmd = 0x00000200, ++ crm_proc_attrd = 0x00001000, + + crm_proc_pe = 0x00010000, + crm_proc_te = 0x00020000, + +- crm_proc_stonithd = 0x00100000, +- crm_proc_stonith_ng= 0x00200000, ++ crm_proc_stonithd = 0x00002000, ++ crm_proc_stonith_ng= 0x00100000, + +- crm_proc_mgmtd = 0x01000000, ++ crm_proc_mgmtd = 0x00040000, + }; + /* *INDENT-ON* */ + diff --git a/pacemaker-crm_mon-tickets.diff b/pacemaker-crm_mon-tickets.diff deleted file mode 100644 index b8e5ab7..0000000 --- a/pacemaker-crm_mon-tickets.diff +++ /dev/null @@ -1,109 +0,0 @@ -commit 147890c8f9200960b3212a4a5acca4240f20451d -Author: Gao,Yan -Date: Sun Mar 25 16:27:38 2012 +0800 - - High: Tools: crm_mon - Support to display tickets (based on Yuusuke Iida's work) - -diff --git a/tools/Makefile.am b/tools/Makefile.am -index 2c2192c..9922bfe 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -95,6 +95,7 @@ crm_diff_LDADD = $(COMMONLIBS) - - crm_mon_SOURCES = crm_mon.c - crm_mon_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \ -+ $(top_builddir)/pengine/libpengine.la \ - $(COMMONLIBS) $(SNMPLIBS) $(ESMTPLIBS) -llrm - - # Arguments could be made that this should live in crm/pengine -diff --git a/tools/crm_mon.c b/tools/crm_mon.c -index b71e574..3f6ad37 100644 ---- a/tools/crm_mon.c -+++ b/tools/crm_mon.c -@@ -43,6 +43,7 @@ - #include - #include - #include <../lib/pengine/unpack.h> -+#include <../pengine/pengine.h> - - /* GMainLoop *mainloop = NULL; */ - -@@ -88,6 +89,7 @@ gboolean print_timing = FALSE; - gboolean print_nodes_attr = FALSE; - gboolean print_last_updated = TRUE; - gboolean print_last_change = TRUE; -+gboolean print_tickets = FALSE; - - #define FILTER_STR {"shutdown", "terminate", "standby", "fail-count", \ - "last-failure", "probe_complete", "#id", "#uname", \ -@@ -300,7 +302,8 @@ static struct crm_option long_options[] = { - {"failcounts", 0, 0, 'f', "\tDisplay resource fail counts"}, - {"operations", 0, 0, 'o', "\tDisplay resource operation history" }, - {"timing-details", 0, 0, 't', "\tDisplay resource operation history with timing details" }, -- {"show-node-attributes", 0, 0, 'A', "Display node attributes\n" }, -+ {"show-node-attributes", 0, 0, 'A', "Display node attributes" }, -+ {"tickets", 0, 0, 'c', "\t\tDisplay cluster tickets"}, - - {"-spacer-", 1, 0, '-', "\nAdditional Options:"}, - {"interval", 1, 0, 'i', "\tUpdate frequency in seconds" }, -@@ -400,6 +403,9 @@ main(int argc, char **argv) - case 'A': - print_nodes_attr = TRUE; - break; -+ case 'c': -+ print_tickets = TRUE; -+ break; - case 'p': - crm_free(pid_file); - pid_file = crm_strdup(optarg); -@@ -948,6 +954,38 @@ print_node_summary(pe_working_set_t * data_set, gboolean operations) - } - } - -+static void -+print_ticket(gpointer name, gpointer value, gpointer data) -+{ -+ ticket_t *ticket = (ticket_t *) value; -+ -+ print_as(" %s\t%s%10s", ticket->id, -+ ticket->granted ? "granted":"revoked", -+ ticket->standby ? " [standby]":""); -+ if (ticket->last_granted > -1) { -+ print_as(" last-granted="); -+ print_date(ticket->last_granted); -+ } -+ print_as("\n"); -+ -+ return; -+} -+ -+static void -+print_cluster_tickets(pe_working_set_t * data_set) -+{ -+ xmlNode *cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS, data_set->input); -+ -+ /* For recording the tickets that are referenced in rsc_ticket constraints -+ * but have never been granted yet. */ -+ unpack_constraints(cib_constraints, data_set); -+ -+ print_as("\nTickets:\n"); -+ g_hash_table_foreach(data_set->tickets, print_ticket, NULL); -+ -+ return; -+} -+ - static char * - add_list_element(char *list, const char *value) - { -@@ -1209,6 +1247,11 @@ print_status(pe_working_set_t * data_set) - print_as("): %s\n", execra_code2string(val)); - } - } -+ -+ if (print_tickets) { -+ print_cluster_tickets(data_set); -+ } -+ - #if CURSES_ENABLED - if (as_console) { - refresh(); diff --git a/pacemaker-crm_simulate-ticket-state.diff b/pacemaker-crm_simulate-ticket-state.diff deleted file mode 100644 index 37c3a48..0000000 --- a/pacemaker-crm_simulate-ticket-state.diff +++ /dev/null @@ -1,206 +0,0 @@ -commit 1631d9396f69ac54f0b4f84a5f7ab6d016026c87 -Author: Gao,Yan -Date: Sun Mar 25 22:34:05 2012 +0800 - - High: Tools: crm_simulate - Support to grant/revoke/standby/activate tickets from the new ticket state section - -diff --git a/tools/crm_inject.c b/tools/crm_inject.c -index 9024e31..c068613 100644 ---- a/tools/crm_inject.c -+++ b/tools/crm_inject.c -@@ -755,10 +755,91 @@ create_dotfile(pe_working_set_t * data_set, const char *dot_file, gboolean all_a - } - } - -+static int -+find_ticket_state(cib_t * the_cib, const char * ticket_id, xmlNode ** ticket_state_xml) -+{ -+ int offset = 0; -+ static int xpath_max = 1024; -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_search = NULL; -+ -+ char *xpath_string = NULL; -+ -+ CRM_ASSERT(ticket_state_xml != NULL); -+ *ticket_state_xml = NULL; -+ -+ crm_malloc0(xpath_string, xpath_max); -+ offset += -+ snprintf(xpath_string + offset, xpath_max - offset, "%s", "/cib/status/tickets"); -+ -+ if (ticket_id) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "/%s[@id=\"%s\"]", -+ XML_CIB_TAG_TICKET_STATE, ticket_id); -+ } -+ -+ rc = the_cib->cmds->query(the_cib, xpath_string, &xml_search, -+ cib_sync_call | cib_scope_local | cib_xpath); -+ -+ if (rc != cib_ok) { -+ goto bail; -+ } -+ -+ crm_log_xml_debug(xml_search, "Match"); -+ if (xml_has_children(xml_search)) { -+ if (ticket_id) { -+ fprintf(stdout, "Multiple ticket_states match ticket_id=%s\n", ticket_id); -+ } -+ *ticket_state_xml = xml_search; -+ } else { -+ *ticket_state_xml = xml_search; -+ } -+ -+ bail: -+ crm_free(xpath_string); -+ return rc; -+} -+ -+static int -+set_ticket_state_attr(const char *ticket_id, const char *attr_name, -+ const char *attr_value, cib_t * cib, int cib_options) -+{ -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_top = NULL; -+ xmlNode *ticket_state_xml = NULL; -+ -+ rc = find_ticket_state(cib, ticket_id, &ticket_state_xml); -+ if (rc == cib_ok) { -+ crm_debug("Found a match state for ticket: id=%s", ticket_id); -+ xml_top = ticket_state_xml; -+ -+ } else if (rc != cib_NOTEXISTS) { -+ return rc; -+ -+ } else { -+ xmlNode *xml_obj = NULL; -+ -+ xml_top = create_xml_node(NULL, XML_CIB_TAG_STATUS); -+ xml_obj = create_xml_node(xml_top, XML_CIB_TAG_TICKETS); -+ ticket_state_xml = create_xml_node(xml_obj, XML_CIB_TAG_TICKET_STATE); -+ crm_xml_add(ticket_state_xml, XML_ATTR_ID, ticket_id); -+ } -+ -+ crm_xml_add(ticket_state_xml, attr_name, attr_value); -+ -+ crm_log_xml_debug(xml_top, "Update"); -+ -+ rc = cib->cmds->modify(cib, XML_CIB_TAG_STATUS, xml_top, cib_options); -+ -+ free_xml(xml_top); -+ -+ return rc; -+} -+ - static void - modify_configuration(pe_working_set_t * data_set, - const char *quorum, GListPtr node_up, GListPtr node_down, GListPtr node_fail, -- GListPtr op_inject, GListPtr ticket_grant, GListPtr ticket_revoke) -+ GListPtr op_inject, GListPtr ticket_grant, GListPtr ticket_revoke, -+ GListPtr ticket_standby, GListPtr ticket_activate) - { - int rc = cib_ok; - GListPtr gIter = NULL; -@@ -818,29 +899,41 @@ modify_configuration(pe_working_set_t * data_set, - } - - for (gIter = ticket_grant; gIter != NULL; gIter = gIter->next) { -- char *ticket = (char *)gIter->data; -- char *attr_name = crm_concat("granted-ticket", ticket, '-'); -- -- quiet_log(" + Granting ticket %s\n", ticket); -- rc = update_attr(global_cib, cib_sync_call | cib_scope_local, -- XML_CIB_TAG_TICKETS, NULL, NULL, NULL, NULL, -- attr_name, "true", TRUE); -+ char *ticket_id = (char *)gIter->data; - -- crm_free(attr_name); -+ quiet_log(" + Granting ticket %s\n", ticket_id); -+ rc = set_ticket_state_attr(ticket_id, "granted", "true", -+ global_cib, cib_sync_call | cib_scope_local); - - CRM_ASSERT(rc == cib_ok); - } - - for (gIter = ticket_revoke; gIter != NULL; gIter = gIter->next) { -- char *ticket = (char *)gIter->data; -- char *attr_name = crm_concat("granted-ticket", ticket, '-'); -+ char *ticket_id = (char *)gIter->data; -+ -+ quiet_log(" + Revoking ticket %s\n", ticket_id); -+ rc = set_ticket_state_attr(ticket_id, "granted", "false", -+ global_cib, cib_sync_call | cib_scope_local); - -- quiet_log(" + Revoking ticket %s\n", ticket); -- rc = update_attr(global_cib, cib_sync_call | cib_scope_local, -- XML_CIB_TAG_TICKETS, NULL, NULL, NULL, NULL, -- attr_name, "false", TRUE); -+ CRM_ASSERT(rc == cib_ok); -+ } -+ -+ for (gIter = ticket_standby; gIter != NULL; gIter = gIter->next) { -+ char *ticket_id = (char *)gIter->data; -+ -+ quiet_log(" + Making ticket %s standby\n", ticket_id); -+ rc = set_ticket_state_attr(ticket_id, "standby", "true", -+ global_cib, cib_sync_call | cib_scope_local); -+ -+ CRM_ASSERT(rc == cib_ok); -+ } -+ -+ for (gIter = ticket_activate; gIter != NULL; gIter = gIter->next) { -+ char *ticket_id = (char *)gIter->data; - -- crm_free(attr_name); -+ quiet_log(" + Activating ticket %s\n", ticket_id); -+ rc = set_ticket_state_attr(ticket_id, "standby", "false", -+ global_cib, cib_sync_call | cib_scope_local); - - CRM_ASSERT(rc == cib_ok); - } -@@ -999,8 +1092,10 @@ static struct crm_option long_options[] = { - {"op-fail", 1, 0, 'F', "\t$rsc_$task_$interval@$node=$rc - Fail the specified task while running the simulation"}, - {"set-datetime", 1, 0, 't', "Set date/time"}, - {"quorum", 1, 0, 'q', "\tSpecify a value for quorum"}, -- {"ticket-grant", 1, 0, 'g', "Grant a ticket"}, -- {"ticket-revoke",1, 0, 'r', "Revoke a ticket"}, -+ {"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"}, -+ {"ticket-activate", 1, 0, 'e', "Activate a ticket"}, - - {"-spacer-", 0, 0, '-', "\nOutput Options:"}, - -@@ -1122,6 +1217,8 @@ main(int argc, char **argv) - GListPtr op_inject = NULL; - GListPtr ticket_grant = NULL; - GListPtr ticket_revoke = NULL; -+ GListPtr ticket_standby = NULL; -+ GListPtr ticket_activate = NULL; - - xmlNode *input = NULL; - -@@ -1203,6 +1300,14 @@ main(int argc, char **argv) - modified++; - ticket_revoke = g_list_append(ticket_revoke, optarg); - break; -+ case 'b': -+ modified++; -+ ticket_standby = g_list_append(ticket_standby, optarg); -+ break; -+ case 'e': -+ modified++; -+ ticket_activate = g_list_append(ticket_activate, optarg); -+ break; - case 'a': - all_actions = TRUE; - break; -@@ -1290,7 +1395,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, -- ticket_grant, ticket_revoke); -+ ticket_grant, ticket_revoke, ticket_standby, ticket_activate); - - rc = global_cib->cmds->query(global_cib, NULL, &input, cib_sync_call); - if (rc != cib_ok) { diff --git a/pacemaker-crm_ticket-all-tickets.diff b/pacemaker-crm_ticket-all-tickets.diff deleted file mode 100644 index 33a2860..0000000 --- a/pacemaker-crm_ticket-all-tickets.diff +++ /dev/null @@ -1,39 +0,0 @@ -commit dfdf37641c0bfc405673b4b324bd7d4304004685 -Author: Gao,Yan -Date: Sun Mar 25 15:09:25 2012 +0800 - - Medium: Tools: crm_ticket - Display the tickets that are referenced in rsc_ticket constraints but have never been granted yet. - -diff --git a/tools/crm_ticket.c b/tools/crm_ticket.c -index f90ba23..e822de4 100644 ---- a/tools/crm_ticket.c -+++ b/tools/crm_ticket.c -@@ -40,6 +40,8 @@ - #include - #include - -+#include <../pengine/pengine.h> -+ - gboolean do_force = FALSE; - gboolean BE_QUIET = FALSE; - const char *ticket_id = NULL; -@@ -653,6 +655,7 @@ main(int argc, char **argv) - { - pe_working_set_t data_set; - xmlNode *cib_xml_copy = NULL; -+ xmlNode *cib_constraints = NULL; - - cib_t *cib_conn = NULL; - enum cib_errors rc = cib_ok; -@@ -783,6 +786,11 @@ main(int argc, char **argv) - - cluster_status(&data_set); - -+ /* For recording the tickets that are referenced in rsc_ticket constraints -+ * but have never been granted yet. */ -+ cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS, data_set.input); -+ unpack_constraints(cib_constraints, &data_set); -+ - if (ticket_cmd == 'l' || ticket_cmd == 'L' || ticket_cmd == 'w') { - gboolean raw = FALSE; - gboolean details = FALSE; diff --git a/pacemaker-crm_ticket-force.diff b/pacemaker-crm_ticket-force.diff deleted file mode 100644 index 9595f8f..0000000 --- a/pacemaker-crm_ticket-force.diff +++ /dev/null @@ -1,143 +0,0 @@ -commit e0733a32d39bf673e0ef886dacfbe452f0110967 -Author: Gao,Yan -Date: Wed Mar 14 20:41:34 2012 +0800 - - Medium: Tools: crm_ticket - Granting/revoking tickets need user to confirm unless "--force" option is used - -diff --git a/tools/crm_ticket b/tools/crm_ticket -index 27c6fd2..640a541 100755 ---- a/tools/crm_ticket -+++ b/tools/crm_ticket -@@ -2,10 +2,12 @@ - - options="" - ticket="" --granted="" -+update_value="" - last_granted="" -+delete_attr="false" -+force="false" - --TEMP=`getopt -o DGQVThU:v:i:t: --long help,version,ticket:,attr-value:,delete-attr,get-value,attr-id:,quiet,time \ -+TEMP=`getopt -o DGQVThfv:i:t: --long help,version,ticket:,attr-value:,delete-attr,get-value,attr-id:,force,quiet,time \ - -n 'crm_ticket' -- "$@"` - - if [ $? != 0 ] ; then echo "crm_ticket - A convenience wrapper for crm_attribute"; echo ""; crm_attribute -?; exit 1 ; fi -@@ -13,13 +15,39 @@ if [ $? != 0 ] ; then echo "crm_ticket - A convenience wrapper for crm_attribute - # Note the quotes around `$TEMP': they are essential! - eval set -- "$TEMP" - -+confirm() { -+ action=$1 -+ ticket=$2 -+ -+ if [ X$action = X"grant" ]; then -+ warning="The crm_ticket command cannot help you verify if '$ticket' is already granted elsewhere." -+ word="to" -+ else -+ warning="Revoking '$ticket' will trigger the specified 'loss-policy' relating to '$ticket'." -+ word="from" -+ fi -+ -+ while :; do -+ printf "$warning\nAre you sure you want to $action '$ticket' $word this site? (y/n)" -+ read ans -+ if echo $ans | grep -iqs '^[yn]'; then -+ echo $ans | grep -iqs '^y' -+ return $? -+ else -+ echo Please answer with y or n -+ fi -+ done -+} -+ - while true ; do - case "$1" in -- -v|--attr-value) options="$options $1 $2"; granted=$2; shift; shift;; -+ -v|--attr-value) options="$options $1 $2"; update_value=$2; shift; shift;; - -i|--attr-id) options="$options $1 $2"; shift; shift;; -- -Q|--quiet|-D|--delete-attr|-G|--get-value|-V) options="$options $1"; shift;; -+ -D|--delete-attr) options="$options $1"; delete_attr="true"; shift;; -+ -Q|--quiet|-G|--get-value|-V) options="$options $1"; shift;; - -t|--ticket-id) ticket=$2; shift; shift;; - -T|--time) last_granted="time"; shift;; -+ -f|--force) force="true"; shift;; - --version) crm_attribute --version; exit 0;; - -h|--help) - echo "crm_ticket - A convenience wrapper for crm_attribute"; -@@ -43,6 +71,7 @@ while true ; do - echo "" - echo "Additional Options:" - echo " -i, --id=value (Advanced) The ID used to identify the attribute" -+ echo " -f, --force (Advanced) Force the action to be performed" - exit 0;; - --) shift ; break ;; - *) echo "Unknown option: $1. See --help for details." exit 1;; -@@ -58,8 +87,12 @@ else - options="$options -n granted-ticket-$ticket" - fi - --case "$granted" in -+case "$update_value" in - true|yes|1) -+ if [ X$force != X"true" ]; then -+ confirm "grant" $ticket || exit 1 -+ fi -+ - crm_attribute $options -t tickets >/dev/null 2>&1 - rc=$? - if [ $rc = 0 ]; then -@@ -73,8 +106,17 @@ case "$granted" in - fi - ;; - *) -- crm_attribute $options -t tickets -d false -- rc=$? -- exit $rc -+ if [ X$update_value != X -o X$delete_attr = X"true" ]; then -+ if [ X$force != X"true" ]; then -+ confirm "revoke" $ticket || exit 1 -+ fi -+ crm_attribute $options -t tickets >/dev/null 2>&1 -+ rc=$? -+ exit $rc -+ else -+ crm_attribute $options -t tickets -d false -+ rc=$? -+ exit $rc -+ fi - ;; - esac -diff --git a/tools/regression.exp b/tools/regression.exp -index d277c9d..9c672fb 100755 ---- a/tools/regression.exp -+++ b/tools/regression.exp -@@ -926,8 +926,6 @@ scope=tickets name=granted-ticket-ticketA value=false - - - * Passed: crm_ticket - Query granted-ticket value --Deleted tickets option: id=status-tickets-granted-ticket-ticketA name=granted-ticket-ticketA -- - - - -diff --git a/tools/regression.sh b/tools/regression.sh -index 3fc9fb1..a6893dc 100755 ---- a/tools/regression.sh -+++ b/tools/regression.sh -@@ -173,13 +173,13 @@ function test_tools() { - crm_ticket -t ticketA -G - assert $? 0 crm_ticket "Default granted-ticket value" - -- crm_ticket -t ticketA -v false -+ crm_ticket -t ticketA -v false --force - assert $? 0 crm_ticket "Set granted-ticket value" - - crm_ticket -t ticketA -G - assert $? 0 crm_ticket "Query granted-ticket value" - -- crm_ticket -t ticketA -D -+ crm_ticket -t ticketA -D --force - assert $? 0 crm_ticket "Delete granted-ticket value" - } - diff --git a/pacemaker-crm_ticket-tests-standby.diff b/pacemaker-crm_ticket-tests-standby.diff deleted file mode 100644 index 0e019f3..0000000 --- a/pacemaker-crm_ticket-tests-standby.diff +++ /dev/null @@ -1,238 +0,0 @@ -commit 0f60f521e85fac6f185f6f5fb71163f7a3772e2b -Author: Gao,Yan -Date: Sat Mar 24 09:40:00 2012 +0800 - - Low: Tools: Add CLI regression tests for ticket standby state - -diff --git a/tools/regression.exp b/tools/regression.exp -index af3fed9..342a8fa 100755 ---- a/tools/regression.exp -+++ b/tools/regression.exp -@@ -842,7 +842,7 @@ false - - - --* Passed: crm_ticket - Default granted-ticket value -+* Passed: crm_ticket - Default ticket granted state - - - -@@ -881,7 +881,7 @@ false - - - --* Passed: crm_ticket - Set granted-ticket value -+* Passed: crm_ticket - Set ticket granted state - false - - -@@ -921,7 +921,7 @@ false - - - --* Passed: crm_ticket - Query granted-ticket value -+* Passed: crm_ticket - Query ticket granted state - Deleted ticketA state attribute: name=granted - - -@@ -961,4 +961,162 @@ Deleted ticketA state attribute: name=granted - - - --* Passed: crm_ticket - Delete granted-ticket value -+* Passed: crm_ticket - Delete ticket granted state -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+* Passed: crm_ticket - Make a ticket standby -+true -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+* Passed: crm_ticket - Query ticket standby state -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+* Passed: crm_ticket - Activate a ticket -+Deleted ticketA state attribute: name=standby -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+* Passed: crm_ticket - Delete ticket standby state -diff --git a/tools/regression.sh b/tools/regression.sh -index e8844ec..e7ef151 100755 ---- a/tools/regression.sh -+++ b/tools/regression.sh -@@ -171,16 +171,28 @@ function test_tools() { - assert $? 0 crm_resource "Un-migrate a resource" - - crm_ticket -t ticketA -G granted -d false -- assert $? 0 crm_ticket "Default ticket state attribute" -+ assert $? 0 crm_ticket "Default ticket granted state" - - crm_ticket -t ticketA -r --force -- assert $? 0 crm_ticket "Set ticket state attribute" -+ assert $? 0 crm_ticket "Set ticket granted state" - - crm_ticket -t ticketA -G granted -- assert $? 0 crm_ticket "Query ticket state attribute" -+ assert $? 0 crm_ticket "Query ticket granted state" - - crm_ticket -t ticketA -D granted --force -- assert $? 0 crm_ticket "Delete ticket state attribute" -+ assert $? 0 crm_ticket "Delete ticket granted state" -+ -+ crm_ticket -t ticketA -s -+ assert $? 0 crm_ticket "Make a ticket standby" -+ -+ crm_ticket -t ticketA -G standby -+ assert $? 0 crm_ticket "Query ticket standby state" -+ -+ crm_ticket -t ticketA -a -+ assert $? 0 crm_ticket "Activate a ticket" -+ -+ crm_ticket -t ticketA -D standby -+ assert $? 0 crm_ticket "Delete ticket standby state" - } - - test_tools 2>&1 | sed s/cib-last-written.*\>/\>/ > $test_home/regression.out diff --git a/pacemaker-crm_ticket-tests-update.diff b/pacemaker-crm_ticket-tests-update.diff deleted file mode 100644 index e635203..0000000 --- a/pacemaker-crm_ticket-tests-update.diff +++ /dev/null @@ -1,91 +0,0 @@ -commit 729f23fc8b3ba8f11608c5b9f6b44efe89f25db7 -Author: Gao,Yan -Date: Fri Mar 23 18:08:53 2012 +0800 - - Low: Tools: Update CLI regression tests for the new crm_ticket - -diff --git a/tools/regression.exp b/tools/regression.exp -index 9c672fb..af3fed9 100755 ---- a/tools/regression.exp -+++ b/tools/regression.exp -@@ -806,7 +806,7 @@ Error performing operation: The object/attribute does not exist - - - * Passed: crm_resource - Un-migrate a resource --scope=tickets name=granted-ticket-ticketA value=false -+false - - - -@@ -877,14 +877,12 @@ scope=tickets name=granted-ticket-ticketA value=false - - - -- -- -- -+ - - - - * Passed: crm_ticket - Set granted-ticket value --scope=tickets name=granted-ticket-ticketA value=false -+false - - - -@@ -919,13 +917,12 @@ scope=tickets name=granted-ticket-ticketA value=false - - - -- -- -- -+ - - - - * Passed: crm_ticket - Query granted-ticket value -+Deleted ticketA state attribute: name=granted - - - -@@ -960,7 +957,7 @@ scope=tickets name=granted-ticket-ticketA value=false - - - -- -+ - - - -diff --git a/tools/regression.sh b/tools/regression.sh -index a6893dc..e8844ec 100755 ---- a/tools/regression.sh -+++ b/tools/regression.sh -@@ -170,17 +170,17 @@ function test_tools() { - $VALGRIND_CMD crm_resource -r dummy -U - assert $? 0 crm_resource "Un-migrate a resource" - -- crm_ticket -t ticketA -G -- assert $? 0 crm_ticket "Default granted-ticket value" -+ crm_ticket -t ticketA -G granted -d false -+ assert $? 0 crm_ticket "Default ticket state attribute" - -- crm_ticket -t ticketA -v false --force -- assert $? 0 crm_ticket "Set granted-ticket value" -+ crm_ticket -t ticketA -r --force -+ assert $? 0 crm_ticket "Set ticket state attribute" - -- crm_ticket -t ticketA -G -- assert $? 0 crm_ticket "Query granted-ticket value" -+ crm_ticket -t ticketA -G granted -+ assert $? 0 crm_ticket "Query ticket state attribute" - -- crm_ticket -t ticketA -D --force -- assert $? 0 crm_ticket "Delete granted-ticket value" -+ crm_ticket -t ticketA -D granted --force -+ assert $? 0 crm_ticket "Delete ticket state attribute" - } - - test_tools 2>&1 | sed s/cib-last-written.*\>/\>/ > $test_home/regression.out diff --git a/pacemaker-crm_ticket-valgrind.diff b/pacemaker-crm_ticket-valgrind.diff deleted file mode 100644 index 1244a61..0000000 --- a/pacemaker-crm_ticket-valgrind.diff +++ /dev/null @@ -1,47 +0,0 @@ -commit cb823bb47fabc77ececaad3f2ba3de686e908a89 -Author: Gao,Yan -Date: Sun Mar 25 12:58:28 2012 +0800 - - Low: Tools: Add crm_ticket to be profiled by valgrind - -diff --git a/tools/regression.sh b/tools/regression.sh -index e7ef151..7f3c743 100755 ---- a/tools/regression.sh -+++ b/tools/regression.sh -@@ -170,28 +170,28 @@ function test_tools() { - $VALGRIND_CMD crm_resource -r dummy -U - assert $? 0 crm_resource "Un-migrate a resource" - -- crm_ticket -t ticketA -G granted -d false -+ $VALGRIND_CMD crm_ticket -t ticketA -G granted -d false - assert $? 0 crm_ticket "Default ticket granted state" - -- crm_ticket -t ticketA -r --force -+ $VALGRIND_CMD crm_ticket -t ticketA -r --force - assert $? 0 crm_ticket "Set ticket granted state" - -- crm_ticket -t ticketA -G granted -+ $VALGRIND_CMD crm_ticket -t ticketA -G granted - assert $? 0 crm_ticket "Query ticket granted state" - -- crm_ticket -t ticketA -D granted --force -+ $VALGRIND_CMD crm_ticket -t ticketA -D granted --force - assert $? 0 crm_ticket "Delete ticket granted state" - -- crm_ticket -t ticketA -s -+ $VALGRIND_CMD crm_ticket -t ticketA -s - assert $? 0 crm_ticket "Make a ticket standby" - -- crm_ticket -t ticketA -G standby -+ $VALGRIND_CMD crm_ticket -t ticketA -G standby - assert $? 0 crm_ticket "Query ticket standby state" - -- crm_ticket -t ticketA -a -+ $VALGRIND_CMD crm_ticket -t ticketA -a - assert $? 0 crm_ticket "Activate a ticket" - -- crm_ticket -t ticketA -D standby -+ $VALGRIND_CMD crm_ticket -t ticketA -D standby - assert $? 0 crm_ticket "Delete ticket standby state" - } - diff --git a/pacemaker-crm_ticket.diff b/pacemaker-crm_ticket.diff deleted file mode 100644 index 409d5d4..0000000 --- a/pacemaker-crm_ticket.diff +++ /dev/null @@ -1,1139 +0,0 @@ -commit 1fc6caa4665dacaee97e314ba3a292cfba873762 -Author: Gao,Yan -Date: Fri Mar 23 16:58:00 2012 +0800 - - High: Tools: Implement a new crm_ticket - -diff --git a/tools/Makefile.am b/tools/Makefile.am -index a2b2a87..2c2192c 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -31,7 +31,7 @@ header_HEADERS = attrd.h - pcmkdir = $(datadir)/$(PACKAGE) - pcmk_DATA = report.common report.collector - --sbin_SCRIPTS = crm_report crm_standby crm_master crm_failcount crm_ticket -+sbin_SCRIPTS = crm_report crm_standby crm_master crm_failcount - EXTRA_DIST = $(sbin_SCRIPTS) - - halibdir = $(CRM_DAEMON_DIR) -@@ -40,7 +40,7 @@ halib_PROGRAMS = attrd - halib_PYTHON = crm_primitive.py hb2openais-helper.py - - sbin_PROGRAMS = crm_simulate crmadmin cibadmin crm_node crm_attribute crm_resource crm_verify \ -- crm_uuid crm_shadow attrd_updater crm_diff crm_mon iso8601 -+ crm_uuid crm_shadow attrd_updater crm_diff crm_mon iso8601 crm_ticket - - testdir = $(datadir)/$(PACKAGE)/tests - test_SCRIPTS = coverage.sh -@@ -124,6 +124,12 @@ attrd_LDADD = $(top_builddir)/lib/cluster/libcrmcluster.la $(COMMONLIBS) - attrd_updater_SOURCES = attrd_updater.c - attrd_updater_LDADD = $(COMMONLIBS) - -+crm_ticket_SOURCES = crm_ticket.c -+crm_ticket_LDADD = $(top_builddir)/lib/pengine/libpe_rules.la \ -+ $(top_builddir)/lib/pengine/libpe_status.la \ -+ $(top_builddir)/pengine/libpengine.la \ -+ $(COMMONLIBS) -+ - if BUILD_SERVICELOG - notifyServicelogEvent_SOURCES = notifyServicelogEvent.c - notifyServicelogEvent_CFLAGS = $(SERVICELOG_CFLAGS) -diff --git a/tools/crm_ticket b/tools/crm_ticket -deleted file mode 100755 -index 640a541..0000000 ---- a/tools/crm_ticket -+++ /dev/null -@@ -1,122 +0,0 @@ --#!/bin/bash -- --options="" --ticket="" --update_value="" --last_granted="" --delete_attr="false" --force="false" -- --TEMP=`getopt -o DGQVThfv:i:t: --long help,version,ticket:,attr-value:,delete-attr,get-value,attr-id:,force,quiet,time \ -- -n 'crm_ticket' -- "$@"` -- --if [ $? != 0 ] ; then echo "crm_ticket - A convenience wrapper for crm_attribute"; echo ""; crm_attribute -?; exit 1 ; fi -- --# Note the quotes around `$TEMP': they are essential! --eval set -- "$TEMP" -- --confirm() { -- action=$1 -- ticket=$2 -- -- if [ X$action = X"grant" ]; then -- warning="The crm_ticket command cannot help you verify if '$ticket' is already granted elsewhere." -- word="to" -- else -- warning="Revoking '$ticket' will trigger the specified 'loss-policy' relating to '$ticket'." -- word="from" -- fi -- -- while :; do -- printf "$warning\nAre you sure you want to $action '$ticket' $word this site? (y/n)" -- read ans -- if echo $ans | grep -iqs '^[yn]'; then -- echo $ans | grep -iqs '^y' -- return $? -- else -- echo Please answer with y or n -- fi -- done --} -- --while true ; do -- case "$1" in -- -v|--attr-value) options="$options $1 $2"; update_value=$2; shift; shift;; -- -i|--attr-id) options="$options $1 $2"; shift; shift;; -- -D|--delete-attr) options="$options $1"; delete_attr="true"; shift;; -- -Q|--quiet|-G|--get-value|-V) options="$options $1"; shift;; -- -t|--ticket-id) ticket=$2; shift; shift;; -- -T|--time) last_granted="time"; shift;; -- -f|--force) force="true"; shift;; -- --version) crm_attribute --version; exit 0;; -- -h|--help) -- echo "crm_ticket - A convenience wrapper for crm_attribute"; -- echo ""; -- echo "Grants or revokes the specified ticket for the cluster"; -- echo ""; -- echo "Usage: crm_ticket -t ticket_name command [options]"; -- echo "Options:" -- echo " -h, --help This text" -- echo " --version Version information" -- echo " -V, --verbose Increase debug output" -- echo " -q, --quiet Print only the value on stdout" -- echo "" -- echo " -t, --ticket-id=value The ticket to update" -- echo "" -- echo "Commands:" -- echo " -G, --query Query if the specified ticket is granted or not" -- echo " -v, --update=value Grant/Revoke the specified ticket" -- echo " -D, --delete Delete the granting/revoking record" -- echo " -T, --time Query the time of last granted the specified ticket" -- echo "" -- echo "Additional Options:" -- echo " -i, --id=value (Advanced) The ID used to identify the attribute" -- echo " -f, --force (Advanced) Force the action to be performed" -- exit 0;; -- --) shift ; break ;; -- *) echo "Unknown option: $1. See --help for details." exit 1;; -- esac --done -- --if [ X$last_granted != X ]; then -- options="$options -n last-granted-$ticket -G -d -1" -- crm_attribute $options -t tickets -- rc=$? -- exit $rc --else -- options="$options -n granted-ticket-$ticket" --fi -- --case "$update_value" in -- true|yes|1) -- if [ X$force != X"true" ]; then -- confirm "grant" $ticket || exit 1 -- fi -- -- crm_attribute $options -t tickets >/dev/null 2>&1 -- rc=$? -- if [ $rc = 0 ]; then -- options="$options -n last-granted-$ticket -v `date +%s`" -- crm_attribute $options -t tickets >/dev/null 2>&1 -- rc=$? -- exit $rc -- else -- echo "Failed to grant ticket $ticket" -- exit $rc -- fi -- ;; -- *) -- if [ X$update_value != X -o X$delete_attr = X"true" ]; then -- if [ X$force != X"true" ]; then -- confirm "revoke" $ticket || exit 1 -- fi -- crm_attribute $options -t tickets >/dev/null 2>&1 -- rc=$? -- exit $rc -- else -- crm_attribute $options -t tickets -d false -- rc=$? -- exit $rc -- fi -- ;; --esac -diff --git a/tools/crm_ticket.c b/tools/crm_ticket.c -new file mode 100644 -index 0000000..f90ba23 ---- /dev/null -+++ b/tools/crm_ticket.c -@@ -0,0 +1,964 @@ -+ -+/* -+ * Copyright (C) 2012 Gao,Yan -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This software is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+gboolean do_force = FALSE; -+gboolean BE_QUIET = FALSE; -+const char *ticket_id = NULL; -+const char *attr_name = "granted"; -+const char *attr_value = NULL; -+const char *attr_id = NULL; -+const char *set_name = NULL; -+const char *attr_default = NULL; -+char ticket_cmd = 'S'; -+char *xml_file = NULL; -+int cib_options = cib_sync_call; -+ -+extern void cleanup_alloc_calculations(pe_working_set_t * data_set); -+ -+#define CMD_ERR(fmt, args...) do { \ -+ crm_warn(fmt, ##args); \ -+ fprintf(stderr, fmt, ##args); \ -+ } while(0) -+ -+static ticket_t * -+find_ticket(const char *ticket_id , pe_working_set_t * data_set) -+{ -+ ticket_t *ticket = NULL; -+ ticket = g_hash_table_lookup(data_set->tickets, ticket_id); -+ -+ return ticket; -+} -+ -+static void -+print_date(time_t time) -+{ -+ int lpc = 0; -+ char date_str[26]; -+ -+ asctime_r(localtime(&time), date_str); -+ for (; lpc < 26; lpc++) { -+ if (date_str[lpc] == '\n') { -+ date_str[lpc] = 0; -+ } -+ } -+ fprintf(stdout,"'%s'", date_str); -+} -+ -+static int -+print_ticket(ticket_t *ticket, gboolean raw, gboolean details) -+{ -+ if (raw) { -+ fprintf(stdout, "%s\n", ticket->id); -+ return cib_ok; -+ } -+ -+ fprintf(stdout, "%s\t%s %s", -+ ticket->id, ticket->granted?"granted":"revoked", -+ ticket->standby?"[standby]":" "); -+ -+ if (details && g_hash_table_size(ticket->state) > 0) { -+ GHashTableIter iter; -+ const char *name = NULL; -+ const char *value = NULL; -+ int lpc = 0; -+ -+ fprintf(stdout, " ("); -+ -+ g_hash_table_iter_init(&iter, ticket->state); -+ while (g_hash_table_iter_next(&iter, (void **)&name, (void **)&value)) { -+ if (lpc > 0) { -+ fprintf(stdout, ", "); -+ } -+ fprintf(stdout, "%s=", name); -+ if (crm_str_eq(name, "last-granted", TRUE) -+ || crm_str_eq(name, "expires", TRUE)) { -+ print_date(crm_parse_int(value, 0)); -+ } else { -+ fprintf(stdout, "%s", value); -+ } -+ lpc++; -+ } -+ -+ fprintf(stdout, ")\n"); -+ -+ } else { -+ if (ticket->last_granted > -1) { -+ fprintf(stdout, " last-granted="); -+ print_date(ticket->last_granted); -+ } -+ fprintf(stdout, "\n"); -+ } -+ -+ return cib_ok; -+} -+ -+static int -+print_ticket_list(pe_working_set_t * data_set, gboolean raw, gboolean details) -+{ -+ GHashTableIter iter; -+ ticket_t *ticket = NULL; -+ -+ g_hash_table_iter_init(&iter, data_set->tickets); -+ -+ while (g_hash_table_iter_next(&iter, NULL, (void **)&ticket)) { -+ print_ticket(ticket, raw, details); -+ } -+ -+ return cib_ok; -+} -+ -+static int -+find_ticket_state(cib_t * the_cib, const char * ticket_id, xmlNode ** ticket_state_xml) -+{ -+ int offset = 0; -+ static int xpath_max = 1024; -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_search = NULL; -+ -+ char *xpath_string = NULL; -+ -+ CRM_ASSERT(ticket_state_xml != NULL); -+ *ticket_state_xml = NULL; -+ -+ crm_malloc0(xpath_string, xpath_max); -+ offset += -+ snprintf(xpath_string + offset, xpath_max - offset, "%s", "/cib/status/tickets"); -+ -+ if (ticket_id) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "/%s[@id=\"%s\"]", -+ XML_CIB_TAG_TICKET_STATE, ticket_id); -+ } -+ -+ rc = the_cib->cmds->query(the_cib, xpath_string, &xml_search, -+ cib_sync_call | cib_scope_local | cib_xpath); -+ -+ if (rc != cib_ok) { -+ goto bail; -+ } -+ -+ crm_log_xml_debug(xml_search, "Match"); -+ if (xml_has_children(xml_search)) { -+ if (ticket_id) { -+ fprintf(stdout, "Multiple ticket_states match ticket_id=%s\n", ticket_id); -+ } -+ *ticket_state_xml = xml_search; -+ } else { -+ *ticket_state_xml = xml_search; -+ } -+ -+ bail: -+ crm_free(xpath_string); -+ return rc; -+} -+ -+static int -+find_ticket_constraints(cib_t * the_cib, const char * ticket_id, xmlNode ** ticket_cons_xml) -+{ -+ int offset = 0; -+ static int xpath_max = 1024; -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_search = NULL; -+ -+ char *xpath_string = NULL; -+ -+ CRM_ASSERT(ticket_cons_xml != NULL); -+ *ticket_cons_xml = NULL; -+ -+ crm_malloc0(xpath_string, xpath_max); -+ offset += -+ snprintf(xpath_string + offset, xpath_max - offset, "%s/%s", -+ get_object_path(XML_CIB_TAG_CONSTRAINTS), XML_CONS_TAG_RSC_TICKET); -+ -+ if (ticket_id) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "[@ticket=\"%s\"]", -+ ticket_id); -+ } -+ -+ rc = the_cib->cmds->query(the_cib, xpath_string, &xml_search, -+ cib_sync_call | cib_scope_local | cib_xpath); -+ -+ if (rc != cib_ok) { -+ goto bail; -+ } -+ -+ crm_log_xml_debug(xml_search, "Match"); -+ *ticket_cons_xml = xml_search; -+ -+ bail: -+ crm_free(xpath_string); -+ return rc; -+} -+ -+static int -+dump_ticket_xml(cib_t * the_cib, const char *ticket_id) -+{ -+ enum cib_errors rc = cib_ok; -+ xmlNode * state_xml = NULL; -+ -+ rc = find_ticket_state(the_cib, ticket_id, &state_xml); -+ -+ if (state_xml == NULL) { -+ return rc; -+ } -+ -+ fprintf(stdout, "State XML:\n"); -+ if (state_xml) { -+ char *state_xml_str = NULL; -+ -+ state_xml_str = dump_xml_formatted(state_xml); -+ fprintf(stdout, "\n%s\n", crm_str(state_xml_str)); -+ free_xml(state_xml); -+ crm_free(state_xml_str); -+ } -+ -+ return cib_ok; -+} -+ -+static int -+dump_constraints(cib_t * the_cib, const char * ticket_id) -+{ -+ enum cib_errors rc = cib_ok; -+ xmlNode * cons_xml = NULL; -+ char *cons_xml_str = NULL; -+ -+ rc = find_ticket_constraints(the_cib, ticket_id, &cons_xml); -+ -+ if (cons_xml == NULL) { -+ return rc; -+ } -+ -+ cons_xml_str = dump_xml_formatted(cons_xml); -+ fprintf(stdout, "Constraints XML:\n\n%s\n", crm_str(cons_xml_str)); -+ free_xml(cons_xml); -+ crm_free(cons_xml_str); -+ -+ return cib_ok; -+} -+ -+static int -+find_ticket_state_attr_legacy(cib_t * the_cib, const char *attr, const char *ticket_id, const char *set_type, -+ const char *set_name, const char *attr_id, const char *attr_name, char **value) -+{ -+ int offset = 0; -+ static int xpath_max = 1024; -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_search = NULL; -+ -+ char *xpath_string = NULL; -+ -+ CRM_ASSERT(value != NULL); -+ *value = NULL; -+ -+ crm_malloc0(xpath_string, xpath_max); -+ offset += -+ snprintf(xpath_string + offset, xpath_max - offset, "%s", "/cib/status/tickets"); -+ -+ if (set_type) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "/%s", set_type); -+ if (set_name) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "[@id=\"%s\"]", set_name); -+ } -+ } -+ -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "//nvpair["); -+ if (attr_id) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "@id=\"%s\"", attr_id); -+ } -+ -+ if (attr_name) { -+ const char *attr_prefix = NULL; -+ const char *long_key = NULL; -+ -+ if (crm_str_eq(attr_name, "granted", TRUE)) { -+ attr_prefix = "granted-ticket"; -+ } else { -+ attr_prefix = attr_name; -+ } -+ long_key = crm_concat(attr_prefix, ticket_id, '-'); -+ -+ if (attr_id) { -+ offset += snprintf(xpath_string + offset, xpath_max - offset, " and "); -+ } -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "@name=\"%s\"", long_key); -+ } -+ offset += snprintf(xpath_string + offset, xpath_max - offset, "]"); -+ -+ rc = the_cib->cmds->query(the_cib, xpath_string, &xml_search, -+ cib_sync_call | cib_scope_local | cib_xpath); -+ -+ if (rc != cib_ok) { -+ goto bail; -+ } -+ -+ crm_log_xml_debug(xml_search, "Match"); -+ if (xml_has_children(xml_search)) { -+ xmlNode *child = NULL; -+ -+ rc = cib_missing_data; -+ fprintf(stdout, "Multiple attributes match name=%s\n", attr_name); -+ -+ for (child = __xml_first_child(xml_search); child != NULL; child = __xml_next(child)) { -+ fprintf(stdout, " Value: %s \t(id=%s)\n", -+ crm_element_value(child, XML_NVPAIR_ATTR_VALUE), ID(child)); -+ } -+ -+ } else { -+ const char *tmp = crm_element_value(xml_search, attr); -+ -+ if (tmp) { -+ *value = crm_strdup(tmp); -+ } -+ } -+ -+ bail: -+ crm_free(xpath_string); -+ free_xml(xml_search); -+ return rc; -+} -+ -+static int -+delete_ticket_state_attr_legacy(const char *ticket_id, const char *set_name, const char *attr_id, -+ const char *attr_name, cib_t * cib) -+{ -+ xmlNode *xml_obj = NULL; -+ -+ int rc = cib_ok; -+ char *local_attr_id = NULL; -+ -+ rc = find_ticket_state_attr_legacy(cib, XML_ATTR_ID, ticket_id, XML_TAG_ATTR_SETS, set_name, attr_id, attr_name, -+ &local_attr_id); -+ -+ if (rc == cib_NOTEXISTS) { -+ return cib_ok; -+ -+ } else if (rc != cib_ok) { -+ return rc; -+ } -+ -+ if (attr_id == NULL) { -+ attr_id = local_attr_id; -+ } -+ -+ xml_obj = create_xml_node(NULL, XML_CIB_TAG_NVPAIR); -+ crm_xml_add(xml_obj, XML_ATTR_ID, attr_id); -+ /*crm_xml_add(xml_obj, XML_NVPAIR_ATTR_NAME, attr_name);*/ -+ -+ crm_log_xml_debug(xml_obj, "Delete"); -+ -+ rc = cib->cmds->delete(cib, XML_CIB_TAG_STATUS, xml_obj, cib_options); -+ -+ if (rc == cib_ok) { -+ fprintf(stdout, "Deleted legacy %s state attribute: id=%s%s%s%s%s\n", ticket_id, local_attr_id, -+ set_name ? " set=" : "", set_name ? set_name : "", -+ attr_name ? " name=" : "", attr_name ? attr_name : ""); -+ } -+ -+ free_xml(xml_obj); -+ crm_free(local_attr_id); -+ return rc; -+} -+ -+static int -+get_ticket_state_attr(const char *ticket_id, const char *attr_name, const char **attr_value, pe_working_set_t * data_set) -+{ -+ ticket_t *ticket = NULL; -+ -+ CRM_ASSERT(attr_value != NULL); -+ *attr_value = NULL; -+ -+ ticket = g_hash_table_lookup(data_set->tickets, ticket_id); -+ if (ticket == NULL) { -+ return cib_NOTEXISTS; -+ } -+ -+ *attr_value = g_hash_table_lookup(ticket->state, attr_name); -+ if (*attr_value == NULL) { -+ return cib_NOTEXISTS; -+ } -+ -+ return cib_ok; -+} -+ -+static int -+delete_ticket_state_attr(const char *ticket_id, const char *attr_name, cib_t * cib) -+{ -+ xmlNode *ticket_state_xml = NULL; -+ -+ int rc = cib_ok; -+ -+ rc = find_ticket_state(cib, ticket_id, &ticket_state_xml); -+ -+ if (rc == cib_NOTEXISTS) { -+ return cib_ok; -+ -+ } else if (rc != cib_ok) { -+ return rc; -+ } -+ -+ xml_remove_prop(ticket_state_xml, attr_name); -+ rc = cib->cmds->replace(cib, XML_CIB_TAG_STATUS, ticket_state_xml, cib_options); -+ -+ if (rc == cib_ok) { -+ fprintf(stdout, "Deleted %s state attribute: %s%s\n", ticket_id, -+ attr_name ? " name=" : "", attr_name ? attr_name : ""); -+ } -+ -+ free_xml(ticket_state_xml); -+ return rc; -+} -+ -+static int -+set_ticket_state_attr(const char *ticket_id, const char *attr_name, -+ const char *attr_value, cib_t * cib) -+{ -+ enum cib_errors rc = cib_ok; -+ xmlNode *xml_top = NULL; -+ xmlNode *ticket_state_xml = NULL; -+ -+ rc = find_ticket_state(cib, ticket_id, &ticket_state_xml); -+ if (rc == cib_ok) { -+ crm_debug("Found a match state for ticket: id=%s", ticket_id); -+ xml_top = ticket_state_xml; -+ -+ } else if (rc != cib_NOTEXISTS) { -+ return rc; -+ -+ } else { -+ xmlNode *xml_obj = NULL; -+ -+ xml_top = create_xml_node(NULL, XML_CIB_TAG_STATUS); -+ xml_obj = create_xml_node(xml_top, XML_CIB_TAG_TICKETS); -+ ticket_state_xml = create_xml_node(xml_obj, XML_CIB_TAG_TICKET_STATE); -+ crm_xml_add(ticket_state_xml, XML_ATTR_ID, ticket_id); -+ } -+ -+ crm_xml_add(ticket_state_xml, attr_name, attr_value); -+ -+ crm_log_xml_debug(xml_top, "Update"); -+ -+ rc = cib->cmds->modify(cib, XML_CIB_TAG_STATUS, xml_top, cib_options); -+ -+ free_xml(xml_top); -+ -+ return rc; -+} -+ -+static int -+delete_ticket_state(const char *ticket_id, cib_t * cib) -+{ -+ xmlNode *ticket_state_xml = NULL; -+ -+ enum cib_errors rc = cib_ok; -+ -+ rc = find_ticket_state(cib, ticket_id, &ticket_state_xml); -+ -+ if (rc == cib_NOTEXISTS) { -+ return cib_ok; -+ -+ } else if (rc != cib_ok) { -+ return rc; -+ } -+ -+ crm_log_xml_debug(ticket_state_xml, "Delete"); -+ -+ rc = cib->cmds->delete(cib, XML_CIB_TAG_STATUS, ticket_state_xml, cib_options); -+ -+ if (rc == cib_ok) { -+ fprintf(stdout, "Cleaned up %s\n", ticket_id); -+ } -+ -+ free_xml(ticket_state_xml); -+ return rc; -+} -+ -+static gboolean -+confirm(const char *ticket_id, const char *action) -+{ -+ gboolean rc = FALSE; -+ int offset = 0; -+ static int text_max = 1024; -+ -+ char *warning = NULL; -+ const char * word = NULL; -+ -+ crm_malloc0(warning, text_max); -+ if (safe_str_eq(action, "grant")) { -+ offset += snprintf(warning + offset, text_max - offset, -+ "The command cannot help you verify if '%s' is already granted elsewhere.\n", -+ ticket_id); -+ word = "to"; -+ -+ } else { -+ offset += snprintf(warning + offset, text_max - offset, -+ "Revoking '%s' can trigger the specified 'loss-policy'(s) relating to '%s'.\n\n", -+ ticket_id, ticket_id); -+ -+ offset += snprintf(warning + offset, text_max - offset, -+ "You can check that with:\ncrm_ticket --ticket %s --constraints\n\n", -+ ticket_id); -+ -+ offset += snprintf(warning + offset, text_max - offset, -+ "Otherwise before revoking '%s', you may want to make '%s' standby with:\ncrm_ticket --ticket %s --standby\n", -+ ticket_id, ticket_id, ticket_id); -+ word = "from"; -+ } -+ -+ fprintf(stdout, "%s\n", warning); -+ -+ while (TRUE) { -+ char *answer = NULL; -+ -+ crm_malloc0(answer, text_max); -+ fprintf(stdout, "Are you sure you want to %s '%s' %s this site now? (y/n)", -+ action, ticket_id, word); -+ -+ rc = scanf("%s", answer); -+ -+ if (strchr(answer, 'y') == answer || strchr(answer, 'Y') == answer) { -+ rc = TRUE; -+ crm_free(answer); -+ goto bail; -+ -+ } else if (strchr(answer, 'n') == answer || strchr(answer, 'N') == answer) { -+ rc = FALSE; -+ crm_free(answer); -+ goto bail; -+ -+ } else { -+ crm_free(answer); -+ fprintf(stdout, "Please answer with y or n\n"); -+ } -+ } -+ -+bail: -+ crm_free(warning); -+ return rc; -+} -+ -+/* *INDENT-OFF* */ -+static struct crm_option long_options[] = { -+ /* Top-level Options */ -+ {"help", 0, 0, '?', "\t\tThis text"}, -+ {"version", 0, 0, '$', "\t\tVersion information" }, -+ {"verbose", 0, 0, 'V', "\t\tIncrease debug output"}, -+ {"quiet", 0, 0, 'Q', "\t\tPrint only the value on stdout\n"}, -+ -+ {"ticket", 1, 0, 't', "\tTicket ID" }, -+ -+ {"-spacer-", 1, 0, '-', "\nQueries:"}, -+ {"info", 0, 0, 'l', "\t\tDisplay the information of ticket(s)"}, -+ {"details", 0, 0, 'L', "\t\tDisplay the details of ticket(s)"}, -+ {"raw", 0, 0, 'w', "\t\tDisplay the IDs of ticket(s)"}, -+ {"query-xml", 0, 0, 'q', "\tQuery the XML of ticket(s)"}, -+ {"constraints",0, 0, 'c', "\tDisplay the rsc_ticket constraints that apply to ticket(s)"}, -+ -+ {"-spacer-", 1, 0, '-', "\nCommands:"}, -+ {"grant", 0, 0, 'g', "\t\tGrant a ticket to this cluster site"}, -+ {"revoke", 0, 0, 'r', "\t\tRevoke a ticket from this cluster site"}, -+ {"standby", 0, 0, 's', "\t\tTell this cluster site this ticket is standby"}, -+ {"activate", 0, 0, 'a', "\tTell this cluster site this ticket is active"}, -+ -+ {"-spacer-", 1, 0, '-', "\nAdvanced Commands:"}, -+ {"get-attr", 1, 0, 'G', "\tDisplay the named attribute for a ticket"}, -+ {"set-attr", 1, 0, 'S', "\tSet the named attribtue for a ticket"}, -+ {"delete-attr",1, 0, 'D', "\tDelete the named attribute for a ticket"}, -+ {"cleanup", 0, 0, 'C', "\t\tDelete all state of a ticket at this cluster site"}, -+ -+ {"-spacer-", 1, 0, '-', "\nAdditional Options:"}, -+ {"attr-value", 1, 0, 'v', "\tAttribute value to use with -S"}, -+ {"default", 1, 0, 'd', "\t(Advanced) The default attribute value to display if none is found. For use with -G"}, -+ {"force", 0, 0, 'f', "\t\t(Advanced) Force the action to be performed"}, -+ {"xml-file", 1, 0, 'x', NULL, 1},\ -+ -+ /* legacy options */ -+ {"set-name", 1, 0, 'n', "\t(Advanced) ID of the instance_attributes object to change"}, -+ {"nvpair", 1, 0, 'i', "\t(Advanced) ID of the nvpair object to change/delete"}, -+ -+ {"-spacer-", 1, 0, '-', "\nExamples:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', "Display the info of tickets:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --info", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Display the detailed info of tickets:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --details", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Display the XML of 'ticketA':", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --query-xml", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Display the rsc_ticket constraints that apply to 'ticketA':", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --constraints", pcmk_option_example}, -+ -+ {"-spacer-", 1, 0, '-', "Grant 'ticketA' to this cluster site:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --grant", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Revoke 'ticketA' from this cluster site:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --revoke", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Make 'ticketA' standby:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', "The cluster site will treat a granted 'ticketA' as 'standby'."}, -+ {"-spacer-", 1, 0, '-', "The dependent resources will be stopped or demoted gracefully without triggering loss-policies", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --standby", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Activate 'ticketA' from being standby:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --activate", pcmk_option_example}, -+ -+ {"-spacer-", 1, 0, '-', "Get the value of the 'granted' attribute for 'ticketA':", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --get-attr granted", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Set the value of the 'standby' attribute for 'ticketA':", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --set-attr standby --attr-value true", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Delete the 'granted' attribute for 'ticketA':", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --delete-attr granted", pcmk_option_example}, -+ {"-spacer-", 1, 0, '-', "Erase the operation history of 'ticketA' at this cluster site:", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', "The cluster site will 'forget' the existing ticket state.", pcmk_option_paragraph}, -+ {"-spacer-", 1, 0, '-', " crm_ticket --ticket ticketA --cleanup", pcmk_option_example}, -+ -+ {0, 0, 0, 0} -+}; -+/* *INDENT-ON* */ -+ -+int -+main(int argc, char **argv) -+{ -+ pe_working_set_t data_set; -+ xmlNode *cib_xml_copy = NULL; -+ -+ cib_t *cib_conn = NULL; -+ enum cib_errors rc = cib_ok; -+ -+ int option_index = 0; -+ int argerr = 0; -+ int flag; -+ -+ crm_log_init(NULL, LOG_ERR, FALSE, FALSE, argc, argv); -+ crm_set_options(NULL, "(query|command) [options]", long_options, -+ "Perform tasks related to cluster tickets.\nAllows ticket attributes to be queried, modified and deleted.\n"); -+ -+ if (argc < 2) { -+ crm_help('?', LSB_EXIT_EINVAL); -+ } -+ -+ while (1) { -+ flag = crm_get_option(argc, argv, &option_index); -+ if (flag == -1) -+ break; -+ -+ switch (flag) { -+ case 'V': -+ crm_bump_log_level(); -+ break; -+ case '$': -+ case '?': -+ crm_help(flag, LSB_EXIT_OK); -+ break; -+ case 'Q': -+ BE_QUIET = TRUE; -+ break; -+ case 't': -+ ticket_id = optarg; -+ break; -+ case 'l': -+ case 'L': -+ case 'w': -+ case 'q': -+ case 'c': -+ ticket_cmd = flag; -+ break; -+ case 'g': -+ case 'r': -+ case 's': -+ case 'a': -+ ticket_cmd = flag; -+ break; -+ case 'G': -+ case 'S': -+ case 'D': -+ attr_name = optarg; -+ ticket_cmd = flag; -+ break; -+ case 'C': -+ ticket_cmd = flag; -+ break; -+ case 'v': -+ attr_value = optarg; -+ break; -+ case 'd': -+ attr_default = optarg; -+ break; -+ case 'f': -+ do_force = TRUE; -+ break; -+ case 'x': -+ xml_file = crm_strdup(optarg); -+ break; -+ case 'n': -+ set_name = optarg; -+ break; -+ case 'i': -+ attr_id = optarg; -+ break; -+ -+ default: -+ CMD_ERR("Argument code 0%o (%c) is not (?yet?) supported\n", flag, flag); -+ ++argerr; -+ break; -+ } -+ } -+ -+ if (BE_QUIET == FALSE) { -+ crm_log_args(argc, argv); -+ } -+ -+ if (optind < argc && argv[optind] != NULL) { -+ CMD_ERR("non-option ARGV-elements: "); -+ while (optind < argc && argv[optind] != NULL) { -+ CMD_ERR("%s ", argv[optind++]); -+ ++argerr; -+ } -+ CMD_ERR("\n"); -+ } -+ -+ if (optind > argc) { -+ ++argerr; -+ } -+ -+ if (argerr) { -+ crm_help('?', LSB_EXIT_GENERIC); -+ } -+ -+ set_working_set_defaults(&data_set); -+ -+ cib_conn = cib_new(); -+ rc = cib_conn->cmds->signon(cib_conn, crm_system_name, cib_command); -+ if (rc != cib_ok) { -+ CMD_ERR("Error signing on to the CIB service: %s\n", cib_error2string(rc)); -+ return rc; -+ } -+ -+ if (xml_file != NULL) { -+ cib_xml_copy = filename2xml(xml_file); -+ -+ } else { -+ cib_xml_copy = get_cib_copy(cib_conn); -+ } -+ -+ if (cli_config_update(&cib_xml_copy, NULL, FALSE) == FALSE) { -+ rc = cib_STALE; -+ goto bail; -+ } -+ -+ data_set.input = cib_xml_copy; -+ data_set.now = new_ha_date(TRUE); -+ -+ cluster_status(&data_set); -+ -+ if (ticket_cmd == 'l' || ticket_cmd == 'L' || ticket_cmd == 'w') { -+ gboolean raw = FALSE; -+ gboolean details = FALSE; -+ rc = cib_ok; -+ -+ if (ticket_cmd == 'L') { -+ details = TRUE; -+ } else if (ticket_cmd == 'w') { -+ raw = TRUE; -+ } -+ -+ if (ticket_id) { -+ ticket_t *ticket = find_ticket(ticket_id, &data_set); -+ if (ticket == NULL) { -+ rc = cib_NOTEXISTS; -+ goto bail; -+ } -+ rc = print_ticket(ticket, raw, details); -+ -+ } else { -+ rc = print_ticket_list(&data_set, raw, details); -+ } -+ -+ } else if (ticket_cmd == 'q') { -+ rc = dump_ticket_xml(cib_conn, ticket_id); -+ -+ } else if (ticket_cmd == 'c') { -+ rc = dump_constraints(cib_conn, ticket_id); -+ -+ } else if (ticket_cmd == 'G') { -+ const char *value = NULL; -+ -+ if (ticket_id == NULL) { -+ CMD_ERR("Must supply a ticket id with -t\n"); -+ rc = cib_NOTEXISTS; -+ goto bail; -+ } -+ -+ rc = get_ticket_state_attr(ticket_id, attr_name, &value, &data_set); -+ if (rc == cib_ok) { -+ fprintf(stdout, "%s\n", value); -+ } else if (rc == cib_NOTEXISTS && attr_default) { -+ fprintf(stdout, "%s\n", attr_default); -+ rc = cib_ok; -+ } -+ -+ } else if (ticket_cmd == 'S' -+ || ticket_cmd == 'g' || ticket_cmd == 'r' -+ || ticket_cmd == 's' || ticket_cmd == 'a') { -+ gboolean is_granting = FALSE; -+ -+ if (ticket_id == NULL) { -+ CMD_ERR("Must supply a ticket id with -t\n"); -+ rc = cib_NOTEXISTS; -+ goto bail; -+ } -+ -+ if (ticket_cmd == 'g') { -+ attr_name = "granted"; -+ attr_value = "true"; -+ -+ } else if (ticket_cmd == 'r') { -+ attr_name = "granted"; -+ attr_value = "false"; -+ -+ } else if (ticket_cmd == 's') { -+ attr_name = "standby"; -+ attr_value = "true"; -+ -+ } else if (ticket_cmd == 'a') { -+ attr_name = "standby"; -+ attr_value = "false"; -+ } -+ -+ if (attr_value == NULL || strlen(attr_value) == 0) { -+ CMD_ERR("You need to supply a value with the -v option\n"); -+ rc = CIBRES_MISSING_FIELD; -+ goto bail; -+ } -+ -+ if (safe_str_eq(attr_name, "granted") && do_force == FALSE) { -+ if (crm_is_true(attr_value) && confirm(ticket_id, "grant") == FALSE) { -+ CMD_ERR("Cancelled\n"); -+ rc = cib_ok; -+ goto bail; -+ -+ } else if (crm_is_true(attr_value) == FALSE && confirm(ticket_id, "revoke") == FALSE) { -+ CMD_ERR("Cancelled\n"); -+ rc = cib_ok; -+ goto bail; -+ } -+ } -+ -+ if (safe_str_eq(attr_name, "granted") && crm_is_true(attr_value)) { -+ ticket_t *ticket = find_ticket(ticket_id, &data_set); -+ -+ if (ticket == NULL || ticket->granted == FALSE) { -+ is_granting = TRUE; -+ } -+ } -+ -+ rc = set_ticket_state_attr(ticket_id, attr_name, attr_value, cib_conn); -+ delete_ticket_state_attr_legacy(ticket_id, set_name, attr_id, attr_name, cib_conn); -+ -+ if(rc != cib_ok) { -+ goto bail; -+ } -+ -+ if (is_granting == TRUE) { -+ set_ticket_state_attr(ticket_id, "last-granted", crm_itoa(time(NULL)), cib_conn); -+ delete_ticket_state_attr_legacy(ticket_id, set_name, attr_id, "last-granted", cib_conn); -+ } -+ -+ } else if (ticket_cmd == 'D') { -+ if (ticket_id == NULL) { -+ CMD_ERR("Must supply a ticket id with -t\n"); -+ rc = cib_NOTEXISTS; -+ goto bail; -+ } -+ -+ if (safe_str_eq(attr_name, "granted") && do_force == FALSE -+ && confirm(ticket_id, "revoke") == FALSE) { -+ CMD_ERR("Cancelled\n"); -+ rc = cib_ok; -+ goto bail; -+ } -+ -+ delete_ticket_state_attr_legacy(ticket_id, set_name, attr_id, attr_name, cib_conn); -+ rc = delete_ticket_state_attr(ticket_id, attr_name, cib_conn); -+ -+ } else if (ticket_cmd == 'C') { -+ if (ticket_id == NULL) { -+ CMD_ERR("Must supply a ticket id with -t\n"); -+ rc = cib_NOTEXISTS; -+ goto bail; -+ } -+ -+ if (do_force == FALSE) { -+ ticket_t *ticket = NULL; -+ -+ ticket = find_ticket(ticket_id, &data_set); -+ if (ticket == NULL) { -+ return cib_NOTEXISTS; -+ goto bail; -+ } -+ -+ if (ticket->granted && confirm(ticket_id, "revoke") == FALSE) { -+ CMD_ERR("Cancelled\n"); -+ rc = cib_ok; -+ goto bail; -+ } -+ } -+ -+ rc = delete_ticket_state(ticket_id, cib_conn); -+ -+ } else { -+ CMD_ERR("Unknown command: %c\n", ticket_cmd); -+ } -+ -+ bail: -+ -+ if (cib_conn != NULL) { -+ cleanup_alloc_calculations(&data_set); -+ cib_conn->cmds->signoff(cib_conn); -+ cib_delete(cib_conn); -+ } -+ -+ crm_xml_cleanup(); -+ -+ if (rc == cib_no_quorum) { -+ CMD_ERR("Error performing operation: %s\n", cib_error2string(rc)); -+ CMD_ERR("Try using -f\n"); -+ -+ } else if (rc != cib_ok) { -+ CMD_ERR("Error performing operation: %s\n", cib_error2string(rc)); -+ } -+ -+ return rc; -+} diff --git a/pacemaker-cts-startcmd.patch b/pacemaker-cts-startcmd.patch index 2af5f64..625dcc4 100644 --- a/pacemaker-cts-startcmd.patch +++ b/pacemaker-cts-startcmd.patch @@ -1,10 +1,11 @@ -diff -r 93114fbc53ea cts/CM_ais.py ---- a/cts/CM_ais.py Tue Mar 09 20:00:05 2010 +0100 -+++ b/cts/CM_ais.py Tue Mar 09 22:27:19 2010 +0100 -@@ -242,8 +242,8 @@ +Index: pacemaker/cts/CM_ais.py +=================================================================== +--- pacemaker.orig/cts/CM_ais.py ++++ pacemaker/cts/CM_ais.py +@@ -263,8 +263,8 @@ class crm_cs_v0(crm_ais): self.update({ - "Name" : "crm-flatiron", + "Name" : "crm-plugin-v0", - "StartCmd" : "service corosync start", - "StopCmd" : "service corosync stop", + "StartCmd" : CTSvars.INITDIR+"/openais start", diff --git a/pacemaker-daemon-symlinks.diff b/pacemaker-daemon-symlinks.diff new file mode 100644 index 0000000..64bbdb0 --- /dev/null +++ b/pacemaker-daemon-symlinks.diff @@ -0,0 +1,19 @@ +diff --git a/Makefile.am b/Makefile.am +index d35ba4e..f159d9f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -49,14 +49,12 @@ if BUILD_CS_PLUGIN + rm -f $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso $(DESTDIR)$(LCRSODIR)/service_crm.so + cp $(DESTDIR)$(libdir)/service_crm.so $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso + endif +-if BUILD_HEARTBEAT_SUPPORT + $(INSTALL) -d $(DESTDIR)/$(HB_DAEMON_DIR) + ln -sf $(CRM_DAEMON_DIR)/attrd $(DESTDIR)$(HB_DAEMON_DIR)/ + ln -sf $(CRM_DAEMON_DIR)/cib $(DESTDIR)$(HB_DAEMON_DIR)/ + ln -sf $(CRM_DAEMON_DIR)/crmd $(DESTDIR)$(HB_DAEMON_DIR)/ + ln -sf $(CRM_DAEMON_DIR)/pengine $(DESTDIR)$(HB_DAEMON_DIR)/ + ln -sf $(CRM_DAEMON_DIR)/stonithd $(DESTDIR)$(HB_DAEMON_DIR)/ +-endif + # Use chown because the user/group may not exist + + clean-generic: diff --git a/pacemaker-log-fix.diff b/pacemaker-log-fix.diff deleted file mode 100644 index cb05bc5..0000000 --- a/pacemaker-log-fix.diff +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/tools/crm_ticket.c b/tools/crm_ticket.c -index f90ba23..51f5180 100644 ---- a/tools/crm_ticket.c -+++ b/tools/crm_ticket.c -@@ -676,7 +676,8 @@ main(int argc, char **argv) - - switch (flag) { - case 'V': -- crm_bump_log_level(); -+ cl_log_enable_stderr(TRUE); -+ alter_debug(DEBUG_INC); - break; - case '$': - case '?': -@@ -737,7 +738,7 @@ main(int argc, char **argv) - } - - if (BE_QUIET == FALSE) { -- crm_log_args(argc, argv); -+ cl_log_args(argc, argv); - } - - if (optind < argc && argv[optind] != NULL) { diff --git a/pacemaker-ptest-xml-text.diff b/pacemaker-ptest-xml-text.diff deleted file mode 100644 index 2bfaf75..0000000 --- a/pacemaker-ptest-xml-text.diff +++ /dev/null @@ -1,38 +0,0 @@ -commit 581af7d3061a3ff680e0a15351099df255cf6b03 -Author: Gao,Yan -Date: Mon Dec 19 14:39:03 2011 +0800 - - Medium: Tools: ptest - Fix "-X, --xml-text" option to handle a XML string as its argument - -diff --git a/pengine/ptest.c b/pengine/ptest.c -index 6372a72..545f695 100644 ---- a/pengine/ptest.c -+++ b/pengine/ptest.c -@@ -167,6 +167,7 @@ main(int argc, char **argv) - const char *dot_file = NULL; - const char *graph_file = NULL; - const char *input_file = NULL; -+ const char *input_xml = NULL; - - /* disable glib's fancy allocators that can't be free'd */ - GMemVTable vtable; -@@ -203,7 +204,8 @@ main(int argc, char **argv) - inhibit_exit = TRUE; - break; - case 'X': -- use_stdin = TRUE; -+ /*use_stdin = TRUE;*/ -+ input_xml = optarg; - break; - case 's': - show_scores = TRUE; -@@ -290,6 +292,9 @@ main(int argc, char **argv) - } else if (use_stdin) { - source = "stdin"; - cib_object = filename2xml(NULL); -+ } else if (input_xml) { -+ source = "input string"; -+ cib_object = string2xml(input_xml); - } - - if (cib_object == NULL && source) { diff --git a/pacemaker-rsc_ticket-schema.diff b/pacemaker-rsc_ticket-schema.diff deleted file mode 100644 index 3fbfc2a..0000000 --- a/pacemaker-rsc_ticket-schema.diff +++ /dev/null @@ -1,55 +0,0 @@ -commit dc88c1f8402e1c978bb4d7816f79a902cf476a08 -Author: Gao,Yan -Date: Wed Oct 26 17:36:30 2011 +0800 - - Medium: xml: Add rsc_ticket support into "pacemaker-1.2" schema - -diff --git a/xml/constraints-1.2.rng b/xml/constraints-1.2.rng -index 84708aa..e4b9d80 100644 ---- a/xml/constraints-1.2.rng -+++ b/xml/constraints-1.2.rng -@@ -11,6 +11,7 @@ - - - -+ - - - -@@ -143,6 +144,36 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ stop -+ demote -+ fence -+ freeze -+ -+ -+ -+ -+ -+ - - - start diff --git a/pacemaker-stonith-timeout.diff b/pacemaker-stonith-timeout.diff deleted file mode 100644 index eb14e6f..0000000 --- a/pacemaker-stonith-timeout.diff +++ /dev/null @@ -1,24 +0,0 @@ -commit a8ba707d19757e9aea4496e7bddf4ddc428ca582 -Author: Gao,Yan -Date: Tue Dec 13 14:48:26 2011 +0800 - - Low: stonith: Default to 20s timeout for start and monitor operations of stonith resources which is same as "default-action-timeout" (bnc#733337) - -diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c -index 205bda8..a4977d5 100644 ---- a/lib/fencing/st_client.c -+++ b/lib/fencing/st_client.c -@@ -97,10 +97,10 @@ static const char META_TEMPLATE[] = - " %s\n" - "%s\n" - " \n" -- " \n" -+ " \n" - " \n" -- " \n" -- " \n" -+ " \n" -+ " \n" - " \n" - " \n" - " \n" diff --git a/pacemaker-template-schema.diff b/pacemaker-template-schema.diff deleted file mode 100644 index c83986f..0000000 --- a/pacemaker-template-schema.diff +++ /dev/null @@ -1,63 +0,0 @@ -commit 288cbadc532f1256129d1fcef5716ac1eb7d4bde -Author: Gao,Yan -Date: Wed Oct 26 17:45:03 2011 +0800 - - Medium: xml: Add resource template support into "pacemaker-1.2" schema - -diff --git a/xml/resources-1.2.rng b/xml/resources-1.2.rng -index d2fe1a8..d295b2a 100644 ---- a/xml/resources-1.2.rng -+++ b/xml/resources-1.2.rng -@@ -9,6 +9,7 @@ - - - -+ - - - -@@ -22,6 +23,44 @@ - - - -+ -+ -+ ocf -+ -+ -+ -+ -+ lsb -+ heartbeat -+ stonith -+ upstart -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - ocf - - diff --git a/pacemaker-ticket-last-granted-prefix.diff b/pacemaker-ticket-last-granted-prefix.diff deleted file mode 100644 index d150416..0000000 --- a/pacemaker-ticket-last-granted-prefix.diff +++ /dev/null @@ -1,19 +0,0 @@ -commit 150647923483ae92bac8be05c068134583552b0d -Author: Yuusuke Iida -Date: Mon Feb 20 19:37:46 2012 +0900 - - Low: PE: changed a pre-fix to refer to a right value. - -diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c -index 70bcdc6..34f0e0e 100644 ---- a/lib/pengine/unpack.c -+++ b/lib/pengine/unpack.c -@@ -425,7 +425,7 @@ get_ticket_state(gpointer key, gpointer value, gpointer user_data) - const char *attr_key = key; - - const char *granted_prefix = "granted-ticket-"; -- const char *last_granted_prefix = "last-granted-ticket-"; -+ const char *last_granted_prefix = "last-granted-"; - static int granted_prefix_strlen = 0; - static int last_granted_prefix_strlen = 0; - diff --git a/pacemaker-ticket-standby-tests.diff b/pacemaker-ticket-standby-tests.diff deleted file mode 100644 index a55c318..0000000 --- a/pacemaker-ticket-standby-tests.diff +++ /dev/null @@ -1,10643 +0,0 @@ -commit c52df0e6a070de97c10ec9445f7428c3f0cfb2e4 -Author: Gao,Yan -Date: Sat Mar 24 18:23:11 2012 +0800 - - Low: PE: Support to make tickets standby for relinquishing tickets gracefully (regression tests) - -diff --git a/pengine/regression.sh b/pengine/regression.sh -index f8e3d7d..493b05c 100755 ---- a/pengine/regression.sh -+++ b/pengine/regression.sh -@@ -496,6 +496,19 @@ do_test ticket-primitive-10 "Ticket - Primitive (loss-policy=freeze, initial)" - do_test ticket-primitive-11 "Ticket - Primitive (loss-policy=freeze, granted)" - do_test ticket-primitive-12 "Ticket - Primitive (loss-policy=freeze, revoked)" - -+do_test ticket-primitive-13 "Ticket - Primitive (loss-policy=stop, standby, granted)" -+do_test ticket-primitive-14 "Ticket - Primitive (loss-policy=stop, granted, standby)" -+do_test ticket-primitive-15 "Ticket - Primitive (loss-policy=stop, standby, revoked)" -+do_test ticket-primitive-16 "Ticket - Primitive (loss-policy=demote, standby, granted)" -+do_test ticket-primitive-17 "Ticket - Primitive (loss-policy=demote, granted, standby)" -+do_test ticket-primitive-18 "Ticket - Primitive (loss-policy=demote, standby, revoked)" -+do_test ticket-primitive-19 "Ticket - Primitive (loss-policy=fence, standby, granted)" -+do_test ticket-primitive-20 "Ticket - Primitive (loss-policy=fence, granted, standby)" -+do_test ticket-primitive-21 "Ticket - Primitive (loss-policy=fence, standby, revoked)" -+do_test ticket-primitive-22 "Ticket - Primitive (loss-policy=freeze, standby, granted)" -+do_test ticket-primitive-23 "Ticket - Primitive (loss-policy=freeze, granted, standby)" -+do_test ticket-primitive-24 "Ticket - Primitive (loss-policy=freeze, standby, revoked)" -+ - echo"" - do_test ticket-group-1 "Ticket - Group (loss-policy=stop, initial)" - do_test ticket-group-2 "Ticket - Group (loss-policy=stop, granted)" -@@ -509,7 +522,20 @@ do_test ticket-group-9 "Ticket - Group (loss-policy=fence, revoked)" - do_test ticket-group-10 "Ticket - Group (loss-policy=freeze, initial)" - do_test ticket-group-11 "Ticket - Group (loss-policy=freeze, granted)" - do_test ticket-group-12 "Ticket - Group (loss-policy=freeze, revoked)" -- -+ -+do_test ticket-group-13 "Ticket - Group (loss-policy=stop, standby, granted)" -+do_test ticket-group-14 "Ticket - Group (loss-policy=stop, granted, standby)" -+do_test ticket-group-15 "Ticket - Group (loss-policy=stop, standby, revoked)" -+do_test ticket-group-16 "Ticket - Group (loss-policy=demote, standby, granted)" -+do_test ticket-group-17 "Ticket - Group (loss-policy=demote, granted, standby)" -+do_test ticket-group-18 "Ticket - Group (loss-policy=demote, standby, revoked)" -+do_test ticket-group-19 "Ticket - Group (loss-policy=fence, standby, granted)" -+do_test ticket-group-20 "Ticket - Group (loss-policy=fence, granted, standby)" -+do_test ticket-group-21 "Ticket - Group (loss-policy=fence, standby, revoked)" -+do_test ticket-group-22 "Ticket - Group (loss-policy=freeze, standby, granted)" -+do_test ticket-group-23 "Ticket - Group (loss-policy=freeze, granted, standby)" -+do_test ticket-group-24 "Ticket - Group (loss-policy=freeze, standby, revoked)" -+ - echo"" - do_test ticket-clone-1 "Ticket - Clone (loss-policy=stop, initial)" - do_test ticket-clone-2 "Ticket - Clone (loss-policy=stop, granted)" -@@ -523,7 +549,20 @@ do_test ticket-clone-9 "Ticket - Clone (loss-policy=fence, revoked)" - do_test ticket-clone-10 "Ticket - Clone (loss-policy=freeze, initial)" - do_test ticket-clone-11 "Ticket - Clone (loss-policy=freeze, granted)" - do_test ticket-clone-12 "Ticket - Clone (loss-policy=freeze, revoked)" -- -+ -+do_test ticket-clone-13 "Ticket - Clone (loss-policy=stop, standby, granted)" -+do_test ticket-clone-14 "Ticket - Clone (loss-policy=stop, granted, standby)" -+do_test ticket-clone-15 "Ticket - Clone (loss-policy=stop, standby, revoked)" -+do_test ticket-clone-16 "Ticket - Clone (loss-policy=demote, standby, granted)" -+do_test ticket-clone-17 "Ticket - Clone (loss-policy=demote, granted, standby)" -+do_test ticket-clone-18 "Ticket - Clone (loss-policy=demote, standby, revoked)" -+do_test ticket-clone-19 "Ticket - Clone (loss-policy=fence, standby, granted)" -+do_test ticket-clone-20 "Ticket - Clone (loss-policy=fence, granted, standby)" -+do_test ticket-clone-21 "Ticket - Clone (loss-policy=fence, standby, revoked)" -+do_test ticket-clone-22 "Ticket - Clone (loss-policy=freeze, standby, granted)" -+do_test ticket-clone-23 "Ticket - Clone (loss-policy=freeze, granted, standby)" -+do_test ticket-clone-24 "Ticket - Clone (loss-policy=freeze, standby, revoked)" -+ - echo"" - do_test ticket-master-1 "Ticket - Master (loss-policy=stop, initial)" - do_test ticket-master-2 "Ticket - Master (loss-policy=stop, granted)" -@@ -538,6 +577,19 @@ do_test ticket-master-10 "Ticket - Master (loss-policy=freeze, initial)" - do_test ticket-master-11 "Ticket - Master (loss-policy=freeze, granted)" - do_test ticket-master-12 "Ticket - Master (loss-policy=freeze, revoked)" - -+do_test ticket-master-13 "Ticket - Master (loss-policy=stop, standby, granted)" -+do_test ticket-master-14 "Ticket - Master (loss-policy=stop, granted, standby)" -+do_test ticket-master-15 "Ticket - Master (loss-policy=stop, standby, revoked)" -+do_test ticket-master-16 "Ticket - Master (loss-policy=demote, standby, granted)" -+do_test ticket-master-17 "Ticket - Master (loss-policy=demote, granted, standby)" -+do_test ticket-master-18 "Ticket - Master (loss-policy=demote, standby, revoked)" -+do_test ticket-master-19 "Ticket - Master (loss-policy=fence, standby, granted)" -+do_test ticket-master-20 "Ticket - Master (loss-policy=fence, granted, standby)" -+do_test ticket-master-21 "Ticket - Master (loss-policy=fence, standby, revoked)" -+do_test ticket-master-22 "Ticket - Master (loss-policy=freeze, standby, granted)" -+do_test ticket-master-23 "Ticket - Master (loss-policy=freeze, granted, standby)" -+do_test ticket-master-24 "Ticket - Master (loss-policy=freeze, standby, revoked)" -+ - echo "" - do_test ticket-rsc-sets-1 "Ticket - Resource sets (1 ticket, initial)" - do_test ticket-rsc-sets-2 "Ticket - Resource sets (1 ticket, granted)" -@@ -547,6 +599,14 @@ do_test ticket-rsc-sets-5 "Ticket - Resource sets (2 tickets, granted)" - do_test ticket-rsc-sets-6 "Ticket - Resource sets (2 tickets, granted)" - do_test ticket-rsc-sets-7 "Ticket - Resource sets (2 tickets, revoked)" - -+do_test ticket-rsc-sets-8 "Ticket - Resource sets (1 ticket, standby, granted)" -+do_test ticket-rsc-sets-9 "Ticket - Resource sets (1 ticket, granted, standby)" -+do_test ticket-rsc-sets-10 "Ticket - Resource sets (1 ticket, standby, revoked)" -+do_test ticket-rsc-sets-11 "Ticket - Resource sets (2 tickets, standby, granted)" -+do_test ticket-rsc-sets-12 "Ticket - Resource sets (2 tickets, standby, granted)" -+do_test ticket-rsc-sets-13 "Ticket - Resource sets (2 tickets, granted, standby)" -+do_test ticket-rsc-sets-14 "Ticket - Resource sets (2 tickets, standby, revoked)" -+ - echo "" - do_test template-1 "Template - 1" - do_test template-2 "Template - 2" -diff --git a/pengine/test10/ticket-clone-13.dot b/pengine/test10/ticket-clone-13.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-clone-13.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-13.exp b/pengine/test10/ticket-clone-13.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-clone-13.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-13.scores b/pengine/test10/ticket-clone-13.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-13.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-13.xml b/pengine/test10/ticket-clone-13.xml -new file mode 100644 -index 0000000..3494923 ---- /dev/null -+++ b/pengine/test10/ticket-clone-13.xml -@@ -0,0 +1,57 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-14.dot b/pengine/test10/ticket-clone-14.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-14.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-14.exp b/pengine/test10/ticket-clone-14.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-14.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-14.scores b/pengine/test10/ticket-clone-14.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-14.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-14.xml b/pengine/test10/ticket-clone-14.xml -new file mode 100644 -index 0000000..eba5c42 ---- /dev/null -+++ b/pengine/test10/ticket-clone-14.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-15.dot b/pengine/test10/ticket-clone-15.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-15.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-15.exp b/pengine/test10/ticket-clone-15.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-15.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-15.scores b/pengine/test10/ticket-clone-15.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-15.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-15.xml b/pengine/test10/ticket-clone-15.xml -new file mode 100644 -index 0000000..c9c7fa6 ---- /dev/null -+++ b/pengine/test10/ticket-clone-15.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-16.dot b/pengine/test10/ticket-clone-16.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-clone-16.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-16.exp b/pengine/test10/ticket-clone-16.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-clone-16.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-16.scores b/pengine/test10/ticket-clone-16.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-16.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-16.xml b/pengine/test10/ticket-clone-16.xml -new file mode 100644 -index 0000000..e8d9a66 ---- /dev/null -+++ b/pengine/test10/ticket-clone-16.xml -@@ -0,0 +1,57 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-17.dot b/pengine/test10/ticket-clone-17.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-17.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-17.exp b/pengine/test10/ticket-clone-17.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-17.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-17.scores b/pengine/test10/ticket-clone-17.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-17.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-17.xml b/pengine/test10/ticket-clone-17.xml -new file mode 100644 -index 0000000..599cec2 ---- /dev/null -+++ b/pengine/test10/ticket-clone-17.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-18.dot b/pengine/test10/ticket-clone-18.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-18.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-18.exp b/pengine/test10/ticket-clone-18.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-18.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-18.scores b/pengine/test10/ticket-clone-18.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-18.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-18.xml b/pengine/test10/ticket-clone-18.xml -new file mode 100644 -index 0000000..5afd2da ---- /dev/null -+++ b/pengine/test10/ticket-clone-18.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-19.dot b/pengine/test10/ticket-clone-19.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-clone-19.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-19.exp b/pengine/test10/ticket-clone-19.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-clone-19.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-19.scores b/pengine/test10/ticket-clone-19.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-19.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-19.xml b/pengine/test10/ticket-clone-19.xml -new file mode 100644 -index 0000000..1576f06 ---- /dev/null -+++ b/pengine/test10/ticket-clone-19.xml -@@ -0,0 +1,57 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-20.dot b/pengine/test10/ticket-clone-20.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-20.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-20.exp b/pengine/test10/ticket-clone-20.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-20.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-20.scores b/pengine/test10/ticket-clone-20.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-20.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-20.xml b/pengine/test10/ticket-clone-20.xml -new file mode 100644 -index 0000000..0ca6500 ---- /dev/null -+++ b/pengine/test10/ticket-clone-20.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-21.dot b/pengine/test10/ticket-clone-21.dot -new file mode 100644 -index 0000000..d47eaeb ---- /dev/null -+++ b/pengine/test10/ticket-clone-21.dot -@@ -0,0 +1,31 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="orange"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange"] -+"stonith node1" -> "all_stopped" [ style = bold] -+"stonith node1" -> "clone1_stop_0" [ style = bold] -+"stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] -+"stonith node1" -> "stonith node2" [ style = bold] -+"stonith node1" [ style=bold color="green" fontcolor="black"] -+"stonith node2" -> "all_stopped" [ style = bold] -+"stonith node2" -> "clone1_stop_0" [ style = bold] -+"stonith node2" -> "rsc1:0_stop_0 node2" [ style = bold] -+"stonith node2" -> "stonith_complete" [ style = bold] -+"stonith node2" [ style=bold color="green" fontcolor="black"] -+"stonith_complete" -> "rsc1:0_stop_0 node2" [ style = bold] -+"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] -+"stonith_complete" [ style=bold color="green" fontcolor="orange"] -+"stonith_up" -> "stonith node1" [ style = bold] -+"stonith_up" -> "stonith node2" [ style = bold] -+"stonith_up" -> "stonith_complete" [ style = bold] -+"stonith_up" [ style=bold color="green" fontcolor="orange"] -+} -diff --git a/pengine/test10/ticket-clone-21.exp b/pengine/test10/ticket-clone-21.exp -new file mode 100644 -index 0000000..ce2d0d6 ---- /dev/null -+++ b/pengine/test10/ticket-clone-21.exp -@@ -0,0 +1,143 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-21.scores b/pengine/test10/ticket-clone-21.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-21.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-21.xml b/pengine/test10/ticket-clone-21.xml -new file mode 100644 -index 0000000..a249250 ---- /dev/null -+++ b/pengine/test10/ticket-clone-21.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-22.dot b/pengine/test10/ticket-clone-22.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-clone-22.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-22.exp b/pengine/test10/ticket-clone-22.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-clone-22.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-22.scores b/pengine/test10/ticket-clone-22.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-22.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-22.xml b/pengine/test10/ticket-clone-22.xml -new file mode 100644 -index 0000000..cd32da4 ---- /dev/null -+++ b/pengine/test10/ticket-clone-22.xml -@@ -0,0 +1,57 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-23.dot b/pengine/test10/ticket-clone-23.dot -new file mode 100644 -index 0000000..1c04e6e ---- /dev/null -+++ b/pengine/test10/ticket-clone-23.dot -@@ -0,0 +1,16 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone1_stop_0" -> "clone1_stopped_0" [ style = bold] -+"clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"clone1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-23.exp b/pengine/test10/ticket-clone-23.exp -new file mode 100644 -index 0000000..a758892 ---- /dev/null -+++ b/pengine/test10/ticket-clone-23.exp -@@ -0,0 +1,86 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-23.scores b/pengine/test10/ticket-clone-23.scores -new file mode 100644 -index 0000000..89e2d0f ---- /dev/null -+++ b/pengine/test10/ticket-clone-23.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-23.xml b/pengine/test10/ticket-clone-23.xml -new file mode 100644 -index 0000000..f13ccf5 ---- /dev/null -+++ b/pengine/test10/ticket-clone-23.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-24.dot b/pengine/test10/ticket-clone-24.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-clone-24.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-clone-24.exp b/pengine/test10/ticket-clone-24.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-clone-24.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-clone-24.scores b/pengine/test10/ticket-clone-24.scores -new file mode 100644 -index 0000000..d311a38 ---- /dev/null -+++ b/pengine/test10/ticket-clone-24.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+clone_color: clone1 allocation score on node1: 0 -+clone_color: clone1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-clone-24.xml b/pengine/test10/ticket-clone-24.xml -new file mode 100644 -index 0000000..96c1f63 ---- /dev/null -+++ b/pengine/test10/ticket-clone-24.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-13.dot b/pengine/test10/ticket-group-13.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-group-13.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-13.exp b/pengine/test10/ticket-group-13.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-group-13.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-13.scores b/pengine/test10/ticket-group-13.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-13.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-13.xml b/pengine/test10/ticket-group-13.xml -new file mode 100644 -index 0000000..37c9fc3 ---- /dev/null -+++ b/pengine/test10/ticket-group-13.xml -@@ -0,0 +1,73 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-14.dot b/pengine/test10/ticket-group-14.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-14.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-14.exp b/pengine/test10/ticket-group-14.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-14.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-14.scores b/pengine/test10/ticket-group-14.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-14.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-14.xml b/pengine/test10/ticket-group-14.xml -new file mode 100644 -index 0000000..db5db0f ---- /dev/null -+++ b/pengine/test10/ticket-group-14.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-15.dot b/pengine/test10/ticket-group-15.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-15.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-15.exp b/pengine/test10/ticket-group-15.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-15.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-15.scores b/pengine/test10/ticket-group-15.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-15.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-15.xml b/pengine/test10/ticket-group-15.xml -new file mode 100644 -index 0000000..93f0c0f ---- /dev/null -+++ b/pengine/test10/ticket-group-15.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-16.dot b/pengine/test10/ticket-group-16.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-group-16.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-16.exp b/pengine/test10/ticket-group-16.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-group-16.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-16.scores b/pengine/test10/ticket-group-16.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-16.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-16.xml b/pengine/test10/ticket-group-16.xml -new file mode 100644 -index 0000000..acfb56c ---- /dev/null -+++ b/pengine/test10/ticket-group-16.xml -@@ -0,0 +1,73 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-17.dot b/pengine/test10/ticket-group-17.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-17.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-17.exp b/pengine/test10/ticket-group-17.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-17.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-17.scores b/pengine/test10/ticket-group-17.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-17.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-17.xml b/pengine/test10/ticket-group-17.xml -new file mode 100644 -index 0000000..228cabd ---- /dev/null -+++ b/pengine/test10/ticket-group-17.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-18.dot b/pengine/test10/ticket-group-18.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-18.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-18.exp b/pengine/test10/ticket-group-18.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-18.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-18.scores b/pengine/test10/ticket-group-18.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-18.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-18.xml b/pengine/test10/ticket-group-18.xml -new file mode 100644 -index 0000000..d02e5ef ---- /dev/null -+++ b/pengine/test10/ticket-group-18.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-19.dot b/pengine/test10/ticket-group-19.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-group-19.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-19.exp b/pengine/test10/ticket-group-19.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-group-19.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-19.scores b/pengine/test10/ticket-group-19.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-19.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-19.xml b/pengine/test10/ticket-group-19.xml -new file mode 100644 -index 0000000..557625c ---- /dev/null -+++ b/pengine/test10/ticket-group-19.xml -@@ -0,0 +1,73 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-20.dot b/pengine/test10/ticket-group-20.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-20.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-20.exp b/pengine/test10/ticket-group-20.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-20.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-20.scores b/pengine/test10/ticket-group-20.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-20.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-20.xml b/pengine/test10/ticket-group-20.xml -new file mode 100644 -index 0000000..51624f2 ---- /dev/null -+++ b/pengine/test10/ticket-group-20.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-21.dot b/pengine/test10/ticket-group-21.dot -new file mode 100644 -index 0000000..9ebd732 ---- /dev/null -+++ b/pengine/test10/ticket-group-21.dot -@@ -0,0 +1,28 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="orange"] -+"stonith node2" -> "all_stopped" [ style = bold] -+"stonith node2" -> "group1_stop_0" [ style = bold] -+"stonith node2" -> "rsc1_stop_0 node2" [ style = bold] -+"stonith node2" -> "rsc2_stop_0 node2" [ style = bold] -+"stonith node2" -> "stonith_complete" [ style = bold] -+"stonith node2" [ style=bold color="green" fontcolor="black"] -+"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] -+"stonith_complete" -> "rsc2_stop_0 node2" [ style = bold] -+"stonith_complete" [ style=bold color="green" fontcolor="orange"] -+"stonith_up" -> "stonith node2" [ style = bold] -+"stonith_up" -> "stonith_complete" [ style = bold] -+"stonith_up" [ style=bold color="green" fontcolor="orange"] -+} -diff --git a/pengine/test10/ticket-group-21.exp b/pengine/test10/ticket-group-21.exp -new file mode 100644 -index 0000000..ffec329 ---- /dev/null -+++ b/pengine/test10/ticket-group-21.exp -@@ -0,0 +1,133 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-21.scores b/pengine/test10/ticket-group-21.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-21.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-21.xml b/pengine/test10/ticket-group-21.xml -new file mode 100644 -index 0000000..a5627df ---- /dev/null -+++ b/pengine/test10/ticket-group-21.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-22.dot b/pengine/test10/ticket-group-22.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-group-22.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-22.exp b/pengine/test10/ticket-group-22.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-group-22.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-22.scores b/pengine/test10/ticket-group-22.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-22.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-22.xml b/pengine/test10/ticket-group-22.xml -new file mode 100644 -index 0000000..9910339 ---- /dev/null -+++ b/pengine/test10/ticket-group-22.xml -@@ -0,0 +1,73 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-23.dot b/pengine/test10/ticket-group-23.dot -new file mode 100644 -index 0000000..f6e63d3 ---- /dev/null -+++ b/pengine/test10/ticket-group-23.dot -@@ -0,0 +1,17 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group1_stop_0" -> "group1_stopped_0" [ style = bold] -+"group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] -+"group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] -+"group1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] -+"rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] -+"rsc2_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-23.exp b/pengine/test10/ticket-group-23.exp -new file mode 100644 -index 0000000..94806e6 ---- /dev/null -+++ b/pengine/test10/ticket-group-23.exp -@@ -0,0 +1,89 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-23.scores b/pengine/test10/ticket-group-23.scores -new file mode 100644 -index 0000000..e5b8167 ---- /dev/null -+++ b/pengine/test10/ticket-group-23.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: -INFINITY -+group_color: rsc1 allocation score on node2: -INFINITY -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-23.xml b/pengine/test10/ticket-group-23.xml -new file mode 100644 -index 0000000..fd5fa24 ---- /dev/null -+++ b/pengine/test10/ticket-group-23.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-24.dot b/pengine/test10/ticket-group-24.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-group-24.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-group-24.exp b/pengine/test10/ticket-group-24.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-group-24.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-group-24.scores b/pengine/test10/ticket-group-24.scores -new file mode 100644 -index 0000000..8078251 ---- /dev/null -+++ b/pengine/test10/ticket-group-24.scores -@@ -0,0 +1,13 @@ -+Allocation scores: -+group_color: group1 allocation score on node1: 0 -+group_color: group1 allocation score on node2: 0 -+group_color: rsc1 allocation score on node1: 0 -+group_color: rsc1 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: 0 -+group_color: rsc2 allocation score on node2: 0 -+native_color: rsc1 allocation score on node1: 0 -+native_color: rsc1 allocation score on node2: 0 -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: 0 -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-group-24.xml b/pengine/test10/ticket-group-24.xml -new file mode 100644 -index 0000000..b21c49f ---- /dev/null -+++ b/pengine/test10/ticket-group-24.xml -@@ -0,0 +1,77 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-13.dot b/pengine/test10/ticket-master-13.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-master-13.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-13.exp b/pengine/test10/ticket-master-13.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-master-13.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-13.scores b/pengine/test10/ticket-master-13.scores -new file mode 100644 -index 0000000..23d58d8 ---- /dev/null -+++ b/pengine/test10/ticket-master-13.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on none: 0 -+rsc1:1 promotion score on none: 0 -diff --git a/pengine/test10/ticket-master-13.xml b/pengine/test10/ticket-master-13.xml -new file mode 100644 -index 0000000..6972260 ---- /dev/null -+++ b/pengine/test10/ticket-master-13.xml -@@ -0,0 +1,63 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-14.dot b/pengine/test10/ticket-master-14.dot -new file mode 100644 -index 0000000..7d91426 ---- /dev/null -+++ b/pengine/test10/ticket-master-14.dot -@@ -0,0 +1,24 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" -> "ms1_stop_0" [ style = bold] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stop_0" -> "ms1_stopped_0" [ style = bold] -+"ms1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"ms1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"ms1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "ms1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" -> "rsc1:1_stop_0 node1" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "ms1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-14.exp b/pengine/test10/ticket-master-14.exp -new file mode 100644 -index 0000000..a478fb8 ---- /dev/null -+++ b/pengine/test10/ticket-master-14.exp -@@ -0,0 +1,129 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-14.scores b/pengine/test10/ticket-master-14.scores -new file mode 100644 -index 0000000..23d58d8 ---- /dev/null -+++ b/pengine/test10/ticket-master-14.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on none: 0 -+rsc1:1 promotion score on none: 0 -diff --git a/pengine/test10/ticket-master-14.xml b/pengine/test10/ticket-master-14.xml -new file mode 100644 -index 0000000..77800fa ---- /dev/null -+++ b/pengine/test10/ticket-master-14.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-15.dot b/pengine/test10/ticket-master-15.dot -new file mode 100644 -index 0000000..7d91426 ---- /dev/null -+++ b/pengine/test10/ticket-master-15.dot -@@ -0,0 +1,24 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" -> "ms1_stop_0" [ style = bold] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stop_0" -> "ms1_stopped_0" [ style = bold] -+"ms1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] -+"ms1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"ms1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1:0_stop_0 node2" -> "ms1_stopped_0" [ style = bold] -+"rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" -> "rsc1:1_stop_0 node1" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "ms1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-15.exp b/pengine/test10/ticket-master-15.exp -new file mode 100644 -index 0000000..a478fb8 ---- /dev/null -+++ b/pengine/test10/ticket-master-15.exp -@@ -0,0 +1,129 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-15.scores b/pengine/test10/ticket-master-15.scores -new file mode 100644 -index 0000000..23d58d8 ---- /dev/null -+++ b/pengine/test10/ticket-master-15.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: -INFINITY -+clone_color: rsc1:0 allocation score on node2: -INFINITY -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: -INFINITY -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on none: 0 -+rsc1:1 promotion score on none: 0 -diff --git a/pengine/test10/ticket-master-15.xml b/pengine/test10/ticket-master-15.xml -new file mode 100644 -index 0000000..7c47782 ---- /dev/null -+++ b/pengine/test10/ticket-master-15.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-16.dot b/pengine/test10/ticket-master-16.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-master-16.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-16.exp b/pengine/test10/ticket-master-16.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-master-16.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-16.scores b/pengine/test10/ticket-master-16.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-16.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-16.xml b/pengine/test10/ticket-master-16.xml -new file mode 100644 -index 0000000..2e7452f ---- /dev/null -+++ b/pengine/test10/ticket-master-16.xml -@@ -0,0 +1,67 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-17.dot b/pengine/test10/ticket-master-17.dot -new file mode 100644 -index 0000000..4755871 ---- /dev/null -+++ b/pengine/test10/ticket-master-17.dot -@@ -0,0 +1,10 @@ -+digraph "g" { -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-17.exp b/pengine/test10/ticket-master-17.exp -new file mode 100644 -index 0000000..c36f0f1 ---- /dev/null -+++ b/pengine/test10/ticket-master-17.exp -@@ -0,0 +1,55 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-17.scores b/pengine/test10/ticket-master-17.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-17.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-17.xml b/pengine/test10/ticket-master-17.xml -new file mode 100644 -index 0000000..d28bb83 ---- /dev/null -+++ b/pengine/test10/ticket-master-17.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-18.dot b/pengine/test10/ticket-master-18.dot -new file mode 100644 -index 0000000..4755871 ---- /dev/null -+++ b/pengine/test10/ticket-master-18.dot -@@ -0,0 +1,10 @@ -+digraph "g" { -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-18.exp b/pengine/test10/ticket-master-18.exp -new file mode 100644 -index 0000000..c36f0f1 ---- /dev/null -+++ b/pengine/test10/ticket-master-18.exp -@@ -0,0 +1,55 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-18.scores b/pengine/test10/ticket-master-18.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-18.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-18.xml b/pengine/test10/ticket-master-18.xml -new file mode 100644 -index 0000000..e13eab2 ---- /dev/null -+++ b/pengine/test10/ticket-master-18.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-19.dot b/pengine/test10/ticket-master-19.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-master-19.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-19.exp b/pengine/test10/ticket-master-19.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-master-19.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-19.scores b/pengine/test10/ticket-master-19.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-19.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-19.xml b/pengine/test10/ticket-master-19.xml -new file mode 100644 -index 0000000..67e41a0 ---- /dev/null -+++ b/pengine/test10/ticket-master-19.xml -@@ -0,0 +1,67 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-20.dot b/pengine/test10/ticket-master-20.dot -new file mode 100644 -index 0000000..4755871 ---- /dev/null -+++ b/pengine/test10/ticket-master-20.dot -@@ -0,0 +1,10 @@ -+digraph "g" { -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-20.exp b/pengine/test10/ticket-master-20.exp -new file mode 100644 -index 0000000..c36f0f1 ---- /dev/null -+++ b/pengine/test10/ticket-master-20.exp -@@ -0,0 +1,55 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-20.scores b/pengine/test10/ticket-master-20.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-20.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-20.xml b/pengine/test10/ticket-master-20.xml -new file mode 100644 -index 0000000..876c15d ---- /dev/null -+++ b/pengine/test10/ticket-master-20.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-21.dot b/pengine/test10/ticket-master-21.dot -new file mode 100644 -index 0000000..587b220 ---- /dev/null -+++ b/pengine/test10/ticket-master-21.dot -@@ -0,0 +1,31 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" -> "ms1_stop_0" [ style = bold] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stop_0" -> "ms1_stopped_0" [ style = bold] -+"ms1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] -+"ms1_stop_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" -> "rsc1:1_stop_0 node1" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="orange"] -+"rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc1:1_stop_0 node1" -> "ms1_stopped_0" [ style = bold] -+"rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange"] -+"stonith node1" -> "all_stopped" [ style = bold] -+"stonith node1" -> "ms1_stop_0" [ style = bold] -+"stonith node1" -> "rsc1:1_demote_0 node1" [ style = bold] -+"stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] -+"stonith node1" -> "stonith_complete" [ style = bold] -+"stonith node1" [ style=bold color="green" fontcolor="black"] -+"stonith_complete" -> "rsc1:1_demote_0 node1" [ style = bold] -+"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] -+"stonith_complete" [ style=bold color="green" fontcolor="orange"] -+"stonith_up" -> "stonith node1" [ style = bold] -+"stonith_up" -> "stonith_complete" [ style = bold] -+"stonith_up" [ style=bold color="green" fontcolor="orange"] -+} -diff --git a/pengine/test10/ticket-master-21.exp b/pengine/test10/ticket-master-21.exp -new file mode 100644 -index 0000000..3e82468 ---- /dev/null -+++ b/pengine/test10/ticket-master-21.exp -@@ -0,0 +1,153 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-21.scores b/pengine/test10/ticket-master-21.scores -new file mode 100644 -index 0000000..fcd7fd9 ---- /dev/null -+++ b/pengine/test10/ticket-master-21.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: -INFINITY -+clone_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc1:0 allocation score on node1: -INFINITY -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: -INFINITY -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on none: 0 -diff --git a/pengine/test10/ticket-master-21.xml b/pengine/test10/ticket-master-21.xml -new file mode 100644 -index 0000000..012c850 ---- /dev/null -+++ b/pengine/test10/ticket-master-21.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-22.dot b/pengine/test10/ticket-master-22.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-master-22.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-22.exp b/pengine/test10/ticket-master-22.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-master-22.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-22.scores b/pengine/test10/ticket-master-22.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-22.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-22.xml b/pengine/test10/ticket-master-22.xml -new file mode 100644 -index 0000000..781edf7 ---- /dev/null -+++ b/pengine/test10/ticket-master-22.xml -@@ -0,0 +1,67 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-23.dot b/pengine/test10/ticket-master-23.dot -new file mode 100644 -index 0000000..4755871 ---- /dev/null -+++ b/pengine/test10/ticket-master-23.dot -@@ -0,0 +1,10 @@ -+digraph "g" { -+"ms1_demote_0" -> "ms1_demoted_0" [ style = bold] -+"ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] -+"ms1_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] -+"rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-23.exp b/pengine/test10/ticket-master-23.exp -new file mode 100644 -index 0000000..c36f0f1 ---- /dev/null -+++ b/pengine/test10/ticket-master-23.exp -@@ -0,0 +1,55 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-23.scores b/pengine/test10/ticket-master-23.scores -new file mode 100644 -index 0000000..3e4f30f ---- /dev/null -+++ b/pengine/test10/ticket-master-23.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-master-23.xml b/pengine/test10/ticket-master-23.xml -new file mode 100644 -index 0000000..dce636b ---- /dev/null -+++ b/pengine/test10/ticket-master-23.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-24.dot b/pengine/test10/ticket-master-24.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-master-24.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-master-24.exp b/pengine/test10/ticket-master-24.exp -new file mode 100644 -index 0000000..446bd6f ---- /dev/null -+++ b/pengine/test10/ticket-master-24.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-master-24.scores b/pengine/test10/ticket-master-24.scores -new file mode 100644 -index 0000000..32ce4de ---- /dev/null -+++ b/pengine/test10/ticket-master-24.scores -@@ -0,0 +1,15 @@ -+Allocation scores: -+clone_color: ms1 allocation score on node1: 0 -+clone_color: ms1 allocation score on node2: 0 -+clone_color: rsc1:0 allocation score on node1: 0 -+clone_color: rsc1:0 allocation score on node2: 1 -+clone_color: rsc1:1 allocation score on node1: 1 -+clone_color: rsc1:1 allocation score on node2: 0 -+native_color: rsc1:0 allocation score on node1: 0 -+native_color: rsc1:0 allocation score on node2: 1 -+native_color: rsc1:1 allocation score on node1: 1 -+native_color: rsc1:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc1:0 promotion score on node2: -1 -+rsc1:1 promotion score on node1: INFINITY -diff --git a/pengine/test10/ticket-master-24.xml b/pengine/test10/ticket-master-24.xml -new file mode 100644 -index 0000000..bc469b7 ---- /dev/null -+++ b/pengine/test10/ticket-master-24.xml -@@ -0,0 +1,68 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-13.dot b/pengine/test10/ticket-primitive-13.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-13.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-13.exp b/pengine/test10/ticket-primitive-13.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-13.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-13.scores b/pengine/test10/ticket-primitive-13.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-13.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-13.xml b/pengine/test10/ticket-primitive-13.xml -new file mode 100644 -index 0000000..3116a31 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-13.xml -@@ -0,0 +1,58 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-14.dot b/pengine/test10/ticket-primitive-14.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-14.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-14.exp b/pengine/test10/ticket-primitive-14.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-14.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-14.scores b/pengine/test10/ticket-primitive-14.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-14.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-14.xml b/pengine/test10/ticket-primitive-14.xml -new file mode 100644 -index 0000000..045a84d ---- /dev/null -+++ b/pengine/test10/ticket-primitive-14.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-15.dot b/pengine/test10/ticket-primitive-15.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-15.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-15.exp b/pengine/test10/ticket-primitive-15.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-15.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-15.scores b/pengine/test10/ticket-primitive-15.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-15.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-15.xml b/pengine/test10/ticket-primitive-15.xml -new file mode 100644 -index 0000000..f289844 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-15.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-16.dot b/pengine/test10/ticket-primitive-16.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-16.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-16.exp b/pengine/test10/ticket-primitive-16.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-16.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-16.scores b/pengine/test10/ticket-primitive-16.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-16.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-16.xml b/pengine/test10/ticket-primitive-16.xml -new file mode 100644 -index 0000000..593c0cb ---- /dev/null -+++ b/pengine/test10/ticket-primitive-16.xml -@@ -0,0 +1,58 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-17.dot b/pengine/test10/ticket-primitive-17.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-17.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-17.exp b/pengine/test10/ticket-primitive-17.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-17.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-17.scores b/pengine/test10/ticket-primitive-17.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-17.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-17.xml b/pengine/test10/ticket-primitive-17.xml -new file mode 100644 -index 0000000..7d89152 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-17.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-18.dot b/pengine/test10/ticket-primitive-18.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-18.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-18.exp b/pengine/test10/ticket-primitive-18.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-18.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-18.scores b/pengine/test10/ticket-primitive-18.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-18.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-18.xml b/pengine/test10/ticket-primitive-18.xml -new file mode 100644 -index 0000000..dba34a2 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-18.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-19.dot b/pengine/test10/ticket-primitive-19.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-19.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-19.exp b/pengine/test10/ticket-primitive-19.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-19.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-19.scores b/pengine/test10/ticket-primitive-19.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-19.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-19.xml b/pengine/test10/ticket-primitive-19.xml -new file mode 100644 -index 0000000..339d76a ---- /dev/null -+++ b/pengine/test10/ticket-primitive-19.xml -@@ -0,0 +1,58 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-20.dot b/pengine/test10/ticket-primitive-20.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-20.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-20.exp b/pengine/test10/ticket-primitive-20.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-20.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-20.scores b/pengine/test10/ticket-primitive-20.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-20.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-20.xml b/pengine/test10/ticket-primitive-20.xml -new file mode 100644 -index 0000000..c21a4ab ---- /dev/null -+++ b/pengine/test10/ticket-primitive-20.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-21.dot b/pengine/test10/ticket-primitive-21.dot -new file mode 100644 -index 0000000..430f75f ---- /dev/null -+++ b/pengine/test10/ticket-primitive-21.dot -@@ -0,0 +1,15 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] -+"stonith node2" -> "all_stopped" [ style = bold] -+"stonith node2" -> "rsc1_stop_0 node2" [ style = bold] -+"stonith node2" -> "stonith_complete" [ style = bold] -+"stonith node2" [ style=bold color="green" fontcolor="black"] -+"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] -+"stonith_complete" [ style=bold color="green" fontcolor="orange"] -+"stonith_up" -> "stonith node2" [ style = bold] -+"stonith_up" -> "stonith_complete" [ style = bold] -+"stonith_up" [ style=bold color="green" fontcolor="orange"] -+} -diff --git a/pengine/test10/ticket-primitive-21.exp b/pengine/test10/ticket-primitive-21.exp -new file mode 100644 -index 0000000..424bd27 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-21.exp -@@ -0,0 +1,76 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-21.scores b/pengine/test10/ticket-primitive-21.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-21.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-21.xml b/pengine/test10/ticket-primitive-21.xml -new file mode 100644 -index 0000000..3a9540e ---- /dev/null -+++ b/pengine/test10/ticket-primitive-21.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-22.dot b/pengine/test10/ticket-primitive-22.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-22.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-22.exp b/pengine/test10/ticket-primitive-22.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-22.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-22.scores b/pengine/test10/ticket-primitive-22.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-22.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-22.xml b/pengine/test10/ticket-primitive-22.xml -new file mode 100644 -index 0000000..10d0e39 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-22.xml -@@ -0,0 +1,58 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-23.dot b/pengine/test10/ticket-primitive-23.dot -new file mode 100644 -index 0000000..b574b73 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-23.dot -@@ -0,0 +1,7 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-23.exp b/pengine/test10/ticket-primitive-23.exp -new file mode 100644 -index 0000000..209e4fd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-23.exp -@@ -0,0 +1,40 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-23.scores b/pengine/test10/ticket-primitive-23.scores -new file mode 100644 -index 0000000..ed3f3cd ---- /dev/null -+++ b/pengine/test10/ticket-primitive-23.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-23.xml b/pengine/test10/ticket-primitive-23.xml -new file mode 100644 -index 0000000..2b52181 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-23.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-24.dot b/pengine/test10/ticket-primitive-24.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-24.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-primitive-24.exp b/pengine/test10/ticket-primitive-24.exp -new file mode 100644 -index 0000000..4065c3f ---- /dev/null -+++ b/pengine/test10/ticket-primitive-24.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-primitive-24.scores b/pengine/test10/ticket-primitive-24.scores -new file mode 100644 -index 0000000..5c5889b ---- /dev/null -+++ b/pengine/test10/ticket-primitive-24.scores -@@ -0,0 +1,5 @@ -+Allocation scores: -+native_color: rsc1 allocation score on node1: 0 -+native_color: rsc1 allocation score on node2: 0 -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -diff --git a/pengine/test10/ticket-primitive-24.xml b/pengine/test10/ticket-primitive-24.xml -new file mode 100644 -index 0000000..1d33903 ---- /dev/null -+++ b/pengine/test10/ticket-primitive-24.xml -@@ -0,0 +1,60 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-10.dot b/pengine/test10/ticket-rsc-sets-10.dot -new file mode 100644 -index 0000000..369aacd ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-10.dot -@@ -0,0 +1,36 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone4_stop_0" -> "clone4_stopped_0" [ style = bold] -+"clone4_stop_0" -> "rsc4:0_stop_0 node2" [ style = bold] -+"clone4_stop_0" -> "rsc4:1_stop_0 node1" [ style = bold] -+"clone4_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone4_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stop_0" -> "group2_stopped_0" [ style = bold] -+"group2_stop_0" -> "rsc2_stop_0 node1" [ style = bold] -+"group2_stop_0" -> "rsc3_stop_0 node1" [ style = bold] -+"group2_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demote_0" -> "ms5_demoted_0" [ style = bold] -+"ms5_demote_0" -> "rsc5:1_demote_0 node1" [ style = bold] -+"ms5_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc2_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc3_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc3_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc3_stop_0 node1" -> "rsc2_stop_0 node1" [ style = bold] -+"rsc3_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc4:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc4:0_stop_0 node2" -> "clone4_stopped_0" [ style = bold] -+"rsc4:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc4:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc4:1_stop_0 node1" -> "clone4_stopped_0" [ style = bold] -+"rsc4:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc5:1_demote_0 node1" -> "ms5_demoted_0" [ style = bold] -+"rsc5:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-10.exp b/pengine/test10/ticket-rsc-sets-10.exp -new file mode 100644 -index 0000000..b8278ba ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-10.exp -@@ -0,0 +1,195 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-10.scores b/pengine/test10/ticket-rsc-sets-10.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-10.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-10.xml b/pengine/test10/ticket-rsc-sets-10.xml -new file mode 100644 -index 0000000..606526f ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-10.xml -@@ -0,0 +1,143 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-11.dot b/pengine/test10/ticket-rsc-sets-11.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-11.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-11.exp b/pengine/test10/ticket-rsc-sets-11.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-11.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-11.scores b/pengine/test10/ticket-rsc-sets-11.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-11.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-11.xml b/pengine/test10/ticket-rsc-sets-11.xml -new file mode 100644 -index 0000000..96f4ad3 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-11.xml -@@ -0,0 +1,134 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-12.dot b/pengine/test10/ticket-rsc-sets-12.dot -new file mode 100644 -index 0000000..b5a50db ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-12.dot -@@ -0,0 +1,19 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"group2_stop_0" -> "group2_stopped_0" [ style = bold] -+"group2_stop_0" -> "rsc2_stop_0 node1" [ style = bold] -+"group2_stop_0" -> "rsc3_stop_0 node1" [ style = bold] -+"group2_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc2_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc3_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc3_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc3_stop_0 node1" -> "rsc2_stop_0 node1" [ style = bold] -+"rsc3_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-12.exp b/pengine/test10/ticket-rsc-sets-12.exp -new file mode 100644 -index 0000000..68049cf ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-12.exp -@@ -0,0 +1,101 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-12.scores b/pengine/test10/ticket-rsc-sets-12.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-12.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-12.xml b/pengine/test10/ticket-rsc-sets-12.xml -new file mode 100644 -index 0000000..4aea483 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-12.xml -@@ -0,0 +1,141 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-13.dot b/pengine/test10/ticket-rsc-sets-13.dot -new file mode 100644 -index 0000000..369aacd ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-13.dot -@@ -0,0 +1,36 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone4_stop_0" -> "clone4_stopped_0" [ style = bold] -+"clone4_stop_0" -> "rsc4:0_stop_0 node2" [ style = bold] -+"clone4_stop_0" -> "rsc4:1_stop_0 node1" [ style = bold] -+"clone4_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone4_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stop_0" -> "group2_stopped_0" [ style = bold] -+"group2_stop_0" -> "rsc2_stop_0 node1" [ style = bold] -+"group2_stop_0" -> "rsc3_stop_0 node1" [ style = bold] -+"group2_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demote_0" -> "ms5_demoted_0" [ style = bold] -+"ms5_demote_0" -> "rsc5:1_demote_0 node1" [ style = bold] -+"ms5_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc2_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc3_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc3_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc3_stop_0 node1" -> "rsc2_stop_0 node1" [ style = bold] -+"rsc3_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc4:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc4:0_stop_0 node2" -> "clone4_stopped_0" [ style = bold] -+"rsc4:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc4:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc4:1_stop_0 node1" -> "clone4_stopped_0" [ style = bold] -+"rsc4:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc5:1_demote_0 node1" -> "ms5_demoted_0" [ style = bold] -+"rsc5:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-13.exp b/pengine/test10/ticket-rsc-sets-13.exp -new file mode 100644 -index 0000000..b8278ba ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-13.exp -@@ -0,0 +1,195 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-13.scores b/pengine/test10/ticket-rsc-sets-13.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-13.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-13.xml b/pengine/test10/ticket-rsc-sets-13.xml -new file mode 100644 -index 0000000..c8aecd1 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-13.xml -@@ -0,0 +1,148 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-14.dot b/pengine/test10/ticket-rsc-sets-14.dot -new file mode 100644 -index 0000000..369aacd ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-14.dot -@@ -0,0 +1,36 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone4_stop_0" -> "clone4_stopped_0" [ style = bold] -+"clone4_stop_0" -> "rsc4:0_stop_0 node2" [ style = bold] -+"clone4_stop_0" -> "rsc4:1_stop_0 node1" [ style = bold] -+"clone4_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone4_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stop_0" -> "group2_stopped_0" [ style = bold] -+"group2_stop_0" -> "rsc2_stop_0 node1" [ style = bold] -+"group2_stop_0" -> "rsc3_stop_0 node1" [ style = bold] -+"group2_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demote_0" -> "ms5_demoted_0" [ style = bold] -+"ms5_demote_0" -> "rsc5:1_demote_0 node1" [ style = bold] -+"ms5_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc2_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc3_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc3_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc3_stop_0 node1" -> "rsc2_stop_0 node1" [ style = bold] -+"rsc3_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc4:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc4:0_stop_0 node2" -> "clone4_stopped_0" [ style = bold] -+"rsc4:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc4:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc4:1_stop_0 node1" -> "clone4_stopped_0" [ style = bold] -+"rsc4:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc5:1_demote_0 node1" -> "ms5_demoted_0" [ style = bold] -+"rsc5:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-14.exp b/pengine/test10/ticket-rsc-sets-14.exp -new file mode 100644 -index 0000000..b8278ba ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-14.exp -@@ -0,0 +1,195 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-14.scores b/pengine/test10/ticket-rsc-sets-14.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-14.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-14.xml b/pengine/test10/ticket-rsc-sets-14.xml -new file mode 100644 -index 0000000..0ce0959 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-14.xml -@@ -0,0 +1,148 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-8.dot b/pengine/test10/ticket-rsc-sets-8.dot -new file mode 100644 -index 0000000..7b4328b ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-8.dot -@@ -0,0 +1,4 @@ -+digraph "g" { -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-8.exp b/pengine/test10/ticket-rsc-sets-8.exp -new file mode 100644 -index 0000000..8bc8c88 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-8.exp -@@ -0,0 +1,19 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-8.scores b/pengine/test10/ticket-rsc-sets-8.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-8.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-8.xml b/pengine/test10/ticket-rsc-sets-8.xml -new file mode 100644 -index 0000000..e358427 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-8.xml -@@ -0,0 +1,130 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-9.dot b/pengine/test10/ticket-rsc-sets-9.dot -new file mode 100644 -index 0000000..369aacd ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-9.dot -@@ -0,0 +1,36 @@ -+digraph "g" { -+"all_stopped" [ style=bold color="green" fontcolor="orange"] -+"clone4_stop_0" -> "clone4_stopped_0" [ style = bold] -+"clone4_stop_0" -> "rsc4:0_stop_0 node2" [ style = bold] -+"clone4_stop_0" -> "rsc4:1_stop_0 node1" [ style = bold] -+"clone4_stop_0" [ style=bold color="green" fontcolor="orange"] -+"clone4_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stop_0" -> "group2_stopped_0" [ style = bold] -+"group2_stop_0" -> "rsc2_stop_0 node1" [ style = bold] -+"group2_stop_0" -> "rsc3_stop_0 node1" [ style = bold] -+"group2_stop_0" [ style=bold color="green" fontcolor="orange"] -+"group2_stopped_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demote_0" -> "ms5_demoted_0" [ style = bold] -+"ms5_demote_0" -> "rsc5:1_demote_0 node1" [ style = bold] -+"ms5_demote_0" [ style=bold color="green" fontcolor="orange"] -+"ms5_demoted_0" [ style=bold color="green" fontcolor="orange"] -+"probe_complete node1" [ style=bold color="green" fontcolor="black"] -+"probe_complete node2" [ style=bold color="green" fontcolor="black"] -+"rsc1_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc1_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc2_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc2_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc2_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc3_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc3_stop_0 node1" -> "group2_stopped_0" [ style = bold] -+"rsc3_stop_0 node1" -> "rsc2_stop_0 node1" [ style = bold] -+"rsc3_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc4:0_stop_0 node2" -> "all_stopped" [ style = bold] -+"rsc4:0_stop_0 node2" -> "clone4_stopped_0" [ style = bold] -+"rsc4:0_stop_0 node2" [ style=bold color="green" fontcolor="black"] -+"rsc4:1_stop_0 node1" -> "all_stopped" [ style = bold] -+"rsc4:1_stop_0 node1" -> "clone4_stopped_0" [ style = bold] -+"rsc4:1_stop_0 node1" [ style=bold color="green" fontcolor="black"] -+"rsc5:1_demote_0 node1" -> "ms5_demoted_0" [ style = bold] -+"rsc5:1_demote_0 node1" [ style=bold color="green" fontcolor="black"] -+} -diff --git a/pengine/test10/ticket-rsc-sets-9.exp b/pengine/test10/ticket-rsc-sets-9.exp -new file mode 100644 -index 0000000..b8278ba ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-9.exp -@@ -0,0 +1,195 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/pengine/test10/ticket-rsc-sets-9.scores b/pengine/test10/ticket-rsc-sets-9.scores -new file mode 100644 -index 0000000..4fd8101 ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-9.scores -@@ -0,0 +1,37 @@ -+Allocation scores: -+clone_color: clone4 allocation score on node1: 0 -+clone_color: clone4 allocation score on node2: 0 -+clone_color: ms5 allocation score on node1: 0 -+clone_color: ms5 allocation score on node2: 0 -+clone_color: rsc4:0 allocation score on node1: -INFINITY -+clone_color: rsc4:0 allocation score on node2: -INFINITY -+clone_color: rsc4:1 allocation score on node1: -INFINITY -+clone_color: rsc4:1 allocation score on node2: -INFINITY -+clone_color: rsc5:0 allocation score on node1: 0 -+clone_color: rsc5:0 allocation score on node2: 1 -+clone_color: rsc5:1 allocation score on node1: 1 -+clone_color: rsc5:1 allocation score on node2: 0 -+group_color: group2 allocation score on node1: 0 -+group_color: group2 allocation score on node2: 0 -+group_color: rsc2 allocation score on node1: -INFINITY -+group_color: rsc2 allocation score on node2: -INFINITY -+group_color: rsc3 allocation score on node1: -INFINITY -+group_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc1 allocation score on node1: -INFINITY -+native_color: rsc1 allocation score on node2: -INFINITY -+native_color: rsc2 allocation score on node1: -INFINITY -+native_color: rsc2 allocation score on node2: -INFINITY -+native_color: rsc3 allocation score on node1: -INFINITY -+native_color: rsc3 allocation score on node2: -INFINITY -+native_color: rsc4:0 allocation score on node1: -INFINITY -+native_color: rsc4:0 allocation score on node2: -INFINITY -+native_color: rsc4:1 allocation score on node1: -INFINITY -+native_color: rsc4:1 allocation score on node2: -INFINITY -+native_color: rsc5:0 allocation score on node1: 0 -+native_color: rsc5:0 allocation score on node2: 1 -+native_color: rsc5:1 allocation score on node1: 1 -+native_color: rsc5:1 allocation score on node2: -INFINITY -+native_color: rsc_stonith allocation score on node1: 0 -+native_color: rsc_stonith allocation score on node2: 0 -+rsc5:0 promotion score on node2: -1 -+rsc5:1 promotion score on node1: -INFINITY -diff --git a/pengine/test10/ticket-rsc-sets-9.xml b/pengine/test10/ticket-rsc-sets-9.xml -new file mode 100644 -index 0000000..f3a350d ---- /dev/null -+++ b/pengine/test10/ticket-rsc-sets-9.xml -@@ -0,0 +1,143 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/pacemaker-ticket-standby.diff b/pacemaker-ticket-standby.diff deleted file mode 100644 index bcd0c96..0000000 --- a/pacemaker-ticket-standby.diff +++ /dev/null @@ -1,96 +0,0 @@ -commit de850c422b50d82d09ce820d98d057fae3ea18c9 -Author: Gao,Yan -Date: Fri Mar 23 12:01:13 2012 +0800 - - High: PE: Support to make tickets standby for relinquishing tickets gracefully - -Index: pacemaker/pengine/clone.c -=================================================================== ---- pacemaker.orig/pengine/clone.c -+++ pacemaker/pengine/clone.c -@@ -522,7 +522,7 @@ clone_color(resource_t * rsc, node_t * p - for (; gIter != NULL; gIter = gIter->next) { - rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - -- if (rsc_ticket->ticket->granted == FALSE) { -+ if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { - rsc_ticket_constraint(rsc, rsc_ticket, data_set); - } - } -Index: pacemaker/pengine/group.c -=================================================================== ---- pacemaker.orig/pengine/group.c -+++ pacemaker/pengine/group.c -@@ -68,7 +68,7 @@ group_color(resource_t * rsc, node_t * p - for (; gIter != NULL; gIter = gIter->next) { - rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - -- if (rsc_ticket->ticket->granted == FALSE) { -+ if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { - rsc_ticket_constraint(rsc, rsc_ticket, data_set); - } - } -Index: pacemaker/pengine/master.c -=================================================================== ---- pacemaker.orig/pengine/master.c -+++ pacemaker/pengine/master.c -@@ -353,7 +353,8 @@ master_promotion_order(resource_t * rsc, - for (; gIter != NULL; gIter = gIter->next) { - rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - -- if (rsc_ticket->role_lh == RSC_ROLE_MASTER && rsc_ticket->ticket->granted == FALSE) { -+ if (rsc_ticket->role_lh == RSC_ROLE_MASTER -+ && (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby)) { - resource_location(rsc, NULL, -INFINITY, "__stateful_without_ticket__", data_set); - } - } -Index: pacemaker/pengine/native.c -=================================================================== ---- pacemaker.orig/pengine/native.c -+++ pacemaker/pengine/native.c -@@ -494,7 +494,7 @@ native_color(resource_t * rsc, node_t * - for (gIter = rsc->rsc_tickets; gIter != NULL; gIter = gIter->next) { - rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - -- if (rsc_ticket->ticket->granted == FALSE) { -+ if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { - rsc_ticket_constraint(rsc, rsc_ticket, data_set); - } - } -@@ -1401,7 +1401,7 @@ rsc_ticket_constraint(resource_t * rsc_l - return; - } - -- if (rsc_ticket->ticket->granted == TRUE) { -+ if (rsc_ticket->ticket->granted && rsc_ticket->ticket->standby == FALSE) { - return; - } - -@@ -1421,7 +1421,7 @@ rsc_ticket_constraint(resource_t * rsc_l - crm_debug_2("%s: Processing ticket dependency on %s (%s, %s)", - rsc_lh->id, rsc_ticket->ticket->id, rsc_ticket->id, role2text(rsc_ticket->role_lh)); - -- if (g_list_length(rsc_lh->running_on) > 0) { -+ if (rsc_ticket->ticket->granted == FALSE && g_list_length(rsc_lh->running_on) > 0) { - GListPtr gIter = NULL; - - switch (rsc_ticket->loss_policy) { -@@ -1461,11 +1461,17 @@ rsc_ticket_constraint(resource_t * rsc_l - break; - } - -- } else { -+ } else if (rsc_ticket->ticket->granted == FALSE){ - - if (rsc_ticket->role_lh != RSC_ROLE_MASTER || rsc_ticket->loss_policy == loss_ticket_stop) { - resource_location(rsc_lh, NULL, -INFINITY, "__no_ticket__", data_set); - } -+ -+ } else if (rsc_ticket->ticket->standby) { -+ -+ if (rsc_ticket->role_lh != RSC_ROLE_MASTER || rsc_ticket->loss_policy == loss_ticket_stop) { -+ resource_location(rsc_lh, NULL, -INFINITY, "__ticket_standby__", data_set); -+ } - } - } - diff --git a/pacemaker-ticket-state-tests.diff b/pacemaker-ticket-state-tests.diff deleted file mode 100644 index 9a457f2..0000000 --- a/pacemaker-ticket-state-tests.diff +++ /dev/null @@ -1,565 +0,0 @@ -commit 95b5ca54286889209f9a8d609412594047e34c26 -Author: Gao,Yan -Date: Sat Mar 24 10:48:28 2012 +0800 - - Low: PE: Update regression tests for the new ticket state section - -diff --git a/pengine/test10/ticket-clone-11.xml b/pengine/test10/ticket-clone-11.xml -index 91e8330..2845018 100644 ---- a/pengine/test10/ticket-clone-11.xml -+++ b/pengine/test10/ticket-clone-11.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-12.xml b/pengine/test10/ticket-clone-12.xml -index a7faed0..fc5240e 100644 ---- a/pengine/test10/ticket-clone-12.xml -+++ b/pengine/test10/ticket-clone-12.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-2.xml b/pengine/test10/ticket-clone-2.xml -index 464e886..786dc07 100644 ---- a/pengine/test10/ticket-clone-2.xml -+++ b/pengine/test10/ticket-clone-2.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-3.xml b/pengine/test10/ticket-clone-3.xml -index b3d8333..cf57e5b 100644 ---- a/pengine/test10/ticket-clone-3.xml -+++ b/pengine/test10/ticket-clone-3.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-5.xml b/pengine/test10/ticket-clone-5.xml -index 35ac9a2..e103637 100644 ---- a/pengine/test10/ticket-clone-5.xml -+++ b/pengine/test10/ticket-clone-5.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-6.xml b/pengine/test10/ticket-clone-6.xml -index 1d31273..05e01f4 100644 ---- a/pengine/test10/ticket-clone-6.xml -+++ b/pengine/test10/ticket-clone-6.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-8.xml b/pengine/test10/ticket-clone-8.xml -index 37ab92c..d8e08ee 100644 ---- a/pengine/test10/ticket-clone-8.xml -+++ b/pengine/test10/ticket-clone-8.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-clone-9.xml b/pengine/test10/ticket-clone-9.xml -index 81700a5..d33d515 100644 ---- a/pengine/test10/ticket-clone-9.xml -+++ b/pengine/test10/ticket-clone-9.xml -@@ -26,9 +26,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-11.xml b/pengine/test10/ticket-group-11.xml -index 7bbc2bc..a60211d 100644 ---- a/pengine/test10/ticket-group-11.xml -+++ b/pengine/test10/ticket-group-11.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-12.xml b/pengine/test10/ticket-group-12.xml -index 7a2e239..798b223 100644 ---- a/pengine/test10/ticket-group-12.xml -+++ b/pengine/test10/ticket-group-12.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-2.xml b/pengine/test10/ticket-group-2.xml -index f4c8c43..f96cb00 100644 ---- a/pengine/test10/ticket-group-2.xml -+++ b/pengine/test10/ticket-group-2.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-3.xml b/pengine/test10/ticket-group-3.xml -index 3746e03..80529d0 100644 ---- a/pengine/test10/ticket-group-3.xml -+++ b/pengine/test10/ticket-group-3.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-5.xml b/pengine/test10/ticket-group-5.xml -index 064e211..8e0f935 100644 ---- a/pengine/test10/ticket-group-5.xml -+++ b/pengine/test10/ticket-group-5.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-6.xml b/pengine/test10/ticket-group-6.xml -index 0fdda63..1c6fe6a 100644 ---- a/pengine/test10/ticket-group-6.xml -+++ b/pengine/test10/ticket-group-6.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-8.xml b/pengine/test10/ticket-group-8.xml -index 4232acb..dc8bb88 100644 ---- a/pengine/test10/ticket-group-8.xml -+++ b/pengine/test10/ticket-group-8.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-group-9.xml b/pengine/test10/ticket-group-9.xml -index dfd10c9..b08fdcd 100644 ---- a/pengine/test10/ticket-group-9.xml -+++ b/pengine/test10/ticket-group-9.xml -@@ -36,9 +36,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-11.xml b/pengine/test10/ticket-master-11.xml -index 151d5fb..0b46eae 100644 ---- a/pengine/test10/ticket-master-11.xml -+++ b/pengine/test10/ticket-master-11.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-12.xml b/pengine/test10/ticket-master-12.xml -index 3a238eb..620f2af 100644 ---- a/pengine/test10/ticket-master-12.xml -+++ b/pengine/test10/ticket-master-12.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-2.xml b/pengine/test10/ticket-master-2.xml -index b45fe97..7601925 100644 ---- a/pengine/test10/ticket-master-2.xml -+++ b/pengine/test10/ticket-master-2.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-3.xml b/pengine/test10/ticket-master-3.xml -index 641b26a..b0bc973 100644 ---- a/pengine/test10/ticket-master-3.xml -+++ b/pengine/test10/ticket-master-3.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-5.xml b/pengine/test10/ticket-master-5.xml -index fa15ae2..ab1f797 100644 ---- a/pengine/test10/ticket-master-5.xml -+++ b/pengine/test10/ticket-master-5.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-6.xml b/pengine/test10/ticket-master-6.xml -index 2f691b4..02bf6af 100644 ---- a/pengine/test10/ticket-master-6.xml -+++ b/pengine/test10/ticket-master-6.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-8.xml b/pengine/test10/ticket-master-8.xml -index 4c7bd42..8df7289 100644 ---- a/pengine/test10/ticket-master-8.xml -+++ b/pengine/test10/ticket-master-8.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-master-9.xml b/pengine/test10/ticket-master-9.xml -index b81e762..d4b7979 100644 ---- a/pengine/test10/ticket-master-9.xml -+++ b/pengine/test10/ticket-master-9.xml -@@ -32,9 +32,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-11.xml b/pengine/test10/ticket-primitive-11.xml -index 8f21e29..5b36f87 100644 ---- a/pengine/test10/ticket-primitive-11.xml -+++ b/pengine/test10/ticket-primitive-11.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-12.xml b/pengine/test10/ticket-primitive-12.xml -index 9c7b7f2..7285f7d 100644 ---- a/pengine/test10/ticket-primitive-12.xml -+++ b/pengine/test10/ticket-primitive-12.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-2.xml b/pengine/test10/ticket-primitive-2.xml -index 190fe6c..122b7e6 100644 ---- a/pengine/test10/ticket-primitive-2.xml -+++ b/pengine/test10/ticket-primitive-2.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-3.xml b/pengine/test10/ticket-primitive-3.xml -index 3f535f1..66d08c8 100644 ---- a/pengine/test10/ticket-primitive-3.xml -+++ b/pengine/test10/ticket-primitive-3.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-5.xml b/pengine/test10/ticket-primitive-5.xml -index 60e7df6..c159472 100644 ---- a/pengine/test10/ticket-primitive-5.xml -+++ b/pengine/test10/ticket-primitive-5.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-6.xml b/pengine/test10/ticket-primitive-6.xml -index 958ef16..1614d59 100644 ---- a/pengine/test10/ticket-primitive-6.xml -+++ b/pengine/test10/ticket-primitive-6.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-8.xml b/pengine/test10/ticket-primitive-8.xml -index 5ed4f6f..89ae6b7 100644 ---- a/pengine/test10/ticket-primitive-8.xml -+++ b/pengine/test10/ticket-primitive-8.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-primitive-9.xml b/pengine/test10/ticket-primitive-9.xml -index 4b7225d..80cc4ca 100644 ---- a/pengine/test10/ticket-primitive-9.xml -+++ b/pengine/test10/ticket-primitive-9.xml -@@ -27,9 +27,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-rsc-sets-2.xml b/pengine/test10/ticket-rsc-sets-2.xml -index b0a8ffd..c6b99e4 100644 ---- a/pengine/test10/ticket-rsc-sets-2.xml -+++ b/pengine/test10/ticket-rsc-sets-2.xml -@@ -73,9 +73,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-rsc-sets-3.xml b/pengine/test10/ticket-rsc-sets-3.xml -index 96396bb..c86cdda 100644 ---- a/pengine/test10/ticket-rsc-sets-3.xml -+++ b/pengine/test10/ticket-rsc-sets-3.xml -@@ -73,9 +73,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-rsc-sets-5.xml b/pengine/test10/ticket-rsc-sets-5.xml -index e416852..cae37c3 100644 ---- a/pengine/test10/ticket-rsc-sets-5.xml -+++ b/pengine/test10/ticket-rsc-sets-5.xml -@@ -77,9 +77,7 @@ - - - -- -- -- -+ - - - -diff --git a/pengine/test10/ticket-rsc-sets-6.xml b/pengine/test10/ticket-rsc-sets-6.xml -index dd8f577..5cf50a0 100644 ---- a/pengine/test10/ticket-rsc-sets-6.xml -+++ b/pengine/test10/ticket-rsc-sets-6.xml -@@ -77,10 +77,8 @@ - - - -- -- -- -- -+ -+ - - - -diff --git a/pengine/test10/ticket-rsc-sets-7.xml b/pengine/test10/ticket-rsc-sets-7.xml -index 7ebbc66..2cd519e 100644 ---- a/pengine/test10/ticket-rsc-sets-7.xml -+++ b/pengine/test10/ticket-rsc-sets-7.xml -@@ -77,10 +77,8 @@ - - - -- -- -- -- -+ -+ - - - diff --git a/pacemaker-ticket-state.diff b/pacemaker-ticket-state.diff deleted file mode 100644 index 2add37b..0000000 --- a/pacemaker-ticket-state.diff +++ /dev/null @@ -1,364 +0,0 @@ -commit f3dea7908cfcc61e83b765b8bda68f6ce1ba31d3 -Author: Gao,Yan -Date: Fri Mar 23 11:40:56 2012 +0800 - - High: PE: Move the ticket state section to "/cib/status/tickets/ticket_state" - - Move the ticket state section: - --- "/cib/status/tickets/instance_attributes" - +++ "/cib/status/tickets/ticket_state" - - Pengine still recognizes the deprecated section. If there's any - attribute appears in the new tickets_state section, it'll take over - precedence over the one in the deprecated section. Actually, even - more, once crm_ticket is invoked to set an attribute, it'll clear the - one in the deprecated section. - -Index: pacemaker/include/crm/msg_xml.h -=================================================================== ---- pacemaker.orig/include/crm/msg_xml.h -+++ pacemaker/include/crm/msg_xml.h -@@ -297,7 +297,8 @@ - # define XML_ACL_ATTR_XPATH "xpath" - # define XML_ACL_ATTR_ATTRIBUTE "attribute" - --# define XML_CIB_TAG_TICKETS "tickets" -+# define XML_CIB_TAG_TICKETS "tickets" -+# define XML_CIB_TAG_TICKET_STATE "ticket_state" - - # include - -Index: pacemaker/include/crm/pengine/status.h -=================================================================== ---- pacemaker.orig/include/crm/pengine/status.h -+++ pacemaker/include/crm/pengine/status.h -@@ -294,6 +294,8 @@ struct ticket_s { - char *id; - gboolean granted; - time_t last_granted; -+ gboolean standby; -+ GHashTable *state; - }; - - gboolean cluster_status(pe_working_set_t * data_set); -Index: pacemaker/lib/pengine/unpack.c -=================================================================== ---- pacemaker.orig/lib/pengine/unpack.c -+++ pacemaker/lib/pengine/unpack.c -@@ -412,10 +412,95 @@ unpack_resources(xmlNode * xml_resources - return TRUE; - } - -+/* The ticket state section: -+ * "/cib/status/tickets/ticket_state" */ -+static gboolean -+unpack_ticket_state(xmlNode * xml_ticket, pe_working_set_t * data_set) -+{ -+ const char *ticket_id = NULL; -+ const char *granted = NULL; -+ const char *last_granted = NULL; -+ const char *standby = NULL; -+ xmlAttrPtr xIter = NULL; -+ -+ ticket_t *ticket = NULL; -+ -+ ticket_id = ID(xml_ticket); -+ if (ticket_id == NULL || strlen(ticket_id) == 0) { -+ return FALSE; -+ } -+ -+ crm_trace("Processing ticket state for %s", ticket_id); -+ -+ ticket = g_hash_table_lookup(data_set->tickets, ticket_id); -+ if (ticket == NULL) { -+ ticket = ticket_new(ticket_id, data_set); -+ if (ticket == NULL) { -+ return FALSE; -+ } -+ } -+ -+ for (xIter = xml_ticket->properties; xIter; xIter = xIter->next) { -+ const char *prop_name = (const char *)xIter->name; -+ const char *prop_value = crm_element_value(xml_ticket, prop_name); -+ -+ if(crm_str_eq(prop_name, XML_ATTR_ID, TRUE)) { -+ continue; -+ } -+ g_hash_table_replace(ticket->state, crm_strdup(prop_name), crm_strdup(prop_value)); -+ } -+ -+ granted = g_hash_table_lookup(ticket->state, "granted"); -+ if (granted && crm_is_true(granted)) { -+ ticket->granted = TRUE; -+ crm_info("We have ticket '%s'", ticket->id); -+ } else { -+ ticket->granted = FALSE; -+ crm_info("We do not have ticket '%s'", ticket->id); -+ } -+ -+ last_granted = g_hash_table_lookup(ticket->state, "last-granted"); -+ if (last_granted) { -+ ticket->last_granted = crm_parse_int(last_granted, 0); -+ } -+ -+ standby = g_hash_table_lookup(ticket->state, "standby"); -+ if (standby && crm_is_true(standby)) { -+ ticket->standby = TRUE; -+ if (ticket->granted) { -+ crm_info("Granted ticket '%s' is in standby-mode", ticket->id); -+ } -+ } else { -+ ticket->standby = FALSE; -+ } -+ -+ crm_trace("Done with ticket state for %s", ticket_id); -+ -+ return TRUE; -+} -+ -+static gboolean -+unpack_tickets_state(xmlNode * xml_tickets, pe_working_set_t * data_set) -+{ -+ xmlNode *xml_obj = NULL; -+ -+ for (xml_obj = __xml_first_child(xml_tickets); xml_obj != NULL; xml_obj = __xml_next(xml_obj)) { -+ if (crm_str_eq((const char *)xml_obj->name, XML_CIB_TAG_TICKET_STATE, TRUE) == FALSE) { -+ continue; -+ } -+ unpack_ticket_state(xml_obj, data_set); -+ } -+ -+ return TRUE; -+} -+ -+/* Compatibility with the deprecated ticket state section: -+ * "/cib/status/tickets/instance_attributes" */ - static void --get_ticket_state(gpointer key, gpointer value, gpointer user_data) -+get_ticket_state_legacy(gpointer key, gpointer value, gpointer user_data) - { -- const char *attr_key = key; -+ const char *long_key = key; -+ char *state_key = NULL; - - const char *granted_prefix = "granted-ticket-"; - const char *last_granted_prefix = "last-granted-"; -@@ -425,9 +510,10 @@ get_ticket_state(gpointer key, gpointer - const char *ticket_id = NULL; - const char *is_granted = NULL; - const char *last_granted = NULL; -+ const char *sep = NULL; - - ticket_t *ticket = NULL; -- GHashTable *tickets = user_data; -+ pe_working_set_t *data_set = user_data; - - if (granted_prefix_strlen == 0) { - granted_prefix_strlen = strlen(granted_prefix); -@@ -437,37 +523,41 @@ get_ticket_state(gpointer key, gpointer - last_granted_prefix_strlen = strlen(last_granted_prefix); - } - -- if (strstr(attr_key, granted_prefix) == attr_key) { -- ticket_id = attr_key + granted_prefix_strlen; -+ if (strstr(long_key, granted_prefix) == long_key) { -+ ticket_id = long_key + granted_prefix_strlen; - if (strlen(ticket_id)) { -+ state_key = crm_strdup("granted"); - is_granted = value; - } -- } else if (strstr(attr_key, last_granted_prefix) == attr_key) { -- ticket_id = attr_key + last_granted_prefix_strlen; -+ } else if (strstr(long_key, last_granted_prefix) == long_key) { -+ ticket_id = long_key + last_granted_prefix_strlen; - if (strlen(ticket_id)) { -+ state_key = crm_strdup("last-granted"); - last_granted = value; - } -+ } else if ((sep = strrchr(long_key, '-'))) { -+ ticket_id = sep + 1; -+ state_key = strndup(long_key, strlen(long_key) - strlen(sep)); - } - - if (ticket_id == NULL || strlen(ticket_id) == 0) { - return; - } - -- ticket = g_hash_table_lookup(tickets, ticket_id); -+ if (state_key == NULL || strlen(state_key) == 0) { -+ return; -+ } -+ -+ ticket = g_hash_table_lookup(data_set->tickets, ticket_id); - if (ticket == NULL) { -- crm_malloc0(ticket, sizeof(ticket_t)); -+ ticket = ticket_new(ticket_id, data_set); - if (ticket == NULL) { -- crm_config_err("Cannot allocate ticket '%s'", ticket_id); - return; - } -- -- ticket->id = crm_strdup(ticket_id); -- ticket->granted = FALSE; -- ticket->last_granted = -1; -- -- g_hash_table_insert(tickets, crm_strdup(ticket->id), ticket); - } - -+ g_hash_table_replace(ticket->state, state_key, crm_strdup(value)); -+ - if (is_granted) { - if (crm_is_true(is_granted)) { - ticket->granted = TRUE; -@@ -482,15 +572,6 @@ get_ticket_state(gpointer key, gpointer - } - } - --static void --destroy_ticket(gpointer data) --{ -- ticket_t *ticket = data; -- -- crm_free(ticket->id); -- crm_free(ticket); --} -- - /* remove nodes that are down, stopping */ - /* create +ve rsc_to_node constraints between resources and the nodes they are running on */ - /* anything else? */ -@@ -508,24 +589,32 @@ unpack_status(xmlNode * status, pe_worki - - crm_debug_3("Beginning unpack"); - -- data_set->tickets = -- g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, destroy_ticket); -+ if (data_set->tickets == NULL) { -+ data_set->tickets = -+ g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, destroy_ticket); -+ } - - for (state = __xml_first_child(status); state != NULL; state = __xml_next(state)) { - if (crm_str_eq((const char *)state->name, XML_CIB_TAG_TICKETS, TRUE)) { -- xmlNode *tickets = state; -- GHashTable *attrs_hash = -- g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, -+ xmlNode *xml_tickets = state; -+ GHashTable *state_hash = NULL; -+ -+ /* Compatibility with the deprecated ticket state section: -+ * Unpack the attributes in the deprecated "/cib/status/tickets/instance_attributes" if it exists. */ -+ state_hash = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, - g_hash_destroy_str); - -- unpack_instance_attributes(data_set->input, tickets, XML_TAG_ATTR_SETS, NULL, -- attrs_hash, NULL, TRUE, data_set->now); -+ unpack_instance_attributes(data_set->input, xml_tickets, XML_TAG_ATTR_SETS, NULL, -+ state_hash, NULL, TRUE, data_set->now); - -- g_hash_table_foreach(attrs_hash, get_ticket_state, data_set->tickets); -+ g_hash_table_foreach(state_hash, get_ticket_state_legacy, data_set); - -- if (attrs_hash) { -- g_hash_table_destroy(attrs_hash); -+ if (state_hash) { -+ g_hash_table_destroy(state_hash); - } -+ -+ /* Unpack the new "/cib/status/tickets/ticket_state"s */ -+ unpack_tickets_state(xml_tickets, data_set); - } - - if (crm_str_eq((const char *)state->name, XML_CIB_TAG_STATE, TRUE)) { -Index: pacemaker/lib/pengine/utils.c -=================================================================== ---- pacemaker.orig/lib/pengine/utils.c -+++ pacemaker/lib/pengine/utils.c -@@ -1373,3 +1373,53 @@ get_target_role(resource_t * rsc, enum r - *role = local_role; - return TRUE; - } -+ -+void -+destroy_ticket(gpointer data) -+{ -+ ticket_t *ticket = data; -+ -+ if (ticket->state) { -+ g_hash_table_destroy(ticket->state); -+ } -+ crm_free(ticket->id); -+ crm_free(ticket); -+} -+ -+ticket_t * -+ticket_new(const char *ticket_id, pe_working_set_t * data_set) -+{ -+ ticket_t *ticket = NULL; -+ -+ if (ticket_id == NULL || strlen(ticket_id) == 0) { -+ return NULL; -+ } -+ -+ if (data_set->tickets == NULL) { -+ data_set->tickets = -+ g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, destroy_ticket); -+ } -+ -+ ticket = g_hash_table_lookup(data_set->tickets, ticket_id); -+ if (ticket == NULL) { -+ -+ crm_malloc0(ticket, sizeof(ticket_t)); -+ if (ticket == NULL) { -+ crm_err("Cannot allocate ticket '%s'", ticket_id); -+ return NULL; -+ } -+ -+ crm_trace("Creaing ticket entry for %s", ticket_id); -+ -+ ticket->id = crm_strdup(ticket_id); -+ ticket->granted = FALSE; -+ ticket->last_granted = -1; -+ ticket->standby = FALSE; -+ ticket->state = g_hash_table_new_full(crm_str_hash, g_str_equal, -+ g_hash_destroy_str, g_hash_destroy_str); -+ -+ g_hash_table_insert(data_set->tickets, crm_strdup(ticket->id), ticket); -+ } -+ -+ return ticket; -+} -Index: pacemaker/lib/pengine/utils.h -=================================================================== ---- pacemaker.orig/lib/pengine/utils.h -+++ pacemaker/lib/pengine/utils.h -@@ -162,4 +162,7 @@ extern gboolean get_target_role(resource - extern resource_t *find_clone_instance(resource_t * rsc, const char *sub_id, - pe_working_set_t * data_set); - -+extern void destroy_ticket(gpointer data); -+extern ticket_t *ticket_new(const char * ticket_id, pe_working_set_t * data_set); -+ - #endif -Index: pacemaker/pengine/constraints.c -=================================================================== ---- pacemaker.orig/pengine/constraints.c -+++ pacemaker/pengine/constraints.c -@@ -2000,17 +2000,10 @@ unpack_rsc_ticket(xmlNode * xml_obj, pe_ - } - - if (ticket == NULL) { -- crm_malloc0(ticket, sizeof(ticket_t)); -+ ticket = ticket_new(ticket_str, data_set); - if (ticket == NULL) { -- crm_config_err("Cannot allocate ticket '%s'", ticket_str); - return FALSE; - } -- -- ticket->id = crm_strdup(ticket_str); -- ticket->granted = FALSE; -- ticket->last_granted = -1; -- -- g_hash_table_insert(data_set->tickets, crm_strdup(ticket->id), ticket); - } - - unpack_rsc_ticket_template(xml_obj, &expanded_xml, data_set); diff --git a/pacemaker-tickets-crm_simulate.diff b/pacemaker-tickets-crm_simulate.diff deleted file mode 100644 index 13fd2c3..0000000 --- a/pacemaker-tickets-crm_simulate.diff +++ /dev/null @@ -1,97 +0,0 @@ -commit 575e1964464f6df7de7b2fbb688469554cdec44f -Author: Gao,Yan -Date: Thu Mar 8 18:40:54 2012 +0800 - - Medium: Tools: crm_simulate - Implement the support of granting/revoking tickets for crm_simulate - -diff --git a/tools/crm_inject.c b/tools/crm_inject.c -index 44b5cad..610140b 100644 ---- a/tools/crm_inject.c -+++ b/tools/crm_inject.c -@@ -758,7 +758,7 @@ create_dotfile(pe_working_set_t * data_set, const char *dot_file, gboolean all_a - static void - modify_configuration(pe_working_set_t * data_set, - const char *quorum, GListPtr node_up, GListPtr node_down, GListPtr node_fail, -- GListPtr op_inject) -+ GListPtr op_inject, GListPtr ticket_grant, GListPtr ticket_revoke) - { - int rc = cib_ok; - GListPtr gIter = NULL; -@@ -817,6 +817,34 @@ modify_configuration(pe_working_set_t * data_set, - CRM_ASSERT(rc == cib_ok); - } - -+ for (gIter = ticket_grant; gIter != NULL; gIter = gIter->next) { -+ char *ticket = (char *)gIter->data; -+ char *attr_name = crm_concat("granted-ticket", ticket, '-'); -+ -+ quiet_log(" + Granting ticket %s\n", ticket); -+ rc = update_attr(global_cib, cib_sync_call | cib_scope_local, -+ XML_CIB_TAG_TICKETS, NULL, NULL, NULL, NULL, -+ attr_name, "true", TRUE); -+ -+ crm_free(attr_name); -+ -+ CRM_ASSERT(rc == cib_ok); -+ } -+ -+ for (gIter = ticket_revoke; gIter != NULL; gIter = gIter->next) { -+ char *ticket = (char *)gIter->data; -+ char *attr_name = crm_concat("granted-ticket", ticket, '-'); -+ -+ quiet_log(" + Revoking ticket %s\n", ticket); -+ rc = update_attr(global_cib, cib_sync_call | cib_scope_local, -+ XML_CIB_TAG_TICKETS, NULL, NULL, NULL, NULL, -+ attr_name, "false", TRUE); -+ -+ crm_free(attr_name); -+ -+ CRM_ASSERT(rc == cib_ok); -+ } -+ - for (gIter = op_inject; gIter != NULL; gIter = gIter->next) { - char *spec = (char *)gIter->data; - -@@ -971,6 +999,8 @@ static struct crm_option long_options[] = { - {"op-fail", 1, 0, 'F', "\t$rsc_$task_$interval@$node=$rc - Fail the specified task while running the simulation"}, - {"set-datetime", 1, 0, 't', "Set date/time"}, - {"quorum", 1, 0, 'q', "\tSpecify a value for quorum"}, -+ {"ticket-grant", 1, 0, 'g', "Grant a ticket"}, -+ {"ticket-revoke",1, 0, 'r', "Revoke a ticket"}, - - {"-spacer-", 0, 0, '-', "\nOutput Options:"}, - -@@ -1090,6 +1120,8 @@ main(int argc, char **argv) - GListPtr node_down = NULL; - GListPtr node_fail = NULL; - GListPtr op_inject = NULL; -+ GListPtr ticket_grant = NULL; -+ GListPtr ticket_revoke = NULL; - - xmlNode *input = NULL; - -@@ -1163,6 +1195,14 @@ main(int argc, char **argv) - modified++; - quorum = optarg; - break; -+ case 'g': -+ modified++; -+ ticket_grant = g_list_append(ticket_grant, optarg); -+ break; -+ case 'r': -+ modified++; -+ ticket_revoke = g_list_append(ticket_revoke, optarg); -+ break; - case 'a': - all_actions = TRUE; - break; -@@ -1249,7 +1289,8 @@ 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, node_up, node_down, node_fail, op_inject, -+ ticket_grant, ticket_revoke); - - rc = global_cib->cmds->query(global_cib, NULL, &input, cib_sync_call); - if (rc != cib_ok) { diff --git a/pacemaker.changes b/pacemaker.changes index e5be64b..ced044d 100644 --- a/pacemaker.changes +++ b/pacemaker.changes @@ -1,9 +1,161 @@ +------------------------------------------------------------------- +Wed Jun 6 08:15:34 UTC 2012 - ygao@suse.com + +- Core: Revert to the original process flags for the support of + rolling-upgrade +- PE: Bug cl#5059 - Use the correct action's status when calculating + required actions for interleaved clones +- Upstream version cs: 61a079313275f3e9d0e85671f62c721d32ce3563 + ------------------------------------------------------------------- Mon May 21 11:46:15 UTC 2012 - badshah400@gmail.com - Use BuildRequires: libgnutls-devel instead of gnutls-devel for Factory in keeping with gnutls package naming changes. +------------------------------------------------------------------- +Fri Apr 20 07:14:26 UTC 2012 - ygao@suse.com + +- corosync: Determine node state for plugin based cluster types +- tools: crm_node - Test stack membership only when displaying + partition members +- Overhaul the way peers are determined to be sufficiently active +- PE: Observe the promotion score of probed resources +- crmd: Detect when peers have an incorrectly set process list +- corosync: Detect when the first corosync has not yet formed and + handle it gracefully +- Corosync: Move deprecated corosync variants to their own file +- Upstream version cs: 4c8b599e6d79499f28f8178988d65fd33e0d9b24 + +------------------------------------------------------------------- +Thu Apr 19 12:22:14 UTC 2012 - ygao@suse.com + +- Update to version 1.1.7 +- crmd: cl#5057 - Restart sub-systems correctly (bnc#755671) +- corosync: Fix compilation when libqb is not available +- pengine: cl#5058 - Fixes issue with on-fail option on operation + being ignored. +- tools: rhbz#754216 - Make crm_mon --as-xml option default to + --one-shot mode +- cts: cl#5047 - Suppress cts badnews output related to fencing + when fencing is expected. +- crmd: cl#5053 - Fixes fail-count not being updated properly. +- crmd: cl#5051 - Fixes file leak in pe ipc connection initialization. +- Tools: crm_simulate - Correctly detect status sections with + duplicate node_state entries +- crmd: Detect when the quorum API isn't configured for corosync 2.0 +- RA: controld - use the correct dlm_controld when membership comes + from corosync directly +- Core: Fix the logging of XML and conditional corefile creation + by asserts +- pengine: cl#5045 - Better handling of interrupted migrations. +- Build: rhbz#805147 - Use default value for HB_DAEMON_DIR define + when clusterglue does not provide one. +- cib: Even with no peers, we still need to wait for connected + clients to disconnect +- corosync: Fix complation warning when corosync doesn't use libqb +- cib: Determine when there are no peers to respond to our shutdown + request and exit +- cib: Correctly shutdown in the presence of peers without relying + on timers +- Corosync: Correctly disconnect from corosync variants +- cib: Ensure no additional messages are processed after we begin + terminating +- Corosync: Reset connection variables after disconnect +- Core: Correctly track the length of a string without reading from + uninitialzied memory (valgrind) +- PE: Fix memory leak in order_rsc_sets (valgrind) +- Tools: Fix memory leak in crm_simulate (valgrind) +- PE: Correctly locate crm_simulate for automated regression tests +- Core: Use the default schema location when PCMK_schema_directory + is defined but empty +- PE: Correctly migrate a resource that has just migrated +- pengine: cl#5025 - Automatically clear failures when resource + configuration changes. +- Fix a number of potential problems reported by coverity +- crmd: Also purge fencing results when we enter S_NOT_DC +- crmd: Correctly determine when a node can suicide with fencing +- PE: Bug rhbz#799070 - Report resources as active in crm_mon if + they are located on an unclean node +- Upstream version cs: 023d3b183e77cfdb3699080b26d98ca4bc534c57 + +------------------------------------------------------------------- +Wed Apr 18 06:30:14 UTC 2012 - ygao@suse.com + +- PE: Support of referencing resource templates in resource sets (bnc#729634) +- stonith: A "start" operation of a stonith resource does a "monitor" on the + device beyond registering it +- PE: More validations on configurations related to resource templates +- Core: Bug cl#5027 - Fix compilation when libqb is not available +- PE: cl#5002 - increment_clone() does not terminate on invalid input +- PE: Indicate the difference between resources that are restarting + and reloading +- crmd: Leave it up to the PE to decide which ops can/cannot be reload +- PE: Detect reloads of previously migrated resources +- Core: Bug cl#5016 - Prevent failures in recurring ops from being lost +- crmd: Bug cl#5015 - Remove the failed operation as well as the + resulting fail-count and last-failure attributes +- Fencing: Supress errors when listing all registered devices +- PE: Reload of a resource no longer causes a restart of dependant resources +- Fencing: Implement support for advanced fencing topologies: + eg. kdump || (network && disk) || power +- Fencing: Add support for fencing levels to the admin tool +- Fencing: Prevent duplicate free and uninitialized pointers +- Fencing: Correctly remove the fencing levels when requested +- Fencing: Not all devices might be running locally when creating a + fencing level +- cib: Don't halt disk writes if the previous digest is missing +- Cluster: Hook up the callbacks to the corosync quorum notifications +- Corosync: Correctly extract the node id from membership udpates +- Core: Ensure signals are handled eventually in the absense of timer + sources or IPC messages +- Corosync: Default to using the nodeid as the node's uuid (instead of uname) +- corosync: Consistently set the correct uuid with get_node_uuid() +- Fencing: Standardize on /one/ method for clients to request members + be fenced +- Core: Strip text nodes from on disk xml files +- Tools: Implement crm_node functionality for native corosync +- corosync: Hook up CPG membership +- fencing: More gracefully handle failed 'list' operations for devices + that only support a single connection +- corosync: Unset the process list when nodes dissappear on us +- corosync: Correctly infer lost members from the quorum API +- crmd: Election - perform the age comparison only once +- crmd: Remove rusage differences of less than a second from election + calculations +- PE: Ensure post-migration stop actions occur before node shutdown +- fencing: Correctly remove a single fencing level for a target +- fencing: Add the fencing topology section to the 1.1 configuration schema +- corosync: Ensure we catch nodes that leave the membership, even + if the ringid doesn't change +- corosync: Treat CS_ERR_QUEUE_FULL the same as CS_ERR_TRY_AGAIN +- crmd: Fast-track shutdown if we couldn't request it via attrd +- tools: Bug rhbz#754216 - Add XML as an output option to crm_mon +- Core: Correctly determine when an XML file should be decompressed +- corosync: Remove deprecated member of the CFG API +- fencing: Provide enough data to construct an entry in the node's + fencing history +- pengine: cl#5014, Prevent asymmetrical order constraints from causing + resource stops +- pengine: cl#5007, Fixes use of colocation constraints with multi-state + resources +- PE: Bug cl#5038 - Prevent restart of anonymous clones when clone-max + decreases +- PE: Bug rhbz#789397 - Failcount and related info should be reset + or removed when the resource is deleted +- fencing: fence_legacy - Drop spurilous host argument from status query +- pengine: Bug cl#5000 - Implements ability to create rsc_order + constraint sets such that A can start after (B || C) has started. +- Fencing: fence_legacy - Ensure port is available as an environment + variable when calling monitor +- PE: Bug cl#5028 - Unmanaged services should block shutdown unless + in maintainence mode (bnc#738882) +- Fix coverity defects in pengine, cib, stonith-ng and crm_resource +- Fix use-after-free in crmd, stonith-ng and crm_simulate +- Fix use-of-NULL in libcrmcluster and stonith-ng +- Fix segfaults in stonith-ng and xml.c +- Upstream version cs: 1e8a96ae55d6022f7036434b537938a1fa75a700 + ------------------------------------------------------------------- Thu Mar 29 07:39:30 UTC 2012 - lmb@novell.com diff --git a/pacemaker.spec b/pacemaker.spec index 9551278..5cf0e01 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -39,38 +39,17 @@ Name: pacemaker Summary: The Pacemaker scalable High-Availability cluster resource manager License: GPL-2.0+ ; LGPL-2.1+ Group: Productivity/Clustering/HA -Version: 1.1.6 +Version: 1.1.7 Release: 0 Url: http://www.clusterlabs.org Source: pacemaker.tar.bz2 Source2: %{doc_pkg}.tar.gz Source100: pacemaker.rpmlintrc Patch1: pacemaker-cts-startcmd.patch -Patch2: rm_crmsh.patch -Patch3: pacemaker-rsc_ticket-schema.diff -Patch4: pacemaker-template-schema.diff -Patch5: bug-728579_pacemaker-stonith-dev-id.diff -Patch6: pacemaker-NodeUtilization-RA.diff -Patch7: pacemaker-abi-compliance.diff -Patch8: pacemaker-stonith-timeout.diff -Patch9: pacemaker-ptest-xml-text.diff -Patch10: pacemaker-cib-new-segfault.diff -Patch11: pacemaker-tickets-crm_simulate.diff -Patch12: pacemaker-crm_ticket-force.diff -Patch13: pacemaker-ticket-last-granted-prefix.diff -Patch14: pacemaker-ticket-state.diff -Patch15: pacemaker-ticket-standby.diff -Patch16: pacemaker-crm_ticket.diff -Patch17: pacemaker-crm_ticket-tests-update.diff -Patch18: pacemaker-crm_ticket-tests-standby.diff -Patch19: pacemaker-ticket-state-tests.diff -Patch20: pacemaker-ticket-standby-tests.diff -Patch21: pacemaker-log-fix.diff -Patch22: pacemaker-crm_ticket-valgrind.diff -Patch23: pacemaker-crm_ticket-all-tickets.diff -Patch24: pacemaker-crm_mon-tickets.diff -Patch25: pacemaker-crm_simulate-ticket-state.diff -Patch26: pacemaker-coverity-defects.diff +Patch2: pacemaker-daemon-symlinks.diff +Patch3: bug-728579_pacemaker-stonith-dev-id.diff +Patch4: pacemaker-NodeUtilization-RA.diff +Patch5: pacemaker-crm-proc-flag.patch Patch100: fix-glib_h-include.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: pacemaker-ticket-support = 2.0 @@ -151,7 +130,7 @@ resource health. Authors: -------- - Andrew Beekhof + Andrew Beekhof %package -n libpacemaker3 Summary: The Pacemaker scalable High-Availability cluster resource manager @@ -173,7 +152,7 @@ resource health. Authors: -------- - Andrew Beekhof + Andrew Beekhof %package -n libpacemaker-devel Summary: The Pacemaker scalable High-Availability cluster resource manager @@ -204,7 +183,7 @@ resource health. Authors: -------- - Andrew Beekhof + Andrew Beekhof %prep ########################################################### @@ -214,27 +193,6 @@ Authors: %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 %patch100 -p1 ########################################################### @@ -269,8 +227,8 @@ if [ -e %{doc_pkg}/cibadmin.8 ]; then install -p -m 644 $file $RPM_BUILD_ROOT/%{_mandir}/man8 done fi -chmod a+x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/crm_primitive.py -chmod a+x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/hb2openais-helper.py +chmod a+x $RPM_BUILD_ROOT/%{_libdir}/pacemaker/crm_primitive.py +chmod a+x $RPM_BUILD_ROOT/%{_libdir}/pacemaker/hb2openais-helper.py rm $RPM_BUILD_ROOT/%{_libdir}/service_crm.so # Don't want to ship this just yet: @@ -339,11 +297,13 @@ fi %files ########################################################### %defattr(-,root,root) +%dir %{_libdir}/pacemaker %dir %{_libdir}/heartbeat %dir %{_var}/lib/heartbeat %dir %{pcmk_docdir} %exclude %{_datadir}/pacemaker/tests %{_datadir}/pacemaker +%{_libdir}/pacemaker/* %{_libdir}/heartbeat/* %{_sbindir}/cibadmin %{_sbindir}/crm_attribute diff --git a/pacemaker.tar.bz2 b/pacemaker.tar.bz2 index 8ce4e61..ad3e40d 100644 --- a/pacemaker.tar.bz2 +++ b/pacemaker.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6f240cd8995b416aa0bab067137a44025ced19d318f5d489505d4e6c097e8a5 -size 7754006 +oid sha256:38cef3a375dc4d083e66eb2bb5f92b1cdfddfac5e7b69dbfe45ff19d078e6438 +size 7888481 diff --git a/rm_crmsh.patch b/rm_crmsh.patch deleted file mode 100644 index e1f35f4..0000000 --- a/rm_crmsh.patch +++ /dev/null @@ -1,74 +0,0 @@ -# HG changeset patch -# Parent 9971ebba4494012a93c03b40a2c58ec0eb60f50c -build: remove crm shell - -diff -r 9971ebba4494 Makefile.am ---- a/Makefile.am Wed Aug 31 11:02:11 2011 +1000 -+++ b/Makefile.am Wed Oct 19 14:44:33 2011 +0200 -@@ -23,7 +23,7 @@ EXTRA_DIST = autogen.sh Con - MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ - DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar - --CORE = $(LIBLTDL_DIR) replace include lib mcp pengine cib crmd fencing tools shell xml -+CORE = $(LIBLTDL_DIR) replace include lib mcp pengine cib crmd fencing tools xml - SUBDIRS = $(CORE) cts extra doc - - doc_DATA = AUTHORS COPYING COPYING.LIB -diff -r 9971ebba4494 configure.ac ---- a/configure.ac Wed Aug 31 11:02:11 2011 +1000 -+++ b/configure.ac Wed Oct 19 14:44:33 2011 +0200 -@@ -1686,15 +1686,6 @@ tools/Makefile \ - tools/coverage.sh \ - tools/hb2openais.sh \ - tools/crm_primitive.py \ --shell/Makefile \ -- shell/templates/Makefile \ -- shell/regression/Makefile \ -- shell/regression/testcases/Makefile \ -- shell/modules/Makefile \ -- shell/modules/ui.py \ -- shell/modules/ra.py \ -- shell/modules/vars.py \ -- shell/modules/help.py \ - xml/Makefile \ - ) - -diff -r 9971ebba4494 doc/Makefile.am ---- a/doc/Makefile.am Wed Aug 31 11:02:11 2011 +1000 -+++ b/doc/Makefile.am Wed Oct 19 14:44:33 2011 +0200 -@@ -22,7 +22,6 @@ MAINTAINERCLEANFILES = Makefile.in - helpdir = $(datadir)/$(PACKAGE) - - ascii = crm_fencing.txt acls.txt --asciiman = crm.8.txt - help_DATA = crm.8.txt - docbook = Pacemaker_Explained Clusters_from_Scratch - doc_DATA = README.hb2openais $(ascii) $(generated_docs) -@@ -57,10 +56,7 @@ graphics: $(PNGS) - $(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@ - - if BUILD_ASCIIDOC --generated_docs += $(ascii:%.txt=%.html) $(asciiman:%.txt=%.html) --generated_mans += $(asciiman:%.8.txt=%.8) --$(generated_mans): $(asciiman) --man8_MANS = $(generated_mans) -+generated_docs += $(ascii:%.txt=%.html) - endif - - if BUILD_DOCBOOK -@@ -122,12 +118,12 @@ brand: $(BRAND_PNGS) $(wildcard publica - # find publican-clusterlabs -name "*.noarch.rpm" -exec sudo rpm -Uvh --force \{\} \; - - www: $(generated_docs) -- echo rsync -rtz --progress $(generated_docs) $(ascii) $(asciiman) root@www.clusterlabs.org:/var/www/html/doc/ -- rsync -rtz --progress $(generated_docs) $(ascii) $(asciiman) root@www.clusterlabs.org:/var/www/html/doc/ -+ echo rsync -rtz --progress $(generated_docs) $(ascii) root@www.clusterlabs.org:/var/www/html/doc/ -+ rsync -rtz --progress $(generated_docs) $(ascii) root@www.clusterlabs.org:/var/www/html/doc/ - rm -f $(docbook_txt) - make DOCBOOK_FORMATS="pdf,html,html-single,txt,epub" DOCBOOK_LANGS="all" all-local $(generated_docs) $(ascii) - echo Uploading current documentation set to clusterlabs.org -- rsync -rtz --progress $(generated_docs) $(ascii) $(asciiman) root@www.clusterlabs.org:/var/www/html/doc/ -+ rsync -rtz --progress $(generated_docs) $(ascii) root@www.clusterlabs.org:/var/www/html/doc/ - if BUILD_DOCBOOK - for book in $(docbook); do \ - echo Uploading $$book...; \