Merge pull request #29683 from rallytime/vsan_fixes

Catch more specific error to pass the error message through elegantly.
This commit is contained in:
Mike Place 2015-12-15 11:41:54 -07:00
commit 7c50533d3f
2 changed files with 5 additions and 1 deletions

View file

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

View file

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