Fix to better reflect (my believed intent) as to the meaning of error_ok (ignore stderr vs accept failure)

This commit is contained in:
Justin Santa Barbara
2010-08-18 22:19:39 +01:00
parent d8f8d121a0
commit 7e403e3816
2 changed files with 6 additions and 6 deletions

View File

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

View File

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