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
This commit is contained in:
Adam Gandelman 2012-02-07 15:57:38 -08:00
parent b0a708f674
commit 40206cb80a
1 changed files with 1 additions and 0 deletions

View File

@ -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)