mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Catch more specifc error to pass the error message through elegantly.
This commit is contained in:
parent
a2a7f1527b
commit
afc003079e
2 changed files with 5 additions and 1 deletions
|
@ -2900,6 +2900,10 @@ def vsan_add_disks(host, username, password, protocol=None, port=None, host_name
|
|||
try:
|
||||
task = vsan_system.AddDisks(eligible)
|
||||
salt.utils.vmware.wait_for_task(task, host_name, 'Adding disks to VSAN', sleep_seconds=3)
|
||||
except vim.fault.InsufficientDisks as err:
|
||||
log.debug(err.msg)
|
||||
ret.update({host_name: {'Error': err.msg}})
|
||||
continue
|
||||
except Exception as err:
|
||||
msg = '\'vsphere.vsan_add_disks\' failed for host {0}: {1}'.format(host_name, err)
|
||||
log.debug(msg)
|
||||
|
|
|
@ -424,7 +424,7 @@ def vmotion_configured(name, enabled, device='vmk0'):
|
|||
|
||||
enabled
|
||||
Ensures whether or not VMotion should be enabled on a host as a boolean
|
||||
value where ``True`` indicates that VSAN should be enabled and ``False``
|
||||
value where ``True`` indicates that VMotion should be enabled and ``False``
|
||||
indicates that VMotion should be disabled.
|
||||
|
||||
device
|
||||
|
|
Loading…
Add table
Reference in a new issue