Package: crmsh Version: 4.4.0-2 Severity: important Tags: upstream patch Forwarded: https://github.com/ClusterLabs/crmsh/issues/970
Hi! The output from pacemaker changed from what crmsh expects, which makes certain commands now fail (in addition to causing WARNING and INFO output). This is affecting us on our HA setup. The (merged) upstream commit fixing this is <https://github.com/ClusterLabs/crmsh/commit/f83aa41185dbc71a25a3def39d42356e503b1f96>, which I'm attaching here for your convenience. Thanks, Guillem
From f83aa41185dbc71a25a3def39d42356e503b1f96 Mon Sep 17 00:00:00 2001 From: liangxin1300 <xli...@suse.com> Date: Wed, 11 May 2022 11:09:28 +0800 Subject: [PATCH] Fix: utils: wait4dc: Make change since output of 'crmadmin -S' changed(bsc#1199412) --- crmsh/utils.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crmsh/utils.py b/crmsh/utils.py index 9f2603a1..9ebce28f 100644 --- a/crmsh/utils.py +++ b/crmsh/utils.py @@ -895,15 +895,10 @@ def wait4dc(what="", show_progress=True): return False cmd = "crmadmin -S %s" % dc rc, s = get_stdout(add_sudo(cmd)) - if not s.startswith("Status"): - logger.warning("%s unexpected output: %s (exit code: %d)", cmd, s, rc) - return False - try: - dc_status = s.split()[-2] - except: - logger.warning("%s unexpected output: %s", cmd, s) + if rc != 0: + logger.error("Exit code of command {} is {}".format(cmd, rc)) return False - if dc_status == "S_IDLE": + if re.search("S_IDLE.*ok", s): if output_started: sys.stderr.write(" done\n") return True -- 2.38.1