Raise exception in find_multipath_device
When failed to execute "multipath -l" in find_multipath_device, raise an exception instead of printing warning only. Change-Id: I593b49d1637c7077e51a2db343e5b1eec3053536 Closes-Bug: #1519363
This commit is contained in:
parent
4b3dbdcb2f
commit
2b051f7fa2
|
@ -128,3 +128,7 @@ class VolumeGroupNotFound(BrickException):
|
||||||
|
|
||||||
class VolumeGroupCreationFailed(BrickException):
|
class VolumeGroupCreationFailed(BrickException):
|
||||||
message = _("Failed to create Volume Group: %(vg_name)s")
|
message = _("Failed to create Volume Group: %(vg_name)s")
|
||||||
|
|
||||||
|
|
||||||
|
class CommandExecutionFailed(BrickException):
|
||||||
|
message = _("Failed to execute command %(cmd)s")
|
||||||
|
|
|
@ -266,7 +266,8 @@ class LinuxSCSI(executor.Executor):
|
||||||
except putils.ProcessExecutionError as exc:
|
except putils.ProcessExecutionError as exc:
|
||||||
LOG.warning(_LW("multipath call failed exit %(code)s"),
|
LOG.warning(_LW("multipath call failed exit %(code)s"),
|
||||||
{'code': exc.exit_code})
|
{'code': exc.exit_code})
|
||||||
return None
|
raise exception.CommandExecutionFailed(
|
||||||
|
cmd='multipath -l %s' % device)
|
||||||
|
|
||||||
if out:
|
if out:
|
||||||
lines = out.strip()
|
lines = out.strip()
|
||||||
|
|
Loading…
Reference in New Issue