Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
pacemaker
0001-Refactor-crm_resource-make-wait-wait-for-p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Refactor-crm_resource-make-wait-wait-for-pending-act.patch of Package pacemaker
From d253cdf5d7ec493770d738069a5345af25d333ef Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen <oalbrigt@redhat.com> Date: Thu, 26 Oct 2023 12:58:13 +0200 Subject: [PATCH] Refactor: crm_resource: make --wait wait for pending actions in CIB Fixes T555 --- tools/crm_resource_runtime.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: pacemaker-2.0.4+20200616.2deceaa3a/tools/crm_resource_runtime.c =================================================================== --- pacemaker-2.0.4+20200616.2deceaa3a.orig/tools/crm_resource_runtime.c +++ pacemaker-2.0.4+20200616.2deceaa3a/tools/crm_resource_runtime.c @@ -1617,7 +1617,9 @@ int wait_till_stable(int timeout_ms, cib_t * cib) { pe_working_set_t *data_set = NULL; + xmlXPathObjectPtr search; int rc = -1; + bool pending_unknown_state_resources; int timeout_s = timeout_ms? ((timeout_ms + 999) / 1000) : WAIT_DEFAULT_TIMEOUT_S; time_t expire_time = time(NULL) + timeout_s; time_t time_diff; @@ -1631,7 +1633,6 @@ wait_till_stable(int timeout_ms, cib_t * set_bit(data_set->flags, pe_flag_no_compat); do { - /* Abort if timeout is reached */ time_diff = expire_time - time(NULL); if (time_diff > 0) { @@ -1673,7 +1674,11 @@ wait_till_stable(int timeout_ms, cib_t * } } - } while (actions_are_pending(data_set->actions)); + search = xpath_search(data_set->input, "/cib/status/node_state/lrm/lrm_resources/lrm_resource/" + XML_LRM_TAG_RSC_OP "[@" XML_LRM_ATTR_RC "='193']"); + pending_unknown_state_resources = (numXpathResults(search) > 0); + freeXpathObject(search); + } while (actions_are_pending(data_set->actions) || pending_unknown_state_resources); pe_free_working_set(data_set); return pcmk_ok;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor