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

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