community.general
community.general copied to clipboard
Send string instead of boolean to proxmox api
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
cc @Ajpantuso @Thulium-Drake @helldorado @joshainglis @karmab @tleguern click here for bot help
Docs Build 📝
Thank you for contribution!✨
This PR has been merged and your docs changes will be incorporated when they are next published.
CI failures are unrelated.
Backport to stable-5: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-5/b9d08649578e8a5838e532cd5f04e0ee031e13e1/pr-5198
Backported as https://github.com/ansible-collections/community.general/pull/5417
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@alxhlz thanks for your contribution! @castorsky thanks for reviewing!