From 048e7be662502fa0db2b2d2fbae51a130fc0b9fa Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Feb 2021 21:27:32 -0600 Subject: [PATCH] orchestra/daemon/cephadmunit: ignore exception when sending signal The osd thrashing is sending lots of signals (sighup) and can easily race with a daemon shutting down entirely. This makes us match the behavior of the original state.py signal() method. Signed-off-by: Sage Weil --- teuthology/orchestra/daemon/cephadmunit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/teuthology/orchestra/daemon/cephadmunit.py b/teuthology/orchestra/daemon/cephadmunit.py index 421fd2c9cd..fff1319c15 100644 --- a/teuthology/orchestra/daemon/cephadmunit.py +++ b/teuthology/orchestra/daemon/cephadmunit.py @@ -120,7 +120,12 @@ class CephadmUnit(DaemonState): """ if not silent: self.log.info('Senging signal %d to %s...' % (sig, self.name())) - self.remote.sh(self.kill_cmd(sig)) + # Ignore exception here because sending a singal via docker can be + # quite slow and easily race with, say, the daemon shutting down. + try: + self.remote.sh(self.kill_cmd(sig)) + except Exception as e: + self.log.info(f'Ignoring exception while sending signal: {e}') def start(self, timeout=300): """ -- 2.39.5