-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community.vmware.vmware_guest_disk - not the configured datacenter #2021
Comments
@yakhatape collection version 2.x no longer supported, please update it to latest and try run playbook again. |
Thanks @ihumster for feedback make sense, I've upgrade my ansible core to 2.13.3 to avoid issue of the collection api download and upgrade the vmware collection. My deploiment is in progress I will give a feedback asap |
@ihumster the error still the same : Wit following setup :
Do you have any idea ? |
@yakhatape I looked at the module code and I believe that the problem is that the clusters have the same datastore names. If possible, rename one of them and try running the playbook again. |
@ihumster the module shouldn't verify the uuid/id of the object or something like that ? |
@yakhatape You specify the name of the datastore in the playbook, the module looks for the first occurrence of the name among the datastore, and then later checks it to see if it belongs to the datacenter. In any case, he will not be able to distinguish datastores by name. |
Yep I understand about the datastore name check, but the code who is checking the parent item should not the wrong datacenter. But let imagine you have multiple datacenter/Cluster on your vmware with a shared vsan , all datastore will have the same name so the code will crash the same error ... |
@ihumster , isn't possible to change the code to take datacenter as parameter of the self module datacenter parameter ? something like this : Because i dont understand why the module should call a helper to retrieve the parent datacenter when the datacenter parameter is directly instanciate into the playbook module. Maybe im wrong .. |
When we have multiple vSphere Datacenter ex : datacenterovh1 , datacenterovh2 ; both composed of cluster named "Cluster1" and Datastore named "vsanDatastore" we are facing the following error :
msg: Get datastore 'vsanDatastore' in datacenter 'datacenterovh1', not the configured datacenter 'datacenterovh2'
ISSUE TYPE
COMPONENT NAME
vmware_guest_disk
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
Requirement :
1 vSphere
2 Datacenter : datacenterovh1 , datacenterovh2
Each Datacenter Cluster named with the same name: "Cluster1"
Each Datacenter Datastore named with the same name: "vsanDatastore"
During the play the value of vsphere_datacenter = datacenterovh2
EXPECTED RESULTS
Ansible vmware module should find the vsanDatastore object from the datacenterovh2 instead of datacenterovh1
ACTUAL RESULTS
Ansible vmware find the vsanDatastore object from the datacenterovh1 instead of datacenterovh2 passing in through var into the tasks
Code which return the error :
community.vmware/plugins/modules/vmware_guest_disk.py
Line 959 in b6080ba
and the datastore value it passing to the helper :
community.vmware/plugins/module_utils/vmware.py
Line 253 in b6080ba
The text was updated successfully, but these errors were encountered: