Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
pacemaker.34782
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.34782
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.2+20211124.ada5c3b36/daemons/controld/controld_fencing.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/daemons/controld/controld_fencing.c +++ pacemaker-2.1.2+20211124.ada5c3b36/daemons/controld/controld_fencing.c @@ -824,17 +824,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); if (crmd_join_phase_count(crm_join_confirmed) == 1) { stonith__set_call_options(options, target, st_opt_allow_suicide); } return stonith_api->cmds->fence_with_delay(stonith_api, options, target, - type, timeout_sec, 0, - crm_atoi(delay, "0")); + type, timeout_sec, 0, delay); } gboolean @@ -848,7 +847,9 @@ te_fence_node(crm_graph_t *graph, crm_ac 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); @@ -869,20 +870,24 @@ te_fence_node(crm_graph_t *graph, crm_ac 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); - transition_key = pcmk__transition_key(transition_graph->id, action->id, 0, + delay_i = crm_atoi(priority_delay, "0"); + rc = fence_with_delay(target, type, delay_i); + 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 TRUE; }
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