]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: fix raising from RemoteProcess.wait()
authorJohn Spray <john.spray@redhat.com>
Tue, 8 Dec 2015 16:28:34 +0000 (16:28 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 14 Jan 2016 22:55:29 +0000 (22:55 +0000)
...in the case where we call wait() on an already-finished
process.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/vstart_runner.py

index 579e11d6bf2d1c5b03e62a5337fafcd147163dd0..3b90afb78de1b3753a0dd3dd7098502ae573f6da 100644 (file)
@@ -92,7 +92,10 @@ class LocalRemoteProcess(object):
         if self.finished:
             # Avoid calling communicate() on a dead process because it'll
             # give you stick about std* already being closed
-            return
+            if self.exitstatus != 0:
+                raise CommandFailedError(self.args, self.exitstatus)
+            else:
+                return
 
         out, err = self.subproc.communicate()
         self.stdout.write(out)