|
|
6147c0 |
From f37e5ba0b6c8dab527f947bfc602d50b953a7d08 Mon Sep 17 00:00:00 2001
|
|
|
6147c0 |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
6147c0 |
Date: Tue, 17 Sep 2019 15:15:06 +0200
|
|
|
6147c0 |
Subject: [PATCH] fence_sbd: support errors on stderr
|
|
|
6147c0 |
|
|
|
6147c0 |
---
|
|
|
6147c0 |
agents/sbd/fence_sbd.py | 5 +++--
|
|
|
6147c0 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
6147c0 |
|
|
|
6147c0 |
diff --git a/agents/sbd/fence_sbd.py b/agents/sbd/fence_sbd.py
|
|
|
6147c0 |
index b1df70ac..3ae8df6e 100644
|
|
|
6147c0 |
--- a/agents/sbd/fence_sbd.py
|
|
|
6147c0 |
+++ b/agents/sbd/fence_sbd.py
|
|
|
6147c0 |
@@ -8,6 +8,7 @@
|
|
|
6147c0 |
from fencing import fail_usage, run_command, fence_action, all_opt
|
|
|
6147c0 |
from fencing import atexit_handler, check_input, process_input, show_docs
|
|
|
6147c0 |
from fencing import run_delay
|
|
|
6147c0 |
+import itertools
|
|
|
6147c0 |
|
|
|
6147c0 |
DEVICE_INIT = 1
|
|
|
6147c0 |
DEVICE_NOT_INIT = -3
|
|
|
6147c0 |
@@ -82,7 +83,7 @@ def check_sbd_device(options, device_path):
|
|
|
6147c0 |
|
|
|
6147c0 |
(return_code, out, err) = run_command(options, cmd)
|
|
|
6147c0 |
|
|
|
6147c0 |
- for line in out.split("\n"):
|
|
|
6147c0 |
+ for line in itertools.chain(out.split("\n"), err.split("\n")):
|
|
|
6147c0 |
if len(line) == 0:
|
|
|
6147c0 |
continue
|
|
|
6147c0 |
|
|
|
6147c0 |
@@ -148,7 +149,7 @@ def get_msg_timeout(options):
|
|
|
6147c0 |
|
|
|
6147c0 |
(return_code, out, err) = run_command(options, cmd)
|
|
|
6147c0 |
|
|
|
6147c0 |
- for line in out.split("\n"):
|
|
|
6147c0 |
+ for line in itertools.chain(out.split("\n"), err.split("\n")):
|
|
|
6147c0 |
if len(line) == 0:
|
|
|
6147c0 |
continue
|
|
|
6147c0 |
|