Skip to content

Commit

Permalink
Generate coredump when no KA to the SPDK
Browse files Browse the repository at this point in the history
Signed-off-by: leonidc <[email protected]>
  • Loading branch information
leonidc committed Sep 6, 2023
1 parent 09cb4ad commit 0370fe8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions control/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0370fe8

Please sign in to comment.