From: Sage Weil Date: Wed, 17 Feb 2021 03:27:32 +0000 (-0600) Subject: orchestra/daemon/cephadmunit: ignore exception when sending signal X-Git-Tag: 1.1.0~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=048e7be662502fa0db2b2d2fbae51a130fc0b9fa;p=teuthology.git 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 --- diff --git a/teuthology/orchestra/daemon/cephadmunit.py b/teuthology/orchestra/daemon/cephadmunit.py index 421fd2c9c..fff1319c1 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): """