community.vmware
community.vmware copied to clipboard
vmware_guest: support for multiple datastores
…ting and then added the changes for the fix in vmware_guest.py
SUMMARY
ISSUE TYPE
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
Build failed.
:x: ansible-tox-linters FAILURE in 4m 30s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 26s :x: ansible-test-sanity-docker-devel RETRY_LIMIT in 1m 36s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 8m 21s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 9m 37s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 15s :heavy_check_mark: ansible-test-units-community-vmware-python27 SUCCESS in 5m 51s :heavy_check_mark: ansible-test-units-community-vmware-python36 SUCCESS in 6m 20s :heavy_check_mark: ansible-test-units-community-vmware-python37 SUCCESS in 7m 13s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 30s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-python36-stable211 SUCCESS in 19m 56s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-python36-stable211 SUCCESS in 18m 49s :x: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_1_of_2 RETRY_LIMIT in 1h 06m 20s :x: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_2_of_2 FAILURE in 21m 10s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 53s
Build failed.
:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 22s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 16s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 8m 38s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 18s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 12m 18s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 9m 42s :heavy_check_mark: ansible-test-units-community-vmware-python27 SUCCESS in 6m 15s :heavy_check_mark: ansible-test-units-community-vmware-python36 SUCCESS in 5m 36s :heavy_check_mark: ansible-test-units-community-vmware-python37 SUCCESS in 6m 37s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 28s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-python36-stable211 SUCCESS in 19m 32s :x: ansible-test-cloud-integration-vcenter7_2esxi-python36-stable211 RETRY_LIMIT in 1h 00m 46s :x: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_1_of_2 RETRY_LIMIT in 1h 39m 48s :x: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_2_of_2 FAILURE in 20m 19s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 26s
recheck
Build failed.
:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 30s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 00s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 8m 15s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 10m 08s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 8m 34s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 13s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 6m 30s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 18m 36s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 17m 03s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 39m 00s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 RETRY_LIMIT in 3h 02m 51s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 09s
recheck
Build failed.
:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 03s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 15s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 8m 56s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 7m 21s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 8m 53s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 12s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 33s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 17m 19s :x: ansible-test-cloud-integration-vcenter7_2esxi-stable212 RETRY_LIMIT in 1h 01m 55s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 39m 31s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 FAILURE in 18m 32s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 21s
recheck
Build failed.
:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 05s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 10s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 8m 42s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 7m 35s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 8m 59s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 09s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 6m 27s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 17m 10s :x: ansible-test-cloud-integration-vcenter7_2esxi-stable212 FAILURE in 19m 13s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 38m 34s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 FAILURE in 19m 21s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 53s
Build failed.
:x: ansible-tox-linters FAILURE in 4m 05s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 11s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 8m 19s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 8m 30s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 8m 30s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 7m 54s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 44s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 20m 17s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 18m 05s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 38m 49s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 FAILURE in 19m 58s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 08s
Build failed.
:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 11s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 10s :x: ansible-test-sanity-docker-devel FAILURE in 8m 46s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 8m 14s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 00s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 26s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 21s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 18m 58s :x: ansible-test-cloud-integration-vcenter7_2esxi-stable212 FAILURE in 13m 38s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 FAILURE in 10m 27s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 FAILURE in 10m 29s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 04s
Build failed.
:x: ansible-tox-linters FAILURE in 3m 59s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 04s :x: ansible-test-sanity-docker-devel FAILURE in 9m 45s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 8m 45s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 22s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 01s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 25s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 19m 00s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 16m 35s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 43m 52s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 FAILURE in 17m 24s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 58s
This is the part of the tests that is failing:
2022-08-24 15:18:16.281614 | controller | TASK [vmware_guest : clone vm] *************************************************
2022-08-24 15:18:16.281661 | controller | task path: /home/zuul/.ansible/collections/ansible_collections/community/vmware/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml:78
2022-08-24 15:18:16.305845 | controller | Using module file /home/zuul/.ansible/collections/ansible_collections/community/vmware/plugins/modules/vmware_guest.py
2022-08-24 15:18:16.306111 | controller | Pipelining is enabled.
2022-08-24 15:18:16.306322 | controller | <testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
2022-08-24 15:18:16.306437 | controller | <testhost> EXEC /bin/sh -c '/home/zuul/venv/bin/python && sleep 0'
2022-08-24 15:18:16.802856 | controller | The full traceback is:
2022-08-24 15:18:16.802884 | controller | File "/tmp/ansible_vmware_guest_payload_64x0_6u_/ansible_vmware_guest_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest.py", line 3029, in deploy_vm
2022-08-24 15:18:16.802889 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/VmomiSupport.py", line 706, in <lambda>
2022-08-24 15:18:16.802893 | controller | self.f(*(self.args + (obj,) + args), **kwargs)
2022-08-24 15:18:16.802896 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/VmomiSupport.py", line 512, in _InvokeMethod
2022-08-24 15:18:16.802900 | controller | return self._stub.InvokeMethod(self, info, args)
2022-08-24 15:18:16.802904 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 1345, in InvokeMethod
2022-08-24 15:18:16.802907 | controller | req = self.SerializeRequest(mo, info, args)
2022-08-24 15:18:16.802911 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 955, in SerializeRequest
2022-08-24 15:18:16.802914 | controller | result.append(_SerializeToUnicode(arg, param, self.version, nsMap))
2022-08-24 15:18:16.802919 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 192, in _SerializeToUnicode
2022-08-24 15:18:16.802922 | controller | SoapSerializer(writer, version, nsMap).Serialize(val, info)
2022-08-24 15:18:16.802926 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 267, in Serialize
2022-08-24 15:18:16.802929 | controller | self._Serialize(val, info, self.defaultNS)
2022-08-24 15:18:16.802938 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 352, in _Serialize
2022-08-24 15:18:16.802941 | controller | self._SerializeDataObject(val, info, attr, currDefNS)
2022-08-24 15:18:16.802944 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 495, in _SerializeDataObject
2022-08-24 15:18:16.802947 | controller | self._Serialize(getattr(val, prop.name), prop, currDefNS)
2022-08-24 15:18:16.802950 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 352, in _Serialize
2022-08-24 15:18:16.802953 | controller | self._SerializeDataObject(val, info, attr, currDefNS)
2022-08-24 15:18:16.802956 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 495, in _SerializeDataObject
2022-08-24 15:18:16.802959 | controller | self._Serialize(getattr(val, prop.name), prop, currDefNS)
2022-08-24 15:18:16.802962 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 399, in _Serialize
2022-08-24 15:18:16.802965 | controller | self._Serialize(it, itemInfo, defNS)
2022-08-24 15:18:16.802968 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 352, in _Serialize
2022-08-24 15:18:16.802971 | controller | self._SerializeDataObject(val, info, attr, currDefNS)
2022-08-24 15:18:16.802978 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 495, in _SerializeDataObject
2022-08-24 15:18:16.802982 | controller | self._Serialize(getattr(val, prop.name), prop, currDefNS)
2022-08-24 15:18:16.802985 | controller | File "/home/zuul/venv/lib/python3.10/site-packages/pyVmomi/SoapAdapter.py", line 317, in _Serialize
2022-08-24 15:18:16.802988 | controller | raise TypeError('Field "{0}" is not optional'.format(info.name))
2022-08-24 15:18:16.805868 | controller | fatal: [testhost]: FAILED! => {
2022-08-24 15:18:16.805907 | controller | "changed": false,
2022-08-24 15:18:16.805912 | controller | "invocation": {
2022-08-24 15:18:16.805917 | controller | "module_args": {
2022-08-24 15:18:16.805921 | controller | "advanced_settings": [],
2022-08-24 15:18:16.805926 | controller | "annotation": null,
2022-08-24 15:18:16.805930 | controller | "cdrom": [],
2022-08-24 15:18:16.805934 | controller | "cluster": null,
2022-08-24 15:18:16.805939 | controller | "convert": "thin",
2022-08-24 15:18:16.805947 | controller | "customization": {
2022-08-24 15:18:16.805951 | controller | "autologon": null,
2022-08-24 15:18:16.805955 | controller | "autologoncount": null,
2022-08-24 15:18:16.805959 | controller | "dns_servers": null,
2022-08-24 15:18:16.805963 | controller | "dns_suffix": null,
2022-08-24 15:18:16.805967 | controller | "domain": null,
2022-08-24 15:18:16.805971 | controller | "domainadmin": null,
2022-08-24 15:18:16.805975 | controller | "domainadminpassword": null,
2022-08-24 15:18:16.805979 | controller | "existing_vm": null,
2022-08-24 15:18:16.805984 | controller | "fullname": null,
2022-08-24 15:18:16.805988 | controller | "hostname": null,
2022-08-24 15:18:16.805992 | controller | "hwclockUTC": null,
2022-08-24 15:18:16.805996 | controller | "joindomain": null,
2022-08-24 15:18:16.806000 | controller | "joinworkgroup": null,
2022-08-24 15:18:16.806004 | controller | "orgname": null,
2022-08-24 15:18:16.806008 | controller | "password": null,
2022-08-24 15:18:16.806012 | controller | "productid": null,
2022-08-24 15:18:16.806016 | controller | "runonce": null,
2022-08-24 15:18:16.806020 | controller | "timezone": null
2022-08-24 15:18:16.806024 | controller | },
2022-08-24 15:18:16.806028 | controller | "customization_spec": null,
2022-08-24 15:18:16.806032 | controller | "customvalues": [],
2022-08-24 15:18:16.806036 | controller | "datacenter": "DC0",
2022-08-24 15:18:16.806040 | controller | "datastore": null,
2022-08-24 15:18:16.806044 | controller | "delete_from_inventory": false,
2022-08-24 15:18:16.806048 | controller | "disk": [],
2022-08-24 15:18:16.806052 | controller | "esxi_hostname": null,
2022-08-24 15:18:16.806056 | controller | "folder": "vm",
2022-08-24 15:18:16.806061 | controller | "force": false,
2022-08-24 15:18:16.806065 | controller | "guest_id": null,
2022-08-24 15:18:16.806069 | controller | "hardware": {
2022-08-24 15:18:16.806073 | controller | "boot_firmware": null,
2022-08-24 15:18:16.806077 | controller | "cpu_limit": null,
2022-08-24 15:18:16.806081 | controller | "cpu_reservation": null,
2022-08-24 15:18:16.806085 | controller | "hotadd_cpu": null,
2022-08-24 15:18:16.806089 | controller | "hotadd_memory": null,
2022-08-24 15:18:16.806093 | controller | "hotremove_cpu": null,
2022-08-24 15:18:16.806097 | controller | "iommu": null,
2022-08-24 15:18:16.806101 | controller | "max_connections": null,
2022-08-24 15:18:16.806105 | controller | "mem_limit": null,
2022-08-24 15:18:16.806109 | controller | "mem_reservation": null,
2022-08-24 15:18:16.806113 | controller | "memory_mb": null,
2022-08-24 15:18:16.806117 | controller | "memory_reservation_lock": null,
2022-08-24 15:18:16.806121 | controller | "nested_virt": null,
2022-08-24 15:18:16.806125 | controller | "num_cpu_cores_per_socket": null,
2022-08-24 15:18:16.806129 | controller | "num_cpus": null,
2022-08-24 15:18:16.806134 | controller | "scsi": null,
2022-08-24 15:18:16.806138 | controller | "secure_boot": null,
2022-08-24 15:18:16.806142 | controller | "version": null,
2022-08-24 15:18:16.806150 | controller | "virt_based_security": null
2022-08-24 15:18:16.806156 | controller | },
2022-08-24 15:18:16.806160 | controller | "hostname": "vcenter.test",
2022-08-24 15:18:16.806164 | controller | "is_template": false,
2022-08-24 15:18:16.806168 | controller | "linked_clone": false,
2022-08-24 15:18:16.806172 | controller | "name": "test_vm2",
2022-08-24 15:18:16.806176 | controller | "name_match": "first",
2022-08-24 15:18:16.806180 | controller | "networks": [],
2022-08-24 15:18:16.806184 | controller | "nvdimm": {
2022-08-24 15:18:16.806188 | controller | "label": null,
2022-08-24 15:18:16.806192 | controller | "size_mb": 1024,
2022-08-24 15:18:16.806196 | controller | "state": null
2022-08-24 15:18:16.806200 | controller | },
2022-08-24 15:18:16.806204 | controller | "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
2022-08-24 15:18:16.806208 | controller | "port": 443,
2022-08-24 15:18:16.806212 | controller | "proxy_host": null,
2022-08-24 15:18:16.806216 | controller | "proxy_port": null,
2022-08-24 15:18:16.806220 | controller | "resource_pool": null,
2022-08-24 15:18:16.806227 | controller | "snapshot_src": null,
2022-08-24 15:18:16.806231 | controller | "state": "poweredoff",
2022-08-24 15:18:16.806235 | controller | "state_change_timeout": 0,
2022-08-24 15:18:16.806239 | controller | "template": "test_vm1",
2022-08-24 15:18:16.806243 | controller | "use_instance_uuid": false,
2022-08-24 15:18:16.806247 | controller | "username": "[email protected]",
2022-08-24 15:18:16.806251 | controller | "uuid": null,
2022-08-24 15:18:16.806255 | controller | "validate_certs": false,
2022-08-24 15:18:16.806259 | controller | "vapp_properties": [],
2022-08-24 15:18:16.806263 | controller | "wait_for_customization": false,
2022-08-24 15:18:16.806267 | controller | "wait_for_customization_timeout": 3600,
2022-08-24 15:18:16.806271 | controller | "wait_for_ip_address": false,
2022-08-24 15:18:16.806275 | controller | "wait_for_ip_address_timeout": 300
2022-08-24 15:18:16.806279 | controller | }
2022-08-24 15:18:16.806284 | controller | },
2022-08-24 15:18:16.806288 | controller | "msg": "TypeError was returned, please ensure to give correct inputs. Field \"datastore\" is not optional"
@goneri if i define the datastore upon templating, it'll template with the same datastore, so i removed the disklocator.datastore, because without that field when templating, it'll autofill the datastore with the datastores of the VM that it's templating...allowing us to actually template without having a static datastore for all disks.
This check makes sense for creating a VM (however we don't enter that section of the code when creating a VM for scratch, it's only for templating), but for templating a VM, maybe a different way of testing is needed? What do you think? I'm trying a different method to fix this by using disklocator.disk, that allows us to reconfig DS's per disk using a list..i'll maybe try that and see.
Should link this to #353