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

Send string instead of boolean to proxmox api #5198

Merged
merged 3 commits into from Oct 23, 2022

Conversation

alxhlz
Copy link
Contributor

@alxhlz alxhlz commented Aug 30, 2022

SUMMARY

In this commit the parameter sent to proxmox api has been changed from type bool to type string but instead of converting the boolean into a value that is readable by the proxmox api it just sends a string containing 'True' or 'False' to the pve api. According to specification proxmox expects a '1' or a '0' as content of the agent parameter.

This bug resulted in failing vm creations:

fatal: [vm-template -> localhost]: FAILED! => {"changed": false, "msg": "creation of qemu VM test with vmid 171 failed with exception=400 Bad Request: Parameter verification failed. - {'agent': \"invalid format - format error\\nagent.enabled: type check ('boolean') failed - got 'True'\\n\"}", "vmid": "171"}
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

proxmox_kvm

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Aug 30, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

I don't think this is necessary, since the bug you are probably experiencing was already fixed in #5194.

If that is not fixing the bug for you, then I don't think the parameter ever worked for you before.

plugins/modules/cloud/misc/proxmox_kvm.py Outdated Show resolved Hide resolved
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Sep 7, 2022
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Sep 18, 2022
@ansibullbot ansibullbot added has_issue and removed small_patch Hopefully easy to review stale_ci CI is older than 7 days, rerun before merging labels Oct 23, 2022
@github-actions
Copy link

github-actions bot commented Oct 23, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Oct 23, 2022
@felixfontein
Copy link
Collaborator

CI failures are unrelated.

@felixfontein felixfontein merged commit b9d0864 into ansible-collections:main Oct 23, 2022
@patchback
Copy link

patchback bot commented Oct 23, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/b9d08649578e8a5838e532cd5f04e0ee031e13e1/pr-5198

Backported as #5417

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Oct 23, 2022
patchback bot pushed a commit that referenced this pull request Oct 23, 2022
* Send string instead of boolean to proxmox api

* Add changelog fragment.

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: castorsky <csky57@gmail.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: castorsky <csky57@gmail.com>
(cherry picked from commit b9d0864)
@felixfontein
Copy link
Collaborator

@alxhlz thanks for your contribution!
@castorsky thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Oct 23, 2022
* Send string instead of boolean to proxmox api

* Add changelog fragment.

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: castorsky <csky57@gmail.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: castorsky <csky57@gmail.com>
(cherry picked from commit b9d0864)

Co-authored-by: Alexander Holzapfel <git@hlz.io>
russoz pushed a commit to russoz-ansible/community.general that referenced this pull request Nov 5, 2022
* Send string instead of boolean to proxmox api

* Add changelog fragment.

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: castorsky <csky57@gmail.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: castorsky <csky57@gmail.com>
This was referenced Nov 20, 2022
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 cloud has_issue module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants