pacemaker/bug-728579_pacemaker-stonith-dev-id.diff

45 lines
1.7 KiB
Diff
Raw Normal View History

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
- 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
2012-06-23 07:04:51 +02:00
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);
+
+ 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 */
- 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
2012-06-23 07:04:51 +02:00
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 */
+ const char *st_dev_id_key = CRM_META "_" F_STONITH_DEVICE;
+ const char *st_dev_id_value = NULL;
close(1);
- 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
2012-06-23 07:04:51 +02:00
/* coverity[leaked_handle] False positive */
@@ -577,6 +579,11 @@ run_stonith_agent(const char *agent, con
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);
}