summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Gandelman <adamg@canonical.com>2012-02-07 15:57:38 -0800
committerAdam Gandelman <adamg@canonical.com>2012-02-07 16:15:25 -0800
commit40206cb80a8a1636eac0733360a0cc67bea9a6da (patch)
tree3598a804e0f00d147ddc0911475271403de5fad0
parentb0a708f67407256a449414a000b070752e51dba2 (diff)
downloadnova-40206cb80a8a1636eac0733360a0cc67bea9a6da.tar.gz
nova-40206cb80a8a1636eac0733360a0cc67bea9a6da.tar.xz
nova-40206cb80a8a1636eac0733360a0cc67bea9a6da.zip
nova-rootwrap: wait() for return code before exit
nova-rootwrap does not wait() for the subprocess it executes to complete before returning its return code. This often ends up in 0 being returned regardless of failure/success and causing unforeseen problems in Nova. Fixes bug #928566 Change-Id: I9b6d85c747513086d0e774cb92ba403886b3283c
-rwxr-xr-xbin/nova-rootwrap1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/nova-rootwrap b/bin/nova-rootwrap
index 0434aed3a..c5d53b46f 100755
--- a/bin/nova-rootwrap
+++ b/bin/nova-rootwrap
@@ -67,6 +67,7 @@ if __name__ == '__main__':
stdout=sys.stdout,
stderr=sys.stderr,
env=filtermatch.get_environment(userargs))
+ obj.wait()
sys.exit(obj.returncode)
print "Unauthorized command: %s" % ' '.join(userargs)