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

Fix issue with duplicate custom attribute names #414

Merged
merged 4 commits into from
Oct 1, 2020

Conversation

mariolenz
Copy link
Collaborator

SUMMARY

When running a task with vmware_guest_custom_attributes, if the name of any attribute already exists as a HostSystem attribute, the module will crash with an unhandled exception.

Fixes #412

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_guest_custom_attributes

ADDITIONAL INFORMATION

When there are two custom attributes named foo, one for VMs and one for ESXi hosts, the module might try to set the host custom attribute on the VM and crash.

…tom attributes with the same name for other object types
@mariolenz
Copy link
Collaborator Author

@Akasurde @goneri Can one of you please have a quick look at this PR? Its quite a simple one but I don't want to merge it without getting a second opinion from someone else.

Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Akasurde
Copy link
Member

Akasurde commented Oct 1, 2020

@mariolenz Thanks for the fix. I updated the code a bit. Will merge once CI is green.

@Akasurde Akasurde self-assigned this Oct 1, 2020
@mariolenz
Copy link
Collaborator Author

recheck

@mariolenz
Copy link
Collaborator Author

@Akasurde

Will merge once CI is green.

CI had a problem, but I ran it again and it's green now. I'll add the gate label.

@mariolenz
Copy link
Collaborator Author

@Akasurde fyi: ansible/ansible#72058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants