From 205c455fc1b94840d0723fc702f81c55b88bb776 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 30 May 2014 16:23:49 -0500 Subject: [PATCH] Give daemons a five-minute timeout for stopping Signed-off-by: Zack Cerza --- teuthology/task/ceph.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 39507be1c5533..1d2fb386da0bc 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') -- 2.39.5