]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
orchestra/daemon/cephadmunit: ignore exception when sending signal 1616/head
authorSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 03:27:32 +0000 (21:27 -0600)
committerSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 03:27:32 +0000 (21:27 -0600)
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 <sage@newdream.net>
teuthology/orchestra/daemon/cephadmunit.py

index 421fd2c9cdf2a17a76237f43d5fdc5949beaab14..fff1319c1543e3dd2e72363158bdfb4f08f82bb1 100644 (file)
@@ -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):
         """