]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Give daemons a five-minute timeout for stopping 266/head
authorZack Cerza <zack@cerza.org>
Fri, 30 May 2014 21:23:49 +0000 (16:23 -0500)
committerZack Cerza <zack@cerza.org>
Fri, 30 May 2014 21:39:16 +0000 (16:39 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/task/ceph.py

index 39507be1c553347482a752d5449e8d9eb4abeffb..1d2fb386da0bc0a56c6f62e2ddebe7d093a9a20d 100644 (file)
@@ -44,19 +44,21 @@ class DaemonState(object):
         self.log = command_kwargs.get('logger', log)
         self.proc = None
 
-    def stop(self):
+    def stop(self, timeout=300):
         """
         Stop this daemon instance.
 
         Note: this can raise a run.CommandFailedError,
         run.CommandCrashedError, or run.ConnectionLostError.
+
+        :param timeout: timeout to pass to orchestra.run.wait()
         """
         if not self.running():
             self.log.error('tried to stop a non-running daemon')
             return
         self.proc.stdin.close()
         self.log.debug('waiting for process to exit')
-        run.wait([self.proc])
+        run.wait([self.proc], timeout=timeout)
         self.proc = None
         self.log.info('Stopped')