From f72e3cdd2a1d81d1f60a4f7def767e55ec99db1f Mon Sep 17 00:00:00 2001 From: Gil Bregman Date: Sun, 27 Oct 2024 19:09:55 +0200 Subject: [PATCH] Abort gateway in case of SPDK ping failure. Fixes #914 Signed-off-by: Gil Bregman --- control/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/control/server.py b/control/server.py index 9be0673f..4bb97052 100644 --- a/control/server.py +++ b/control/server.py @@ -687,7 +687,9 @@ def keep_alive(self): consecutive_ping_failures += 1 if consecutive_ping_failures >= allowed_consecutive_spdk_ping_failures: self.logger.critical(f"SPDK ping failed {consecutive_ping_failures} times, aborting") - break + raise SystemExit(f"SPDK ping failed, quitting gateway") + else: + self.logger.warning(f"SPDK ping failed {consecutive_ping_failures} times, will keep trying") else: consecutive_ping_failures = 0