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

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