You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current module does not support floating point for disk size specification, in particular for size_tb, where in a value of 1.5 would translate to 1500 GB
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
File "/tmp/ansible_vmware_guest_disk_payload_Kf_wHm/ansible_vmware_guest_disk_payload.zip/ansible/modules/cloud/vmware/vmware_guest_disk.py", line 693, in main
File "/tmp/ansible_vmware_guest_disk_payload_Kf_wHm/ansible_vmware_guest_disk_payload.zip/ansible/modules/cloud/vmware/vmware_guest_disk.py", line 344, in ensure_disks
File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 663, in __setattr__
CheckField(self._GetPropertyInfo(name), val)
File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 1098, in CheckField
% (info.name, info.type.__name__, valType.__name__))
fatal: [server -> localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"datacenter": "datacenter",
"disk": [
{
"datastore": "datastore",
"scsi_controller": 1,
"size_tb": 1.5,
"state": "present",
"type": "thin",
"unit_number": 1
}
],
"folder": null,
"hostname": "1.1.1.1",
"moid": null,
"name": "example.com",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"proxy_host": null,
"proxy_port": null,
"use_instance_uuid": false,
"username": "username@vsphere.local",
"uuid": null,
"validate_certs": false
}
},
"msg": "Failed to manage disks for virtual machine 'example.com' with exception : For \"capacityInKB\" expected type long, but got float"
}
Adds the disk successfully without complaining about the floating point error and, when the size is specified in TB, floating point should be allowed, for example (1.5 TB or 2.5 TB)
ACTUAL RESULTS
The module expects the size_<> should always be a non floating point integer, otherwise throws an error when say, size_tb: 1.5.
"msg": "Failed to manage disks for virtual machine 'example.com' with exception : For \"capacityInKB\" expected type long, but got float"
The text was updated successfully, but these errors were encountered:
SUMMARY
The current module does not support floating point for disk size specification, in particular for
size_tb
, where in a value of1.5
would translate to1500
GBISSUE TYPE
COMPONENT NAME
/usr/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_guest_disk.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
Adds the disk successfully without complaining about the floating point error and, when the size is specified in TB, floating point should be allowed, for example (1.5 TB or 2.5 TB)
ACTUAL RESULTS
The module expects the
size_<>
should always be a non floating point integer, otherwise throws an error when say,size_tb: 1.5
.The text was updated successfully, but these errors were encountered: