From 0370fe89a52daee125f87a87856ea493adf03ce2 Mon Sep 17 00:00:00 2001 From: leonidc Date: Sun, 3 Sep 2023 02:27:20 -0400 Subject: [PATCH] Generate coredump when no KA to the SPDK Signed-off-by: leonidc --- control/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/control/server.py b/control/server.py index e497f11c..9d377588 100644 --- a/control/server.py +++ b/control/server.py @@ -70,6 +70,7 @@ def __init__(self, config): self.name = socket.gethostname() self.logger.info(f"Starting gateway {self.name}") + def __enter__(self): return self @@ -225,8 +226,9 @@ def _stop_spdk(self): self.logger.error(f"SPDK({self.name}) pid {self.spdk_process.pid} " f"already terminated, exit code: {return_code}") else: - self.logger.info(f"Terminating SPDK({self.name}) pid {self.spdk_process.pid}...") - self.spdk_process.terminate() + self.logger.info(f"Aborting SPDK({self.name}) pid {self.spdk_process.pid}...") + self.spdk_process.send_signal(signal.SIGABRT) + try: timeout = self.config.getfloat("spdk", "timeout") self.spdk_process.communicate(timeout=timeout)