community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

community.vmware.vmware_guest_disk - not the configured datacenter

Open yakhatape opened this issue 11 months ago • 8 comments

yakhatape avatar Mar 08 '24 11:03 yakhatape

@yakhatape collection version 2.x no longer supported, please update it to latest and try run playbook again.

ihumster avatar Mar 08 '24 12:03 ihumster

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

yakhatape avatar Mar 08 '24 12:03 yakhatape

@ihumster the error still the same : msg: Get datastore 'vsanDatastore' in datacenter 'datacenterovh1', not the configured datacenter 'datacenterovh2'

Wit following setup :

Collection       Version
---------------- -------
community.vmware 4.2.0

Do you have any idea ?

yakhatape avatar Mar 08 '24 12:03 yakhatape

@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 avatar Mar 08 '24 12:03 ihumster

@ihumster the module shouldn't verify the uuid/id of the object or something like that ?

yakhatape avatar Mar 08 '24 12:03 yakhatape

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

ihumster avatar Mar 08 '24 12:03 ihumster

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

yakhatape avatar Mar 08 '24 14:03 yakhatape

@ihumster , isn't possible to change the code to take datacenter as parameter of the self module datacenter parameter ?

something like this : self.parent_datacenters = {}

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

yakhatape avatar Mar 08 '24 15:03 yakhatape