Blame SOURCES/bz1470813-fencing-4-make-timeout-0-mean-forever.patch

55ec64
From 083ecce0e7b6cd41eef026c8a1ba986f8814a7d9 Mon Sep 17 00:00:00 2001
55ec64
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
55ec64
Date: Thu, 5 Nov 2020 11:53:55 +0100
55ec64
Subject: [PATCH] fencing: fix run_command() to allow timeout=0 to mean forever
55ec64
55ec64
---
55ec64
 lib/fencing.py.py | 2 +-
55ec64
 1 file changed, 1 insertion(+), 1 deletion(-)
55ec64
55ec64
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
55ec64
index fa34f13a..9654f57b 100644
55ec64
--- a/lib/fencing.py.py
55ec64
+++ b/lib/fencing.py.py
55ec64
@@ -1062,7 +1062,7 @@ def run_command(options, command, timeout=None, env=None, log_command=None):
55ec64
 
55ec64
 	thread = threading.Thread(target=process.wait)
55ec64
 	thread.start()
55ec64
-	thread.join(timeout)
55ec64
+	thread.join(timeout if timeout else None)
55ec64
 	if thread.is_alive():
55ec64
 		process.kill()
55ec64
 		fail(EC_TIMED_OUT, stop=(int(options.get("retry", 0)) < 1))