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 errors occuring during hardware version upgrade not being reported (fixes #2001) #2010

Conversation

Yannik
Copy link
Contributor

@Yannik Yannik commented Feb 27, 2024

SUMMARY

This fixes #2001.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_guest

@Yannik Yannik force-pushed the fix-vm-hardware-version-upgrade-error-not-being-reported branch from 1f79258 to b782c4f Compare September 12, 2024 06:48
@Yannik
Copy link
Contributor Author

Yannik commented Sep 12, 2024

@mariolenz I'd appreciate to get this merged.

@mariolenz
Copy link
Collaborator

Sorry, I've overlooked this PR for far too long. I think we had some changes to the module. Could you please re-base your fork just to make sure there are no merge conflicts?

@Yannik Yannik force-pushed the fix-vm-hardware-version-upgrade-error-not-being-reported branch from b782c4f to b2a4a4c Compare October 29, 2024 17:39
@Yannik
Copy link
Contributor Author

Yannik commented Oct 29, 2024

@mariolenz I have rebased and checked if anything logic-wise changed that impacts this PR. That is not the case.

During reviewing this, I noticed something else. Instead of propagating the error return code up the stack, , it would also be possible to change this line:

return {'changed': self.change_applied, 'failed': True, 'msg': task.info.error.msg, 'op': 'upgrade'}

to a self.module.fail_json.

Which method to fix this do you prefer?

Copy link
Collaborator

@mariolenz mariolenz left a comment

Choose a reason for hiding this comment

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

LGTM

@mariolenz mariolenz added bug This issue/PR relates to a bug mergeit labels Nov 15, 2024
Copy link

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

✔️ ansible-tox-linters SUCCESS in 4m 45s
✔️ build-ansible-collection SUCCESS in 6m 00s
✔️ ansible-galaxy-importer SUCCESS in 5m 17s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 324a44e into ansible-collections:main Nov 15, 2024
13 checks passed
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Nov 15, 2024
SUMMARY
Backport #2010
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
vmware_guest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug mergeit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vmware_guest vm compatibility version upgrade errors not reported correctly
2 participants