From: Zack Cerza Date: Fri, 30 May 2014 21:23:49 +0000 (-0500) Subject: Give daemons a five-minute timeout for stopping X-Git-Tag: 1.1.0~1424^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F266%2Fhead;p=teuthology.git Give daemons a five-minute timeout for stopping Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 39507be1c..1d2fb386d 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -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')