From 7e403e381612e5678aa8f2b9e714d472ba4b3ef0 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 18 Aug 2010 22:19:39 +0100 Subject: Fix to better reflect (my believed intent) as to the meaning of error_ok (ignore stderr vs accept failure) --- nova/volume/service.py | 10 +++++----- tools/install_venv.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nova/volume/service.py b/nova/volume/service.py index bf803eaf6..be62f621d 100644 --- a/nova/volume/service.py +++ b/nova/volume/service.py @@ -249,14 +249,14 @@ class Volume(datastore.BasicModel): "sudo lvcreate -L %s -n %s %s" % (sizestr, self['volume_id'], FLAGS.volume_group), - check_exit_code=True) + terminate_on_stderr=False) @defer.inlineCallbacks def _delete_lv(self): yield process.simple_execute( "sudo lvremove -f %s/%s" % (FLAGS.volume_group, self['volume_id']), - check_exit_code=True) + terminate_on_stderr=False) @property def __devices_key(self): @@ -285,7 +285,7 @@ class Volume(datastore.BasicModel): FLAGS.aoe_eth_dev, FLAGS.volume_group, self['volume_id']), - check_exit_code=True) + terminate_on_stderr=False) @defer.inlineCallbacks def _remove_export(self): @@ -299,11 +299,11 @@ class Volume(datastore.BasicModel): yield process.simple_execute( "sudo vblade-persist stop %s %s" % (self['shelf_id'], self['blade_id']), - check_exit_code=True) + terminate_on_stderr=False) yield process.simple_execute( "sudo vblade-persist destroy %s %s" % (self['shelf_id'], self['blade_id']), - check_exit_code=True) + terminate_on_stderr=False) class FakeVolume(Volume): diff --git a/tools/install_venv.py b/tools/install_venv.py index a9154fc33..1f0fa3cc7 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -37,7 +37,7 @@ def die(message, *args): sys.exit(1) -def run_command(cmd, redirect_output=True, check_exit_code=False): +def run_command(cmd, redirect_output=True, check_exit_code=True): """ Runs a command in an out-of-process shell, returning the output of that command. Working directory is ROOT. -- cgit