]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fixing call method timeout handling
authorRedouane Kachach <rkachach@redhat.com>
Mon, 11 Apr 2022 14:13:05 +0000 (16:13 +0200)
committerAdam King <adking@redhat.com>
Tue, 3 May 2022 00:48:34 +0000 (20:48 -0400)
Fixes: https://tracker.ceph.com/issues/55265
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 55d42d0c31a5414cb2beac9273faa7123efb8709)

src/cephadm/cephadm

index 16ce722af6138887d7dfe1908dfe8fe2fde787c4..1f022cfc466d5533c1ceebf03cb3e0402a9043a3 100755 (executable)
@@ -1679,9 +1679,8 @@ def call(ctx: CephadmContext,
         assert process.stdout
         assert process.stderr
         try:
-            stdout, stderr = await asyncio.gather(tee(process.stdout),
-                                                  tee(process.stderr))
             returncode = await asyncio.wait_for(process.wait(), timeout)
+            stdout, stderr = await asyncio.gather(tee(process.stdout), tee(process.stderr))
         except asyncio.TimeoutError:
             logger.info(prefix + f'timeout after {timeout} seconds')
             return '', '', 124