Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pacemaker.32680
bsc#1210074-0007-Fix-controller-initial-timeout...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1210074-0007-Fix-controller-initial-timeout-for-fencing-callback-.patch of Package pacemaker.32680
From db32a9c43462c36dfe07eb4c3393aa2e9d711dad Mon Sep 17 00:00:00 2001 From: "Gao,Yan" <ygao@suse.com> Date: Mon, 17 Apr 2023 11:36:32 +0200 Subject: [PATCH 07/11] Fix: controller: initial timeout for fencing callback takes any priority fencing delay into account It's usually not necessary under normal circumstances since the timeout for the async callback gets updated very soon with st_client.c:update_callback_timeout() once fencer has decided the total fencing timeout and reported it back to controller with fenced_remote.c:report_timeout_period(). But anyway it makes sense to be added for the initial. --- daemons/controld/controld_fencing.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) Index: pacemaker-2.1.5+20221208.a3f44794f/daemons/controld/controld_fencing.c =================================================================== --- pacemaker-2.1.5+20221208.a3f44794f.orig/daemons/controld/controld_fencing.c +++ pacemaker-2.1.5+20221208.a3f44794f/daemons/controld/controld_fencing.c @@ -882,18 +882,17 @@ tengine_stonith_callback(stonith_t *ston } static int -fence_with_delay(const char *target, const char *type, const char *delay) +fence_with_delay(const char *target, const char *type, int delay) { uint32_t options = st_opt_none; // Group of enum stonith_call_options - int timeout_sec = (int) (transition_graph->stonith_timeout / 1000); + int timeout_sec = (int) (transition_graph->stonith_timeout + / 1000); - int delay_i; if (crmd_join_phase_count(crm_join_confirmed) == 1) { stonith__set_call_options(options, target, st_opt_allow_suicide); } - pcmk__scan_min_int(delay, &delay_i, 0); return stonith_api->cmds->fence_with_delay(stonith_api, options, target, - type, timeout_sec, 0, delay_i); + type, timeout_sec, 0, delay); } /*! @@ -916,7 +914,9 @@ controld_execute_fence_action(pcmk__grap const char *type = NULL; char *transition_key = NULL; const char *priority_delay = NULL; + int delay_i = 0; gboolean invalid_action = FALSE; + guint stonith_timeout = transition_graph->stonith_timeout; id = ID(action->xml); target = crm_element_value(action->xml, XML_LRM_ATTR_TARGET); @@ -937,20 +937,24 @@ controld_execute_fence_action(pcmk__grap crm_notice("Requesting fencing (%s) of node %s " CRM_XS " action=%s timeout=%u%s%s", - type, target, id, transition_graph->stonith_timeout, + type, target, id, stonith_timeout, priority_delay ? " priority_delay=" : "", priority_delay ? priority_delay : ""); /* Passing NULL means block until we can connect... */ te_connect_stonith(NULL); - rc = fence_with_delay(target, type, priority_delay); + pcmk__scan_min_int(priority_delay, &delay_i, 0); + rc = fence_with_delay(target, type, delay_i); - transition_key = pcmk__transition_key(transition_graph->id, action->id, 0, + transition_key = pcmk__transition_key(transition_graph->id, + action->id, 0, te_uuid), stonith_api->cmds->register_callback(stonith_api, rc, - (int) (transition_graph->stonith_timeout / 1000), + ((int) (stonith_timeout / 1000) + + (delay_i > 0 ? delay_i : 0)), st_opt_timeout_updates, transition_key, - "tengine_stonith_callback", tengine_stonith_callback); + "tengine_stonith_callback", + tengine_stonith_callback); return pcmk_rc_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