- 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 - 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 - 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 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=38
This commit is contained in:
parent
51f801ad74
commit
83c5c33d98
@ -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);
|
||||
|
||||
|
@ -1,48 +0,0 @@
|
||||
commit 7f95c09d53cae9c5a6e2348c2d4ad7fd5e59affe
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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;
|
@ -1,18 +0,0 @@
|
||||
commit 7da9e833b63d83c32852154481572f816754c114
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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;
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
commit 54001929bb3faf05d25176cdc84097ec5fa0979f
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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;
|
||||
}
|
||||
|
43
pacemaker-crm-proc-flag.patch
Normal file
43
pacemaker-crm-proc-flag.patch
Normal file
@ -0,0 +1,43 @@
|
||||
commit 3e12eebb6cb2636054f42198222e52a28da40056
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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* */
|
||||
|
@ -1,109 +0,0 @@
|
||||
commit 147890c8f9200960b3212a4a5acca4240f20451d
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 <crm/cib.h>
|
||||
#include <crm/pengine/status.h>
|
||||
#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();
|
@ -1,206 +0,0 @@
|
||||
commit 1631d9396f69ac54f0b4f84a5f7ab6d016026c87
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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) {
|
@ -1,39 +0,0 @@
|
||||
commit dfdf37641c0bfc405673b4b324bd7d4304004685
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 <crm/pengine/rules.h>
|
||||
#include <crm/pengine/status.h>
|
||||
|
||||
+#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;
|
@ -1,143 +0,0 @@
|
||||
commit e0733a32d39bf673e0ef886dacfbe452f0110967
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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
|
||||
</status>
|
||||
</cib>
|
||||
* Passed: crm_ticket - Query granted-ticket value
|
||||
-Deleted tickets option: id=status-tickets-granted-ticket-ticketA name=granted-ticket-ticketA
|
||||
-
|
||||
<cib epoch="18" num_updates="3" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
<crm_config>
|
||||
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"
|
||||
}
|
||||
|
@ -1,238 +0,0 @@
|
||||
commit 0f60f521e85fac6f185f6f5fb71163f7a3772e2b
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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
|
||||
</node_state>
|
||||
</status>
|
||||
</cib>
|
||||
-* Passed: crm_ticket - Default granted-ticket value
|
||||
+* Passed: crm_ticket - Default ticket granted state
|
||||
<cib epoch="18" num_updates="2" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
<crm_config>
|
||||
@@ -881,7 +881,7 @@ false
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
-* Passed: crm_ticket - Set granted-ticket value
|
||||
+* Passed: crm_ticket - Set ticket granted state
|
||||
false
|
||||
<cib epoch="18" num_updates="2" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
@@ -921,7 +921,7 @@ false
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
-* Passed: crm_ticket - Query granted-ticket value
|
||||
+* Passed: crm_ticket - Query ticket granted state
|
||||
Deleted ticketA state attribute: name=granted
|
||||
<cib epoch="18" num_updates="3" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
@@ -961,4 +961,162 @@ Deleted ticketA state attribute: name=granted
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
-* Passed: crm_ticket - Delete granted-ticket value
|
||||
+* Passed: crm_ticket - Delete ticket granted state
|
||||
+<cib epoch="18" num_updates="4" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
+ <configuration>
|
||||
+ <crm_config>
|
||||
+ <cluster_property_set id="cib-bootstrap-options"/>
|
||||
+ <cluster_property_set id="duplicate">
|
||||
+ <nvpair id="duplicate-cluster-delay" name="cluster-delay" value="30s"/>
|
||||
+ </cluster_property_set>
|
||||
+ </crm_config>
|
||||
+ <nodes>
|
||||
+ <node id="clusterNode-UUID" uname="clusterNode-UNAME" type="member">
|
||||
+ <instance_attributes id="nodes-clusterNode-UUID">
|
||||
+ <nvpair id="nodes-clusterNode-UUID-ram" name="ram" value="1024M"/>
|
||||
+ </instance_attributes>
|
||||
+ </node>
|
||||
+ </nodes>
|
||||
+ <resources>
|
||||
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy">
|
||||
+ <meta_attributes id="dummy-meta_attributes"/>
|
||||
+ <instance_attributes id="dummy-instance_attributes">
|
||||
+ <nvpair id="dummy-instance_attributes-delay" name="delay" value="10s"/>
|
||||
+ </instance_attributes>
|
||||
+ </primitive>
|
||||
+ </resources>
|
||||
+ <constraints/>
|
||||
+ </configuration>
|
||||
+ <status>
|
||||
+ <node_state id="clusterNode-UUID" uname="clusterNode-UNAME">
|
||||
+ <transient_attributes id="clusterNode-UUID">
|
||||
+ <instance_attributes id="status-clusterNode-UUID">
|
||||
+ <nvpair id="status-clusterNode-UUID-fail-count-dummy" name="fail-count-dummy" value="10"/>
|
||||
+ </instance_attributes>
|
||||
+ </transient_attributes>
|
||||
+ </node_state>
|
||||
+ <tickets>
|
||||
+ <ticket_state id="ticketA" standby="true"/>
|
||||
+ </tickets>
|
||||
+ </status>
|
||||
+</cib>
|
||||
+* Passed: crm_ticket - Make a ticket standby
|
||||
+true
|
||||
+<cib epoch="18" num_updates="4" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
+ <configuration>
|
||||
+ <crm_config>
|
||||
+ <cluster_property_set id="cib-bootstrap-options"/>
|
||||
+ <cluster_property_set id="duplicate">
|
||||
+ <nvpair id="duplicate-cluster-delay" name="cluster-delay" value="30s"/>
|
||||
+ </cluster_property_set>
|
||||
+ </crm_config>
|
||||
+ <nodes>
|
||||
+ <node id="clusterNode-UUID" uname="clusterNode-UNAME" type="member">
|
||||
+ <instance_attributes id="nodes-clusterNode-UUID">
|
||||
+ <nvpair id="nodes-clusterNode-UUID-ram" name="ram" value="1024M"/>
|
||||
+ </instance_attributes>
|
||||
+ </node>
|
||||
+ </nodes>
|
||||
+ <resources>
|
||||
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy">
|
||||
+ <meta_attributes id="dummy-meta_attributes"/>
|
||||
+ <instance_attributes id="dummy-instance_attributes">
|
||||
+ <nvpair id="dummy-instance_attributes-delay" name="delay" value="10s"/>
|
||||
+ </instance_attributes>
|
||||
+ </primitive>
|
||||
+ </resources>
|
||||
+ <constraints/>
|
||||
+ </configuration>
|
||||
+ <status>
|
||||
+ <node_state id="clusterNode-UUID" uname="clusterNode-UNAME">
|
||||
+ <transient_attributes id="clusterNode-UUID">
|
||||
+ <instance_attributes id="status-clusterNode-UUID">
|
||||
+ <nvpair id="status-clusterNode-UUID-fail-count-dummy" name="fail-count-dummy" value="10"/>
|
||||
+ </instance_attributes>
|
||||
+ </transient_attributes>
|
||||
+ </node_state>
|
||||
+ <tickets>
|
||||
+ <ticket_state id="ticketA" standby="true"/>
|
||||
+ </tickets>
|
||||
+ </status>
|
||||
+</cib>
|
||||
+* Passed: crm_ticket - Query ticket standby state
|
||||
+<cib epoch="18" num_updates="5" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
+ <configuration>
|
||||
+ <crm_config>
|
||||
+ <cluster_property_set id="cib-bootstrap-options"/>
|
||||
+ <cluster_property_set id="duplicate">
|
||||
+ <nvpair id="duplicate-cluster-delay" name="cluster-delay" value="30s"/>
|
||||
+ </cluster_property_set>
|
||||
+ </crm_config>
|
||||
+ <nodes>
|
||||
+ <node id="clusterNode-UUID" uname="clusterNode-UNAME" type="member">
|
||||
+ <instance_attributes id="nodes-clusterNode-UUID">
|
||||
+ <nvpair id="nodes-clusterNode-UUID-ram" name="ram" value="1024M"/>
|
||||
+ </instance_attributes>
|
||||
+ </node>
|
||||
+ </nodes>
|
||||
+ <resources>
|
||||
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy">
|
||||
+ <meta_attributes id="dummy-meta_attributes"/>
|
||||
+ <instance_attributes id="dummy-instance_attributes">
|
||||
+ <nvpair id="dummy-instance_attributes-delay" name="delay" value="10s"/>
|
||||
+ </instance_attributes>
|
||||
+ </primitive>
|
||||
+ </resources>
|
||||
+ <constraints/>
|
||||
+ </configuration>
|
||||
+ <status>
|
||||
+ <node_state id="clusterNode-UUID" uname="clusterNode-UNAME">
|
||||
+ <transient_attributes id="clusterNode-UUID">
|
||||
+ <instance_attributes id="status-clusterNode-UUID">
|
||||
+ <nvpair id="status-clusterNode-UUID-fail-count-dummy" name="fail-count-dummy" value="10"/>
|
||||
+ </instance_attributes>
|
||||
+ </transient_attributes>
|
||||
+ </node_state>
|
||||
+ <tickets>
|
||||
+ <ticket_state id="ticketA" standby="false"/>
|
||||
+ </tickets>
|
||||
+ </status>
|
||||
+</cib>
|
||||
+* Passed: crm_ticket - Activate a ticket
|
||||
+Deleted ticketA state attribute: name=standby
|
||||
+<cib epoch="18" num_updates="6" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
+ <configuration>
|
||||
+ <crm_config>
|
||||
+ <cluster_property_set id="cib-bootstrap-options"/>
|
||||
+ <cluster_property_set id="duplicate">
|
||||
+ <nvpair id="duplicate-cluster-delay" name="cluster-delay" value="30s"/>
|
||||
+ </cluster_property_set>
|
||||
+ </crm_config>
|
||||
+ <nodes>
|
||||
+ <node id="clusterNode-UUID" uname="clusterNode-UNAME" type="member">
|
||||
+ <instance_attributes id="nodes-clusterNode-UUID">
|
||||
+ <nvpair id="nodes-clusterNode-UUID-ram" name="ram" value="1024M"/>
|
||||
+ </instance_attributes>
|
||||
+ </node>
|
||||
+ </nodes>
|
||||
+ <resources>
|
||||
+ <primitive id="dummy" class="ocf" provider="pacemaker" type="Dummy">
|
||||
+ <meta_attributes id="dummy-meta_attributes"/>
|
||||
+ <instance_attributes id="dummy-instance_attributes">
|
||||
+ <nvpair id="dummy-instance_attributes-delay" name="delay" value="10s"/>
|
||||
+ </instance_attributes>
|
||||
+ </primitive>
|
||||
+ </resources>
|
||||
+ <constraints/>
|
||||
+ </configuration>
|
||||
+ <status>
|
||||
+ <node_state id="clusterNode-UUID" uname="clusterNode-UNAME">
|
||||
+ <transient_attributes id="clusterNode-UUID">
|
||||
+ <instance_attributes id="status-clusterNode-UUID">
|
||||
+ <nvpair id="status-clusterNode-UUID-fail-count-dummy" name="fail-count-dummy" value="10"/>
|
||||
+ </instance_attributes>
|
||||
+ </transient_attributes>
|
||||
+ </node_state>
|
||||
+ <tickets>
|
||||
+ <ticket_state id="ticketA"/>
|
||||
+ </tickets>
|
||||
+ </status>
|
||||
+</cib>
|
||||
+* 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
|
@ -1,91 +0,0 @@
|
||||
commit 729f23fc8b3ba8f11608c5b9f6b44efe89f25db7
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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
|
||||
</status>
|
||||
</cib>
|
||||
* Passed: crm_resource - Un-migrate a resource
|
||||
-scope=tickets name=granted-ticket-ticketA value=false
|
||||
+false
|
||||
<cib epoch="18" num_updates="1" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
<crm_config>
|
||||
@@ -877,14 +877,12 @@ scope=tickets name=granted-ticket-ticketA value=false
|
||||
</transient_attributes>
|
||||
</node_state>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
* Passed: crm_ticket - Set granted-ticket value
|
||||
-scope=tickets name=granted-ticket-ticketA value=false
|
||||
+false
|
||||
<cib epoch="18" num_updates="2" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
<crm_config>
|
||||
@@ -919,13 +917,12 @@ scope=tickets name=granted-ticket-ticketA value=false
|
||||
</transient_attributes>
|
||||
</node_state>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
* Passed: crm_ticket - Query granted-ticket value
|
||||
+Deleted ticketA state attribute: name=granted
|
||||
<cib epoch="18" num_updates="3" admin_epoch="0" validate-with="pacemaker-1.2" >
|
||||
<configuration>
|
||||
<crm_config>
|
||||
@@ -960,7 +957,7 @@ scope=tickets name=granted-ticket-ticketA value=false
|
||||
</transient_attributes>
|
||||
</node_state>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets"/>
|
||||
+ <ticket_state id="ticketA"/>
|
||||
</tickets>
|
||||
</status>
|
||||
</cib>
|
||||
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
|
@ -1,47 +0,0 @@
|
||||
commit cb823bb47fabc77ececaad3f2ba3de686e908a89
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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",
|
||||
|
19
pacemaker-daemon-symlinks.diff
Normal file
19
pacemaker-daemon-symlinks.diff
Normal file
@ -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:
|
@ -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) {
|
@ -1,38 +0,0 @@
|
||||
commit 581af7d3061a3ff680e0a15351099df255cf6b03
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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) {
|
@ -1,55 +0,0 @@
|
||||
commit dc88c1f8402e1c978bb4d7816f79a902cf476a08
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 @@
|
||||
<ref name="element-location"/>
|
||||
<ref name="element-colocation"/>
|
||||
<ref name="element-order"/>
|
||||
+ <ref name="element-rsc_ticket"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
</define>
|
||||
@@ -143,6 +144,36 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
+ <define name="element-rsc_ticket">
|
||||
+ <element name="rsc_ticket">
|
||||
+ <attribute name="id"><data type="ID"/></attribute>
|
||||
+ <choice>
|
||||
+ <oneOrMore>
|
||||
+ <ref name="element-resource-set"/>
|
||||
+ </oneOrMore>
|
||||
+ <group>
|
||||
+ <attribute name="rsc"><data type="IDREF"/></attribute>
|
||||
+ <optional>
|
||||
+ <attribute name="rsc-role">
|
||||
+ <ref name="attribute-roles"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
+ </group>
|
||||
+ </choice>
|
||||
+ <attribute name="ticket"><text/></attribute>
|
||||
+ <optional>
|
||||
+ <attribute name="loss-policy">
|
||||
+ <choice>
|
||||
+ <value>stop</value>
|
||||
+ <value>demote</value>
|
||||
+ <value>fence</value>
|
||||
+ <value>freeze</value>
|
||||
+ </choice>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
+ </element>
|
||||
+ </define>
|
||||
+
|
||||
<define name="attribute-actions">
|
||||
<choice>
|
||||
<value>start</value>
|
@ -1,24 +0,0 @@
|
||||
commit a8ba707d19757e9aea4496e7bddf4ddc428ca582
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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[] =
|
||||
" <shortdesc lang=\"en\">%s</shortdesc>\n"
|
||||
"%s\n"
|
||||
" <actions>\n"
|
||||
- " <action name=\"start\" timeout=\"60\" />\n"
|
||||
+ " <action name=\"start\" timeout=\"20\" />\n"
|
||||
" <action name=\"stop\" timeout=\"15\" />\n"
|
||||
- " <action name=\"status\" timeout=\"60\" />\n"
|
||||
- " <action name=\"monitor\" timeout=\"60\" interval=\"3600\" start-delay=\"15\" />\n"
|
||||
+ " <action name=\"status\" timeout=\"20\" />\n"
|
||||
+ " <action name=\"monitor\" timeout=\"20\" interval=\"3600\" start-delay=\"15\" />\n"
|
||||
" <action name=\"meta-data\" timeout=\"15\" />\n"
|
||||
" </actions>\n"
|
||||
" <special tag=\"heartbeat\">\n"
|
@ -1,63 +0,0 @@
|
||||
commit 288cbadc532f1256129d1fcef5716ac1eb7d4bde
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 @@
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<ref name="element-primitive"/>
|
||||
+ <ref name="element-template"/>
|
||||
<ref name="element-group"/>
|
||||
<ref name="element-clone"/>
|
||||
<ref name="element-master"/>
|
||||
@@ -22,6 +23,44 @@
|
||||
<attribute name="id"><data type="ID"/></attribute>
|
||||
<choice>
|
||||
<group>
|
||||
+ <choice>
|
||||
+ <group>
|
||||
+ <attribute name="class"><value>ocf</value></attribute>
|
||||
+ <attribute name="provider"><text/></attribute>
|
||||
+ </group>
|
||||
+ <attribute name="class">
|
||||
+ <choice>
|
||||
+ <value>lsb</value>
|
||||
+ <value>heartbeat</value>
|
||||
+ <value>stonith</value>
|
||||
+ <value>upstart</value>
|
||||
+ </choice>
|
||||
+ </attribute>
|
||||
+ </choice>
|
||||
+ <attribute name="type"><text/></attribute>
|
||||
+ </group>
|
||||
+ <attribute name="template"><data type="IDREF"/></attribute>
|
||||
+ </choice>
|
||||
+ <optional>
|
||||
+ <attribute name="description"><text/></attribute>
|
||||
+ </optional>
|
||||
+ <ref name="element-resource-extra"/>
|
||||
+ <ref name="element-operations"/>
|
||||
+ <zeroOrMore>
|
||||
+ <element name="utilization">
|
||||
+ <externalRef href="nvset.rng"/>
|
||||
+ </element>
|
||||
+ </zeroOrMore>
|
||||
+ </interleave>
|
||||
+ </element>
|
||||
+ </define>
|
||||
+
|
||||
+ <define name="element-template">
|
||||
+ <element name="template">
|
||||
+ <interleave>
|
||||
+ <attribute name="id"><data type="ID"/></attribute>
|
||||
+ <choice>
|
||||
+ <group>
|
||||
<attribute name="class"><value>ocf</value></attribute>
|
||||
<attribute name="provider"><text/></attribute>
|
||||
</group>
|
@ -1,19 +0,0 @@
|
||||
commit 150647923483ae92bac8be05c068134583552b0d
|
||||
Author: Yuusuke Iida <iidayuus@intellilink.co.jp>
|
||||
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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,96 +0,0 @@
|
||||
commit de850c422b50d82d09ce820d98d057fae3ea18c9
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
@ -1,565 +0,0 @@
|
||||
commit 95b5ca54286889209f9a8d609412594047e34c26
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="true"/>
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketB" name="granted-ticket-ticketB" value="true"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="true"/>
|
||||
+ <ticket_state id="ticketB" granted="true"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
||||
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 @@
|
||||
</configuration>
|
||||
<status>
|
||||
<tickets>
|
||||
- <instance_attributes id="status-tickets">
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketA" name="granted-ticket-ticketA" value="false"/>
|
||||
- <nvpair id="status-tickets-granted-ticket-ticketB" name="granted-ticket-ticketB" value="false"/>
|
||||
- </instance_attributes>
|
||||
+ <ticket_state id="ticketA" granted="false"/>
|
||||
+ <ticket_state id="ticketB" granted="false"/>
|
||||
</tickets>
|
||||
<node_state id="node1" uname="node1" ha="active" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
|
||||
<lrm id="node1">
|
@ -1,364 +0,0 @@
|
||||
commit f3dea7908cfcc61e83b765b8bda68f6ce1ba31d3
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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 <crm/common/xml.h>
|
||||
|
||||
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);
|
@ -1,97 +0,0 @@
|
||||
commit 575e1964464f6df7de7b2fbb688469554cdec44f
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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) {
|
@ -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
|
||||
|
||||
|
@ -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 <abeekhof@suse.de>
|
||||
Andrew Beekhof <andrew@beekhof.net>
|
||||
|
||||
%package -n libpacemaker3
|
||||
Summary: The Pacemaker scalable High-Availability cluster resource manager
|
||||
@ -173,7 +152,7 @@ resource health.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Andrew Beekhof <abeekhof@suse.de>
|
||||
Andrew Beekhof <andrew@beekhof.net>
|
||||
|
||||
%package -n libpacemaker-devel
|
||||
Summary: The Pacemaker scalable High-Availability cluster resource manager
|
||||
@ -204,7 +183,7 @@ resource health.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Andrew Beekhof <abeekhof@suse.de>
|
||||
Andrew Beekhof <andrew@beekhof.net>
|
||||
|
||||
%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
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b6f240cd8995b416aa0bab067137a44025ced19d318f5d489505d4e6c097e8a5
|
||||
size 7754006
|
||||
oid sha256:38cef3a375dc4d083e66eb2bb5f92b1cdfddfac5e7b69dbfe45ff19d078e6438
|
||||
size 7888481
|
||||
|
@ -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...; \
|
Loading…
Reference in New Issue
Block a user