Accepting request 104856 from network:ha-clustering:Factory
Fixes for ABI compatibility, timeouts and a segfault. OBS-URL: https://build.opensuse.org/request/show/104856 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pacemaker?expand=0&rev=45
This commit is contained in:
commit
fd43827654
@ -1,12 +1,44 @@
|
||||
commit 543b4337b42f64fa46e2c01b7eb466dc4bd7665b
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
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..b2660ca 100644
|
||||
index 8269d30..103389f 100644
|
||||
--- a/fencing/commands.c
|
||||
+++ b/fencing/commands.c
|
||||
@@ -368,6 +368,7 @@ static stonith_device_t *build_device_from_xml(xmlNode *msg)
|
||||
@@ -368,6 +368,8 @@ static stonith_device_t *build_device_from_xml(xmlNode *msg)
|
||||
device->agent = crm_element_value_copy(dev, "agent");
|
||||
device->namespace = crm_element_value_copy(dev, "namespace");
|
||||
device->params = xml2list(dev);
|
||||
+ g_hash_table_insert(device->params, crm_strdup("CRM_" F_STONITH_DEVICE), crm_strdup(device->id));
|
||||
+
|
||||
+ g_hash_table_insert(device->params, crm_strdup(CRM_META "_" F_STONITH_DEVICE), crm_strdup(device->id));
|
||||
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,
|
||||
|
||||
} else {
|
||||
/* child */
|
||||
+ const char *st_dev_id_key = CRM_META "_" F_STONITH_DEVICE;
|
||||
+ 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,
|
||||
close(p_read_fd);
|
||||
close(p_write_fd);
|
||||
|
||||
+ st_dev_id_value = g_hash_table_lookup(device_args, st_dev_id_key);
|
||||
+ if (st_dev_id_value) {
|
||||
+ setenv(st_dev_id_key, st_dev_id_value, 1);
|
||||
+ }
|
||||
+
|
||||
execlp(agent, agent, NULL);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
48
pacemaker-abi-compliance.diff
Normal file
48
pacemaker-abi-compliance.diff
Normal file
@ -0,0 +1,48 @@
|
||||
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;
|
18
pacemaker-cib-new-segfault.diff
Normal file
18
pacemaker-cib-new-segfault.diff
Normal file
@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
38
pacemaker-ptest-xml-text.diff
Normal file
38
pacemaker-ptest-xml-text.diff
Normal file
@ -0,0 +1,38 @@
|
||||
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) {
|
24
pacemaker-stonith-timeout.diff
Normal file
24
pacemaker-stonith-timeout.diff
Normal file
@ -0,0 +1,24 @@
|
||||
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,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 05:33:09 UTC 2012 - ygao@suse.com
|
||||
|
||||
- Core: Move several new fields since v1.1.6 to the end of the data
|
||||
types for ABI compliance
|
||||
- stonith: Default to 20s timeout for start and monitor operations of
|
||||
stonith resources which is same as "default-action-timeout" (bnc#733337)
|
||||
- Tools: ptest - Fix "-X, --xml-text" option to handle a XML string as its
|
||||
argument (bnc#736212)
|
||||
- cib: Fix segfault caused by destroying an already freed hash table (cl#5023)
|
||||
- stonith: Expose IDs of stonith resources to stonith agents through
|
||||
"$CRM_meta_st_device_id" environment variable (bnc#728579)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 08:26:22 UTC 2012 - tserong@suse.com
|
||||
|
||||
|
@ -50,7 +50,11 @@ 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: fix-glib_h-include.patch
|
||||
Patch7: pacemaker-abi-compliance.diff
|
||||
Patch8: pacemaker-stonith-timeout.diff
|
||||
Patch9: pacemaker-ptest-xml-text.diff
|
||||
Patch10: pacemaker-cib-new-segfault.diff
|
||||
Patch20: fix-glib_h-include.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Conflicts: heartbeat < 3.0
|
||||
# We need libglue2, not libheartbeat2
|
||||
@ -186,6 +190,10 @@ Authors:
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch20 -p1
|
||||
###########################################################
|
||||
|
||||
%build
|
||||
|
Loading…
x
Reference in New Issue
Block a user