fence-agents/SOURCES/bz1780825-fencing-1-add-stonith_status_sleep.patch

48 lines
1.7 KiB
Diff
Raw Normal View History

2021-05-14 04:12:18 +00:00
From b322891e91649d47656d63c73a0e08e9627f0b38 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Wed, 28 Apr 2021 12:20:07 +0200
Subject: [PATCH] fencing: add stonith_status_sleep parameter for sleep between
status calls during a STONITH action
---
lib/fencing.py.py | 13 +++++++++++--
76 files changed, 386 insertions(+), 2 deletions(-)
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
index 9654f57be..bd7f529f7 100644
--- a/lib/fencing.py.py
+++ b/lib/fencing.py.py
@@ -367,6 +367,14 @@
"default" : "0",
"required" : "0",
"order" : 200},
+ "stonith_status_sleep" : {
+ "getopt" : ":",
+ "longopt" : "stonith-status-sleep",
+ "type" : "second",
+ "help" : "--stonith-status-sleep=[seconds] Sleep X seconds between status calls during a STONITH action",
+ "default" : "1",
+ "required" : "0",
+ "order" : 200},
"missing_as_off" : {
"getopt" : "",
"longopt" : "missing-as-off",
@@ -478,7 +486,8 @@
"default" : ["help", "debug", "verbose", "verbose_level",
"version", "action", "agent", "power_timeout",
"shell_timeout", "login_timeout", "disable_timeout",
- "power_wait", "retry_on", "delay", "quiet"],
+ "power_wait", "stonith_status_sleep", "retry_on", "delay",
+ "quiet"],
"passwd" : ["passwd_script"],
"sudo" : ["sudo_path"],
"secure" : ["identity_file", "ssh_options", "ssh_path", "inet4_only", "inet6_only"],
@@ -828,7 +837,7 @@ def async_set_multi_power_fn(connection, options, set_power_fn, get_power_fn, re
for _ in itertools.count(1):
if get_multi_power_fn(connection, options, get_power_fn) != options["--action"]:
- time.sleep(1)
+ time.sleep(int(options["--stonith-status-sleep"]))
else:
return True