Skip to content
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

vmware_vm_vm_drs_rule lacks datacenter argument #2101

Closed
flodabo opened this issue Jun 25, 2024 · 0 comments · Fixed by #2102
Closed

vmware_vm_vm_drs_rule lacks datacenter argument #2101

flodabo opened this issue Jun 25, 2024 · 0 comments · Fixed by #2102

Comments

@flodabo
Copy link
Contributor

flodabo commented Jun 25, 2024

SUMMARY

the vmware_vm_vm_drs_rule has no argument to specify the target datacenter like for example the vmware_vm_host_drs_rule

this can lead to errors if the cluster_name is not unique within the vcenter.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_vm_vm_drs_rule

ANSIBLE VERSION
not relevant
COLLECTION VERSION
Collection       Version
---------------- -------
community.vmware 4.4.0

CONFIGURATION
not relevant
OS / ENVIRONMENT

Target: vSphere 8.0.2

STEPS TO REPRODUCE

have a vcenter with multiple datacenters
have two clusters with the same name in different datacenters
create a vm_vm_drs_rule for each cluster

EXPECTED RESULTS

vm_vm_drs_rule rules get created

ACTUAL RESULTS

vm_vm_drs_rule for one of the clusters fail with message
Failed to find the virtual machine <<first_vm_name>> in the given cluster <<cluster_name>>

softwarefactory-project-zuul bot pushed a commit that referenced this issue Jul 21, 2024
SUMMARY

Add datacenter argument to vmware_vm_vm_drs_rule module
Code adjustments copy-pasted from vmware_vm_host_drs_rule module

Fixes #2101
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

vmware_vm_vm_drs_rule
ADDITIONAL INFORMATION

Previously no datacenter could be provided. The result was that the module always tried to create/manage rules in the first cluster in vcenter that matches the name.
Now a datacenter name can be provided if nessessary.

Reviewed-by: Mario Lenz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant