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

stable-4.x: vmware_vmotion: Catch no placement recommendation #2210

Conversation

mariolenz
Copy link
Collaborator

SUMMARY

Backport of #2208

I think there's a problem here:

if self.host_object is None:
self.host_object = placement.recommendations[0].action[0].targetHost
if self.datastore_object is None:
self.datastore_object = placement.recommendations[0].action[0].relocateSpec.datastore

If vSphere doesn't give a recommendation, this might result in a list index out of range error.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_vmotion

ADDITIONAL INFORMATION

#2209

@mariolenz
Copy link
Collaborator Author

recheck

@mariolenz
Copy link
Collaborator Author

recheck

Copy link

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/3c80e9f7372f4558a96a60a6b757a25f

✔️ ansible-tox-linters SUCCESS in 4m 36s
✔️ build-ansible-collection SUCCESS in 5m 52s
✔️ ansible-galaxy-importer SUCCESS in 4m 07s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 2dc44f8 into ansible-collections:stable-4.x Oct 20, 2024
17 checks passed
@mariolenz mariolenz deleted the stable-4.x_backport2208 branch October 20, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant