-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
proxmox inventory: fix for agent enabled #4910
proxmox inventory: fix for agent enabled #4910
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
After looking soberly at the code. Why not just skip the check if agent is enabled or not? It won't crash or anything, just leave an empty list. ping @Thulium-Drake |
Perhaps, though I'm not sure about the performance/running time hit if you 'just' ask for a host's interface addresses on a larger cluster. :-) In my case, I don't use this functionality at all (I use LXC on my home system almost exclusively), I mostly want a list of hostnames and resolve them using DNS. But, if the complexity isn't worth it (and it might not be), I'm all for simpler code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Could you please add a changelog fragment? Thanks.
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
I'll spin up ~100 vms and test. :)
I'll have a look at it this summer and make a new PR if there are none to little impact. |
Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
Some (newer?) instances of proxmox uses "enabled=1" instead of just "1" in the agent config line. This fix adds ´agent_enabled´, checks if the first field is int; if so, set it to value. If not check if string equals "enabled=1" to set it ´agent_enabled´ to 1. Without this fix the inventory would be empty.
ISSUE TYPE
COMPONENT NAME
community.general.proxmox
ADDITIONAL INFORMATION