Fix: controller: do not check whether watchdog fencing is enabled for the node if stonith-watchdog-timeout is not even configured
(cherry picked from commit 9aee309797e54b37b9932e81ebc19817d2f3b39e)
This commit is contained in:
parent
d248ffcb7c
commit
1962142c2b
35
Fix-controller-not-check-watchdog-fencing-status.patch
Normal file
35
Fix-controller-not-check-watchdog-fencing-status.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 9a0c1bbc899fff8c5c0de2462726bd128fd35c73 Mon Sep 17 00:00:00 2001
|
||||
From: bizhiyuan <bizhiyuan@kylinos.cn>
|
||||
Date: Tue, 5 Sep 2023 23:47:24 +0800
|
||||
Subject: [PATCH] Fix: controller: do not check whether watchdog fencing is
|
||||
enabled for the node if stonith-watchdog-timeout is not even configured
|
||||
|
||||
---
|
||||
daemons/controld/controld_fencing.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/daemons/controld/controld_fencing.c b/daemons/controld/controld_fencing.c
|
||||
index 89cb61f..84591b6 100644
|
||||
--- a/daemons/controld/controld_fencing.c
|
||||
+++ b/daemons/controld/controld_fencing.c
|
||||
@@ -1000,12 +1000,14 @@ controld_execute_fence_action(pcmk__graph_t *graph,
|
||||
bool
|
||||
controld_verify_stonith_watchdog_timeout(const char *value)
|
||||
{
|
||||
+ long st_timeout = value? crm_get_msec(value) : 0;
|
||||
const char *our_nodename = controld_globals.our_nodename;
|
||||
gboolean rv = TRUE;
|
||||
|
||||
- if (stonith_api && (stonith_api->state != stonith_disconnected) &&
|
||||
- stonith__watchdog_fencing_enabled_for_node_api(stonith_api,
|
||||
- our_nodename)) {
|
||||
+ if (st_timeout == 0
|
||||
+ || (stonith_api && (stonith_api->state != stonith_disconnected) &&
|
||||
+ stonith__watchdog_fencing_enabled_for_node_api(stonith_api,
|
||||
+ our_nodename))) {
|
||||
rv = pcmk__valid_sbd_timeout(value);
|
||||
}
|
||||
return rv;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
## can be incremented to build packages reliably considered "newer"
|
||||
## than previously built packages with the same pcmkversion)
|
||||
%global pcmkversion 2.1.6
|
||||
%global specversion 8
|
||||
%global specversion 9
|
||||
|
||||
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
|
||||
%global commit 6fdc9deea294bbad629b003c6ae036aaed8e3ee0
|
||||
@ -158,6 +158,7 @@ Patch3: Fix-libcrmcommon-wait-for-reply-from-appropriate-con.patch
|
||||
Patch4: Refactor-fencer-sleep-1s-between-reconnects.patch
|
||||
Patch5: Fix-the-validation-function-of-input.patch
|
||||
Patch6: Fix-a-bug-in-clone-resource-description-display.patch
|
||||
Patch7: Fix-controller-not-check-watchdog-fencing-status.patch
|
||||
# upstream commits
|
||||
|
||||
Requires: resource-agents
|
||||
@ -777,6 +778,9 @@ exit 0
|
||||
%license %{nagios_name}-%{nagios_hash}/COPYING
|
||||
|
||||
%changelog
|
||||
* Wed Sep 6 2023 bizhiyuan <bizhiyuan@kylinos.cn> - 2.1.6-9
|
||||
- Fix: do not check whether watchdog fencing is enabled for the node if stonith-watchdog-timeout is not configured
|
||||
|
||||
* Mon Sep 4 2023 bizhiyuan <bizhiyuan@kylinos.cn> - 2.1.6-8
|
||||
- Fix a bug in clone resource description display
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user