Blame SOURCES/bz2134017-fence_lpar-only-output-additional-info-on-debug.patch

69ef16
From 46f94d4dbad868afc70b96bd612323221991d06e Mon Sep 17 00:00:00 2001
69ef16
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
69ef16
Date: Tue, 11 Oct 2022 09:51:24 +0200
69ef16
Subject: [PATCH] fence_lpar: only output additional error output on DEBUG
69ef16
 level
69ef16
69ef16
Without this patch we get ERROR logged with trace info when doing
69ef16
status-action for nodes that doesnt exist.
69ef16
---
69ef16
 agents/lpar/fence_lpar.py | 3 ++-
69ef16
 1 file changed, 2 insertions(+), 1 deletion(-)
69ef16
69ef16
diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py
69ef16
index 2046b0e4e..975971a57 100644
69ef16
--- a/agents/lpar/fence_lpar.py
69ef16
+++ b/agents/lpar/fence_lpar.py
69ef16
@@ -12,6 +12,7 @@
69ef16
 
69ef16
 import sys, re
69ef16
 import atexit
69ef16
+import logging
69ef16
 sys.path.append("@FENCEAGENTSLIBDIR@")
69ef16
 from fencing import *
69ef16
 from fencing import fail, fail_usage, EC_STATUS_HMC
69ef16
@@ -48,7 +49,7 @@ def get_power_status(conn, options):
69ef16
 		elif options["--hmc-version"] in ["4", "IVM"]:
69ef16
 			status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1)
69ef16
 	except AttributeError as e:
69ef16
-		fail_usage("Command on HMC failed: {}\n{}".format(command, str(e)), False)
69ef16
+		logging.debug("Command on HMC failed: {}\n{}".format(command, str(e)))
69ef16
 		fail(EC_STATUS_HMC)
69ef16
 
69ef16
 	return _normalize_status(status)