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