community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Send string instead of boolean to proxmox api

Open alxhlz opened this issue 3 years ago • 1 comments
trafficstars

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

alxhlz avatar Aug 30 '22 12:08 alxhlz

cc @Ajpantuso @Thulium-Drake @helldorado @joshainglis @karmab @tleguern click here for bot help

ansibullbot avatar Aug 30 '22 12:08 ansibullbot

Docs Build 📝

Thank you for contribution!✨

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

github-actions[bot] avatar Oct 23 '22 14:10 github-actions[bot]

CI failures are unrelated.

felixfontein avatar Oct 23 '22 16:10 felixfontein

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.

patchback[bot] avatar Oct 23 '22 16:10 patchback[bot]

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

felixfontein avatar Oct 23 '22 16:10 felixfontein