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

101 lines
3.8 KiB
Diff
Raw Normal View History

commit 1e01228825eb8d4449edfbb1a1fa0c38fab4d5e6
Author: Gao,Yan <ygao@suse.com>
Date: Thu Sep 6 15:14:58 2012 +0800
Medium: stonith: Expose IDs of stonith resources to stonith agents through "$CRM_meta_st_device_id" environment variable
Index: pacemaker-2.1.7+20240208.bc5596299/daemons/fenced/fenced_commands.c
===================================================================
--- pacemaker-2.1.7+20240208.bc5596299.orig/daemons/fenced/fenced_commands.c
+++ pacemaker-2.1.7+20240208.bc5596299/daemons/fenced/fenced_commands.c
@@ -1151,6 +1151,7 @@ build_device_from_xml(xmlNode *dev)
Accepting request 1042324 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.5+20221208.a3f44794f (Pacemaker-2.1.5): - libs: Check for NULL in various functions. - daemons: Check for NULL in attrd_create_attribute. - Update to version 2.1.4+20221122.631339ca5 (Pacemaker-2.1.5-rc3): - libcrmcommon: Wait for ACKs from the attrd clear failure command. - daemons: Fix expanding ++ and += in multi-update IPC messages. - daemons: Add host attr to the children of multi-update IPC messages. - daemons: Copy all attrs from parent to child in multi-update IPC. - Update to version 2.1.4+20221115.d3699a621 (Pacemaker-2.1.5-rc2): - tools: quote timestamp in operation history output (bsc#1205279, bsc#1204581) - tools: Fix setting utilization attrs with crm_attribute. - cts-cli: add test for text output of crm_resource --list-operations/-O (bsc#1205279, bsc#1204581) - daemons: Set an attribute on the child of a multi-attr message. - scheduler: consider roles when blocking colocation dependents - scheduler: when blocking starts, block children's starts as well - Update to version 2.1.4+20221108.ba419204a: - tools: crm_resource --constraints now accepts --force - tools: crm_resource --constraints --recursive - tools: fix syntax on resetting options in crm_resource (bsc#1198409) - Update to version 2.1.4+20221031.0b3656e85: - scheduler: prioritize group colocations properly - scheduler: ignore empty groups in pcmk__add_colocated_node_scores() - scheduler: properly consider effect of "with group" colocations - scheduler: ensure group methods handle empty groups - scheduler: improve error handling when unpacking resources OBS-URL: https://build.opensuse.org/request/show/1042324 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=369
2022-12-12 12:12:25 +01:00
(const char *) device->on_target_actions->str);
}
+ g_hash_table_insert(device->params, strdup(CRM_META "_" PCMK__XE_ST_DEVICE_ID), strdup(device->id));
device->work = mainloop_add_trigger(G_PRIORITY_HIGH, stonith_device_dispatch, device);
/* TODO: Hook up priority */
Index: pacemaker-2.1.7+20240208.bc5596299/lib/fencing/st_actions.c
===================================================================
--- pacemaker-2.1.7+20240208.bc5596299.orig/lib/fencing/st_actions.c
+++ pacemaker-2.1.7+20240208.bc5596299/lib/fencing/st_actions.c
Accepting request 952937 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.2+20220126.16c1bab10: - controller: correctly match "node down" events - controller: improve meta-data warnings - scheduler: assert on memory allocation error - pacemakerd: improve messages for subdaemon handling - Update to version 2.1.2+20220126.57e783b4b: - libstonithd: avoid controld shutdown hanging - pacemakerd: have signal-handler take care of lost processes - scheduler: avoid memory leak when displaying clones - Rebase: * bug-806256_pacemaker-log-level-notice.patch - Update to version 2.1.2+20220120.3f0398825: - scheduler: implement utilization for bundles - fencer: reset op result before grabbing new one (rh#1470834) - schemas: update fence-event API schema for recent change (rh#1470834) - fencing: display exit reasons with failed fencing events (rh#1470834) - fencing: return exit reason with fencing history (rh#1470834) - fencer: track full result in fencing history (rh#1470834) - Update to version 2.1.2+20220119.2c937a4c0: - ipc_client: use libqb async API for connect - pacemakerd: keep tracking pacemakerd for liveness - pacemakerd: tweak systemd unit respawn settings - Update to version 2.1.2+20220119.eec504705: - libcrmservice: improve exit reason for timeouts (rh#1470834) - fencing: improve exit reason for fencing timeouts (rh#1470834) - controller: improve exit reason for internal timeouts (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/952937 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=356
2022-02-09 13:32:34 +01:00
@@ -31,6 +31,7 @@ struct stonith_action_s {
Accepting request 1042324 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.5+20221208.a3f44794f (Pacemaker-2.1.5): - libs: Check for NULL in various functions. - daemons: Check for NULL in attrd_create_attribute. - Update to version 2.1.4+20221122.631339ca5 (Pacemaker-2.1.5-rc3): - libcrmcommon: Wait for ACKs from the attrd clear failure command. - daemons: Fix expanding ++ and += in multi-update IPC messages. - daemons: Add host attr to the children of multi-update IPC messages. - daemons: Copy all attrs from parent to child in multi-update IPC. - Update to version 2.1.4+20221115.d3699a621 (Pacemaker-2.1.5-rc2): - tools: quote timestamp in operation history output (bsc#1205279, bsc#1204581) - tools: Fix setting utilization attrs with crm_attribute. - cts-cli: add test for text output of crm_resource --list-operations/-O (bsc#1205279, bsc#1204581) - daemons: Set an attribute on the child of a multi-attr message. - scheduler: consider roles when blocking colocation dependents - scheduler: when blocking starts, block children's starts as well - Update to version 2.1.4+20221108.ba419204a: - tools: crm_resource --constraints now accepts --force - tools: crm_resource --constraints --recursive - tools: fix syntax on resetting options in crm_resource (bsc#1198409) - Update to version 2.1.4+20221031.0b3656e85: - scheduler: prioritize group colocations properly - scheduler: ignore empty groups in pcmk__add_colocated_node_scores() - scheduler: properly consider effect of "with group" colocations - scheduler: ensure group methods handle empty groups - scheduler: improve error handling when unpacking resources OBS-URL: https://build.opensuse.org/request/show/1042324 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=369
2022-12-12 12:12:25 +01:00
char *agent;
char *action;
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
GHashTable *args;
+ char *dev_id;
int timeout;
Accepting request 1042324 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.5+20221208.a3f44794f (Pacemaker-2.1.5): - libs: Check for NULL in various functions. - daemons: Check for NULL in attrd_create_attribute. - Update to version 2.1.4+20221122.631339ca5 (Pacemaker-2.1.5-rc3): - libcrmcommon: Wait for ACKs from the attrd clear failure command. - daemons: Fix expanding ++ and += in multi-update IPC messages. - daemons: Add host attr to the children of multi-update IPC messages. - daemons: Copy all attrs from parent to child in multi-update IPC. - Update to version 2.1.4+20221115.d3699a621 (Pacemaker-2.1.5-rc2): - tools: quote timestamp in operation history output (bsc#1205279, bsc#1204581) - tools: Fix setting utilization attrs with crm_attribute. - cts-cli: add test for text output of crm_resource --list-operations/-O (bsc#1205279, bsc#1204581) - daemons: Set an attribute on the child of a multi-attr message. - scheduler: consider roles when blocking colocation dependents - scheduler: when blocking starts, block children's starts as well - Update to version 2.1.4+20221108.ba419204a: - tools: crm_resource --constraints now accepts --force - tools: crm_resource --constraints --recursive - tools: fix syntax on resetting options in crm_resource (bsc#1198409) - Update to version 2.1.4+20221031.0b3656e85: - scheduler: prioritize group colocations properly - scheduler: ignore empty groups in pcmk__add_colocated_node_scores() - scheduler: properly consider effect of "with group" colocations - scheduler: ensure group methods handle empty groups - scheduler: improve error handling when unpacking resources OBS-URL: https://build.opensuse.org/request/show/1042324 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=369
2022-12-12 12:12:25 +01:00
bool async;
void *userdata;
@@ -224,6 +225,7 @@ stonith__destroy_action(stonith_action_t
Accepting request 952937 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.2+20220126.16c1bab10: - controller: correctly match "node down" events - controller: improve meta-data warnings - scheduler: assert on memory allocation error - pacemakerd: improve messages for subdaemon handling - Update to version 2.1.2+20220126.57e783b4b: - libstonithd: avoid controld shutdown hanging - pacemakerd: have signal-handler take care of lost processes - scheduler: avoid memory leak when displaying clones - Rebase: * bug-806256_pacemaker-log-level-notice.patch - Update to version 2.1.2+20220120.3f0398825: - scheduler: implement utilization for bundles - fencer: reset op result before grabbing new one (rh#1470834) - schemas: update fence-event API schema for recent change (rh#1470834) - fencing: display exit reasons with failed fencing events (rh#1470834) - fencing: return exit reason with fencing history (rh#1470834) - fencer: track full result in fencing history (rh#1470834) - Update to version 2.1.2+20220119.2c937a4c0: - ipc_client: use libqb async API for connect - pacemakerd: keep tracking pacemakerd for liveness - pacemakerd: tweak systemd unit respawn settings - Update to version 2.1.2+20220119.eec504705: - libcrmservice: improve exit reason for timeouts (rh#1470834) - fencing: improve exit reason for fencing timeouts (rh#1470834) - controller: improve exit reason for internal timeouts (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/952937 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=356
2022-02-09 13:32:34 +01:00
services_action_free(action->svc_action);
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
}
Accepting request 952937 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.2+20220126.16c1bab10: - controller: correctly match "node down" events - controller: improve meta-data warnings - scheduler: assert on memory allocation error - pacemakerd: improve messages for subdaemon handling - Update to version 2.1.2+20220126.57e783b4b: - libstonithd: avoid controld shutdown hanging - pacemakerd: have signal-handler take care of lost processes - scheduler: avoid memory leak when displaying clones - Rebase: * bug-806256_pacemaker-log-level-notice.patch - Update to version 2.1.2+20220120.3f0398825: - scheduler: implement utilization for bundles - fencer: reset op result before grabbing new one (rh#1470834) - schemas: update fence-event API schema for recent change (rh#1470834) - fencing: display exit reasons with failed fencing events (rh#1470834) - fencing: return exit reason with fencing history (rh#1470834) - fencer: track full result in fencing history (rh#1470834) - Update to version 2.1.2+20220119.2c937a4c0: - ipc_client: use libqb async API for connect - pacemakerd: keep tracking pacemakerd for liveness - pacemakerd: tweak systemd unit respawn settings - Update to version 2.1.2+20220119.eec504705: - libcrmservice: improve exit reason for timeouts (rh#1470834) - fencing: improve exit reason for fencing timeouts (rh#1470834) - controller: improve exit reason for internal timeouts (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/952937 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=356
2022-02-09 13:32:34 +01:00
pcmk__reset_result(&(action->result));
Accepting request 625813 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.0+20180726.3d81c89b8: - Shutdown corosync after a fatal error - tools: ipmiservicelogd FTBFS on ppc64le - tools: notifyServicelogEvent FTBFS on ppc64le - tools: detect CIB directory correctly - tools: avoid memory leak when crm_resource checks resource - controller: avoid any chance of use-of-NULL when doing LRM op - resources: controld doesn't need to check for corosync 1 plugin - resources: use correct variable name in Stateful - cts-scheduler: restore ability to pass arguments to single test run - resources: use ocf_is_true in SysInfo - spec: drop superfluous dependency of -libs-devel on -cts - tools: update URL in crm_simulate help - crm_mon: rhbz#1461964 - add fence history features - Update to version 2.0.0+20180706.8cf3fe749 (Pacemaker-2.0.0): - tools: Multiple -V increase debug level (#1526) - scheduler: clarify multiple-anonymous-instances message - scheduler: avoid use-after-free when on-fail=block - controller: add node name to meta-data call environment - controller: filter certain synthesized failures from CIB - controller: filter certain action timeouts from CIB - controller: don't record pending notifies in CIB - executor: cancel recurring monitors if fence device registration is lost - controller: avoid memory leak if start-up fails - XML: schemas.c: fix possible memleak + less magic with numeric constants - tools: stonith_admin -h/-H options are queries - libstonithd: avoid memory leak when getting meta-data - XML: resources-3.1.rng: relaxed schema after tight upgrade enforcement - XML: schemas.c: take severities of XSLT messages into account properly OBS-URL: https://build.opensuse.org/request/show/625813 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=307
2018-07-27 17:42:24 +02:00
+ free(action->dev_id);
free(action);
}
}
@@ -284,6 +286,8 @@ stonith__action_create(const char *agent
if (device_args) {
char buffer[512];
const char *value = NULL;
+ const char *st_dev_id_key = CRM_META "_" PCMK__XE_ST_DEVICE_ID;
+ const char *st_dev_id_value = NULL;
Accepting request 1042324 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.5+20221208.a3f44794f (Pacemaker-2.1.5): - libs: Check for NULL in various functions. - daemons: Check for NULL in attrd_create_attribute. - Update to version 2.1.4+20221122.631339ca5 (Pacemaker-2.1.5-rc3): - libcrmcommon: Wait for ACKs from the attrd clear failure command. - daemons: Fix expanding ++ and += in multi-update IPC messages. - daemons: Add host attr to the children of multi-update IPC messages. - daemons: Copy all attrs from parent to child in multi-update IPC. - Update to version 2.1.4+20221115.d3699a621 (Pacemaker-2.1.5-rc2): - tools: quote timestamp in operation history output (bsc#1205279, bsc#1204581) - tools: Fix setting utilization attrs with crm_attribute. - cts-cli: add test for text output of crm_resource --list-operations/-O (bsc#1205279, bsc#1204581) - daemons: Set an attribute on the child of a multi-attr message. - scheduler: consider roles when blocking colocation dependents - scheduler: when blocking starts, block children's starts as well - Update to version 2.1.4+20221108.ba419204a: - tools: crm_resource --constraints now accepts --force - tools: crm_resource --constraints --recursive - tools: fix syntax on resetting options in crm_resource (bsc#1198409) - Update to version 2.1.4+20221031.0b3656e85: - scheduler: prioritize group colocations properly - scheduler: ignore empty groups in pcmk__add_colocated_node_scores() - scheduler: properly consider effect of "with group" colocations - scheduler: ensure group methods handle empty groups - scheduler: improve error handling when unpacking resources OBS-URL: https://build.opensuse.org/request/show/1042324 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=369
2022-12-12 12:12:25 +01:00
snprintf(buffer, sizeof(buffer), "pcmk_%s_retries", action_name);
value = g_hash_table_lookup(device_args, buffer);
@@ -291,6 +295,11 @@ stonith__action_create(const char *agent
if (value) {
action->max_retries = atoi(value);
}
+
+ st_dev_id_value = g_hash_table_lookup(device_args, st_dev_id_key);
+ if (st_dev_id_value) {
+ action->dev_id = strdup(st_dev_id_value);
+ }
}
return action;
@@ -628,6 +637,10 @@ internal_stonith_action_execute(stonith_
Accepting request 853533 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.0.5+20201202.ba59be712 (Pacemaker-2.0.5): - xml: Revert to correct schema for alerts-3.5 - tools: match calloc() with free() in crm_resource - tools: "Connectivity is lost" may not be displayed even if the ping communication is lost. - Update to version 2.0.4+20201116.ae2c04b54: - tools: make cibsecret use bash - fencer: allow peer configuration requests - Update to version 2.0.4+20201027.31aa4f551: - pacemakerd: handle shutdown requests better - daemons,libcrmcommon: send status code with client acks - fencer: restrict certain IPC requests to privileged users (CVE-2020-25654, bsc#1177916) - pacemakerd: ignore shutdown requests from unprivileged users (CVE-2020-25654, bsc#1177916) - pacemakerd: check client for NULL before using it - executor: restrict certain IPC requests to Pacemaker daemons (CVE-2020-25654, bsc#1177916) - executor: return appropriate error code when no remote support - executor: mark controller connections to pacemaker-remoted as privileged - executor: show CRM_OP_REGISTER rc in debug message - Update to version 2.0.4+20201022.354625c62: - tools: revert some changes in crm_resource NULL checks - xml: Mark new crm_mon attributes as optional. - scheduler: fix build when DEFAULT_CONCURRENT_FENCING_TRUE is set - Update to version 2.0.4+20201019.878658661: - cib: create reply when needed for diff - cib: only build reply when needed - Update to version 2.0.4+20201014.b0ef36d82: OBS-URL: https://build.opensuse.org/request/show/853533 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=343
2020-12-07 10:07:23 +01:00
SVC_ACTION_NON_BLOCKED,
"SVC_ACTION_NON_BLOCKED");
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
+ if (action->dev_id) {
+ svc_action->rsc = strdup(action->dev_id);
+ }
+
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
/* keep retries from executing out of control and free previous results */
if (is_retry) {
Accepting request 952937 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.1.2+20220126.16c1bab10: - controller: correctly match "node down" events - controller: improve meta-data warnings - scheduler: assert on memory allocation error - pacemakerd: improve messages for subdaemon handling - Update to version 2.1.2+20220126.57e783b4b: - libstonithd: avoid controld shutdown hanging - pacemakerd: have signal-handler take care of lost processes - scheduler: avoid memory leak when displaying clones - Rebase: * bug-806256_pacemaker-log-level-notice.patch - Update to version 2.1.2+20220120.3f0398825: - scheduler: implement utilization for bundles - fencer: reset op result before grabbing new one (rh#1470834) - schemas: update fence-event API schema for recent change (rh#1470834) - fencing: display exit reasons with failed fencing events (rh#1470834) - fencing: return exit reason with fencing history (rh#1470834) - fencer: track full result in fencing history (rh#1470834) - Update to version 2.1.2+20220119.2c937a4c0: - ipc_client: use libqb async API for connect - pacemakerd: keep tracking pacemakerd for liveness - pacemakerd: tweak systemd unit respawn settings - Update to version 2.1.2+20220119.eec504705: - libcrmservice: improve exit reason for timeouts (rh#1470834) - fencing: improve exit reason for fencing timeouts (rh#1470834) - controller: improve exit reason for internal timeouts (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/952937 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=356
2022-02-09 13:32:34 +01:00
pcmk__reset_result(&(action->result));
Index: pacemaker-2.1.7+20240208.bc5596299/lib/services/services_linux.c
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
===================================================================
--- pacemaker-2.1.7+20240208.bc5596299.orig/lib/services/services_linux.c
+++ pacemaker-2.1.7+20240208.bc5596299/lib/services/services_linux.c
Accepting request 942220 from home:yan_gao:branches:network:ha-clustering:Factory - fencer: get current time correctly * 0001-Fix-fencer-get-current-time-correctly.patch - Update to version 2.1.2+20211124.ada5c3b36 (Pacemaker-2.1.2): - fencer: add missing space to topology message - controller: handle remote connection start timeouts correctly - Update to version 2.1.1+20211116.8db4569e4 (Pacemaker-2.1.2-rc2): - fencing: mark state as done if remapped "on" times out - Fix OCF_RA_INSTALL_DIR Autoconf variable name in pkg-config files - daemons: Free memory at the end of fail_pending_op. - Update to version 2.1.1+20211104.62c36e2b1 (Pacemaker-2.1.2-rc1): - Use user_include_exclude_cb in crm_mon more. (clbz#5485) - Only set default sections in crm_mon once. (clbz#5485) - fencer: improve messages for dynamic target queries (rh#1470834) - fencer: consolidate messages for asynchronous results (rh#1470834) - fencer: log a message when out of memory for dynamic target search (rh#1470834) - libcrmservice: distinguish local and global configuration errors (rh#1470834) - libcrmservice: improve messages for pre-execution failures in child (rh#1470834) - Update to version 2.1.1+20211028.70f82d2c0: - attrd: check election status upon loss of a voter to prevent unexpected pending (bsc#1191676) - Update to version 2.1.1+20211028.7ee8b5bdd: - tools: select technical or human-friendly output of failed actions (rh#1470834) - controller,executor: tweak action result messages (rh#1470834) - install init scripts only if not using systemd - executor: log execution status and exit reason with results (rh#1470834) - executor: improve result message (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/942220 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=354
2021-12-23 11:19:25 +01:00
@@ -29,6 +29,9 @@
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
#include "crm/services.h"
Accepting request 942220 from home:yan_gao:branches:network:ha-clustering:Factory - fencer: get current time correctly * 0001-Fix-fencer-get-current-time-correctly.patch - Update to version 2.1.2+20211124.ada5c3b36 (Pacemaker-2.1.2): - fencer: add missing space to topology message - controller: handle remote connection start timeouts correctly - Update to version 2.1.1+20211116.8db4569e4 (Pacemaker-2.1.2-rc2): - fencing: mark state as done if remapped "on" times out - Fix OCF_RA_INSTALL_DIR Autoconf variable name in pkg-config files - daemons: Free memory at the end of fail_pending_op. - Update to version 2.1.1+20211104.62c36e2b1 (Pacemaker-2.1.2-rc1): - Use user_include_exclude_cb in crm_mon more. (clbz#5485) - Only set default sections in crm_mon once. (clbz#5485) - fencer: improve messages for dynamic target queries (rh#1470834) - fencer: consolidate messages for asynchronous results (rh#1470834) - fencer: log a message when out of memory for dynamic target search (rh#1470834) - libcrmservice: distinguish local and global configuration errors (rh#1470834) - libcrmservice: improve messages for pre-execution failures in child (rh#1470834) - Update to version 2.1.1+20211028.70f82d2c0: - attrd: check election status upon loss of a voter to prevent unexpected pending (bsc#1191676) - Update to version 2.1.1+20211028.7ee8b5bdd: - tools: select technical or human-friendly output of failed actions (rh#1470834) - controller,executor: tweak action result messages (rh#1470834) - install init scripts only if not using systemd - executor: log execution status and exit reason with results (rh#1470834) - executor: improve result message (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/942220 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=354
2021-12-23 11:19:25 +01:00
#include "crm/services_internal.h"
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
+#include "crm/stonith-ng.h"
+#include "crm/fencing/internal.h"
+
#include "services_private.h"
Accepting request 769083 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.0.3+20200128.df6c286d9: - scheduler: ensure attenuated scores still have some effect - scheduler: ignore colocation constraints with 0 score - Update to version 2.0.3+20200127.cdf84f849: - libpe_status: Remove extra colons from operations output. - libpe_status: correctly check for implicit resource ID collision - libpe_status: Use the same message for headers and history. - get ready for implicit -fno-common with upcoming GCC 10 (bsc#1160410) - Rebase: * bug-728579_pacemaker-stonith-dev-id.patch - Update to version 2.0.3+20200116.92a6f7e97: - controller: bump feature set for shutdown-lock - scheduler: clear resource history when appropriate - tools: for down nodes, crm_resource --refresh should clear CIB only - controller: allow CRM_OP_LRM_DELETE to clear CIB only - tools: crm_resource resource checks should show shutdown locks - scheduler: display when a resource is shutdown-locked to a node - controller: don't clear shutdown locks when node rejoins - controller: mark shutdown-locked resources in resource history - scheduler: respect shutdown locks when placing inactive resources - scheduler: respect shutdown locks when placing active resources - scheduler: add shutdown lock cluster options - tools: improve error checking for crm_resource cleanup/fail commands - tools: improve crm_resource "why" messages - controller: improve messages when deleting CIB resource history - Update to version 2.0.3+20200116.ea5b06fae: - rectify thinko possibly behind spurious "process will not die" msg OBS-URL: https://build.opensuse.org/request/show/769083 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=333
2020-01-31 16:54:26 +01:00
static void close_pipe(int fildes[]);
Accepting request 942220 from home:yan_gao:branches:network:ha-clustering:Factory - fencer: get current time correctly * 0001-Fix-fencer-get-current-time-correctly.patch - Update to version 2.1.2+20211124.ada5c3b36 (Pacemaker-2.1.2): - fencer: add missing space to topology message - controller: handle remote connection start timeouts correctly - Update to version 2.1.1+20211116.8db4569e4 (Pacemaker-2.1.2-rc2): - fencing: mark state as done if remapped "on" times out - Fix OCF_RA_INSTALL_DIR Autoconf variable name in pkg-config files - daemons: Free memory at the end of fail_pending_op. - Update to version 2.1.1+20211104.62c36e2b1 (Pacemaker-2.1.2-rc1): - Use user_include_exclude_cb in crm_mon more. (clbz#5485) - Only set default sections in crm_mon once. (clbz#5485) - fencer: improve messages for dynamic target queries (rh#1470834) - fencer: consolidate messages for asynchronous results (rh#1470834) - fencer: log a message when out of memory for dynamic target search (rh#1470834) - libcrmservice: distinguish local and global configuration errors (rh#1470834) - libcrmservice: improve messages for pre-execution failures in child (rh#1470834) - Update to version 2.1.1+20211028.70f82d2c0: - attrd: check election status upon loss of a voter to prevent unexpected pending (bsc#1191676) - Update to version 2.1.1+20211028.7ee8b5bdd: - tools: select technical or human-friendly output of failed actions (rh#1470834) - controller,executor: tweak action result messages (rh#1470834) - install init scripts only if not using systemd - executor: log execution status and exit reason with results (rh#1470834) - executor: improve result message (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/942220 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=354
2021-12-23 11:19:25 +01:00
@@ -406,6 +409,15 @@ static void
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
add_action_env_vars(const svc_action_t *op)
{
void (*env_setter)(gpointer, gpointer, gpointer) = NULL;
Accepting request 691523 from home:yan_gao:branches:network:ha-clustering:Factory - spec: no need to explicitly require the virtual dependency on libqb - Rebase: * bug-728579_pacemaker-stonith-dev-id.patch - Update to version 2.0.1+20190402.e091f4f0c: - scheduler: one group stop shouldn't make another required - libcrmcommon: compare_version: drop superfluous heap allocation - libfencing: enumerate installed RHCS-style agents alpha-sorted - xml diff'ing: prevent 'id' attribute reordering in "diff-removed" - libcrmcommon: downplay "Creating RNG parser context" as debug prio - controller: improve failed recurring action messages - controller: improve lost action logs - use common service interface for fence-agents and RAs - libcrmcommon: allow whitespace in name/value pairs - libcrmcommon: pcmk_nvpair_t should handle NULL values - Update to version 2.0.1+20190312.059e2e26b: - spec: move stonith_admin to -cli where it belongs - tools: Add crm_rule. - Update to version 2.0.1+20190311.e91ee92e5: - libfencing: Change return type on stonith_agent_exists. - scheduler: cl#5301 - respect order constraints when relevant resources are being probed (bsc#1117934, bsc#1128374) - Update to version 2.0.1+20190304.1ac166cd3: - build: Update pkgconfig files for libpe. - libp-i: Add a pkgconfig file for libp-i. - libs: Rename libpengine to libpacemaker-internal. - tools: Add new validate options to crm_resource. - Add HealthIOWait provider which checks hosts's IOWait OBS-URL: https://build.opensuse.org/request/show/691523 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=323
2019-04-04 15:06:34 +02:00
+
Accepting request 853533 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 2.0.5+20201202.ba59be712 (Pacemaker-2.0.5): - xml: Revert to correct schema for alerts-3.5 - tools: match calloc() with free() in crm_resource - tools: "Connectivity is lost" may not be displayed even if the ping communication is lost. - Update to version 2.0.4+20201116.ae2c04b54: - tools: make cibsecret use bash - fencer: allow peer configuration requests - Update to version 2.0.4+20201027.31aa4f551: - pacemakerd: handle shutdown requests better - daemons,libcrmcommon: send status code with client acks - fencer: restrict certain IPC requests to privileged users (CVE-2020-25654, bsc#1177916) - pacemakerd: ignore shutdown requests from unprivileged users (CVE-2020-25654, bsc#1177916) - pacemakerd: check client for NULL before using it - executor: restrict certain IPC requests to Pacemaker daemons (CVE-2020-25654, bsc#1177916) - executor: return appropriate error code when no remote support - executor: mark controller connections to pacemaker-remoted as privileged - executor: show CRM_OP_REGISTER rc in debug message - Update to version 2.0.4+20201022.354625c62: - tools: revert some changes in crm_resource NULL checks - xml: Mark new crm_mon attributes as optional. - scheduler: fix build when DEFAULT_CONCURRENT_FENCING_TRUE is set - Update to version 2.0.4+20201019.878658661: - cib: create reply when needed for diff - cib: only build reply when needed - Update to version 2.0.4+20201014.b0ef36d82: OBS-URL: https://build.opensuse.org/request/show/853533 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=343
2020-12-07 10:07:23 +01:00
+ if (pcmk__str_eq(op->standard, PCMK_RESOURCE_CLASS_STONITH, pcmk__str_casei)
+ && pcmk__str_eq(op->agent, "fence_legacy", pcmk__str_casei)
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
+ && op->rsc != NULL) {
+ const char *st_dev_id_key = CRM_META "_" PCMK__XE_ST_DEVICE_ID;
Accepting request 721844 from home:yan_gao:branches:network:ha-clustering:Factory:Test - Update to version 2.0.2+20190801.122c32115: - libcib: install cib_types.h - tools: Use glib for cmdline handling in crm_mon. - libcrmcommon: Handle no digits in crm_int_helper. - libcrmcommon: Allow glib cmdline parsing without formatted output. - extra: calculate #health_disk correctly in SysInfo - extra: handle run-as-user properly in ClusterMon - extra: advertise promote and demote in Stateful meta-data - extra: formally deprecate the ocf:pacemaker:pingd agent - extra: quote shell variables in agent code where appropriate - extra: use ":=" where appropriate in agent code - Update to version 2.0.2+20190725.4b4fea3eb: - Rebase: * bug-977201_pacemaker-controld-self-fencing.patch - libcrmcommon: Restore getopt behavior in stonith_admin. - controller: document the cluster-name cluster property - controller: allow configurable reaction to local node fencing - pacemakerd: make daemon exit detection messages more consistent - executor: stonith probes should fail only if previously registered - libstonithd: handle API creation errors better - spec: avoid long-broken (in a pristine tree state) "make all" - controller: panic local host if notified of own fencing - controller: clear "required" bit when disconnecting scheduler - libcrmcommon: Remove -q from global cmdline options. - tools: Allow HTML output in stonith_admin. - libstonithd: Add HTML support to fencing messages. - st_client: Reword stonith_event_text. - controld: Use XML output to check for pending status. - pengine: formatted output for html OBS-URL: https://build.opensuse.org/request/show/721844 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=329
2019-08-08 18:13:22 +02:00
+
+ setenv(st_dev_id_key, op->rsc, 1);
+ }
+
if (op->agent == NULL) {
env_setter = set_alert_env; /* we deal with alert handler */