]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: only SIGKILL once during timeout 35510/head
authorMichael Fritch <mfritch@suse.com>
Fri, 12 Jun 2020 14:24:16 +0000 (08:24 -0600)
committerMichael Fritch <mfritch@suse.com>
Fri, 12 Jun 2020 14:24:54 +0000 (08:24 -0600)
no need to continually SIGKILL a process that is already exiting

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index 3266c829f920f4801c956d536225a99cfffc8244..d5a5945471d10e251ba47d29e9098ca2e788bd15 100755 (executable)
@@ -765,9 +765,10 @@ def call(command,  # type: List[str]
         end_time = start_time + timeout
     while not stop:
         if end_time and (time.time() >= end_time):
-            logger.info(desc + ':timeout after %s seconds' % timeout)
             stop = True
-            process.kill()
+            if process.poll() is None:
+                logger.info(desc + ':timeout after %s seconds' % timeout)
+                process.kill()
         if reads and process.poll() is not None:
             # we want to stop, but first read off anything remaining
             # on stdout/stderr