-
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
int() argument must be a string, a bytes-like object or a number, not 'NoneType' #3844
Comments
Files identified in the description:
If these files are incorrect, please update the |
This issue is resolved following a full system reboot of proxmox. Cannot say for other systems but it should be noted in the community docs if anyone else can replicate this error. EDIT: this was a false positive. System reboot did not restore. See below. |
I spoke too soon. It appears incapable of creating a new container. If I use the following playbook:
It will return "ok", HOWEVER a container at id 810 already exists on the proxmox installation. Which means two things:
Altering this number exactly to any other number not yet assigned to a VM or container returns the error in OP. This example comes directly from the examples in your docs. |
Anyone going to address this? Not expecting an immediate fix, but this error renders Ansible completely useless in Proxmox. |
Nobody seems to be working on this. I think this is caused because you don't set the Changing line 608 to onboot=int(module.params['onboot']) if module.params['onboot'] is not None else None, should fix it (assuming my guess is correct). |
Wouldn't it be slightly better to add |
No, because we just spent quite some amount of work to get rid of that default. |
Could we do |
No, for exactly the same reason: that would re-introduce the default. |
Oh right of course haha I totally read that wrong. What about making |
That's a breaking change and will not be accepted without a long deprecation period. |
Technically yes? But also isn't that kind of a moot point as this is a major bug which results in this value needing to be set as a workaround (tested and confirmed) regardless? Else it doesn't work at all? Either way, software development protocol yadda yadda... all good, I gets how it be 😅 Ok cool, so should we define that as a workaround? For now we note that without defining this value, it throws this error and won't work. |
If someone wants to touch the module, how about simply fixing the bug, instead of adding some other random restriction which will avoid the bug to happen? Fixing the bug requires less effort (considering possible deprecations, required documentation, explanation in changelog etc.) than all the other things proposed here. |
Happy to do that, but do you have a known solution? Do we know what the fundamental issue is under the hood? If not, then I don't have the resources atm to commit for known unknowns. From my pov, it's simply easier to push through the deprecation cycle and stick with a workaround. Either way, the workaround exists in the interim. |
I'm pretty sure #3844 (comment) fixes the issue (since the fundamental reason is that |
We seem to be going in circles. That solution is unfortunately out of the question, given the removal of default behaviour which I happen to agree with at the very least from a maintainer's pov. Making this flag mandatory has other benefits in terms of basic operations hygene and makes sense also from the Ansible/config mgmt pov. Does it boot? Does it not boot? Unacceptable unknown imo. Setting should be forced on the user. Deprecation cycles aren't so bad, workarounds are very normal. |
I don't understand what you are saying. The comment I linked to is handling the option correctly when it is not provided by the user. |
Oh sorry, I'm really not reading properly today. Well no, coz the error is related to passing through |
Please look closely. |
I can pick this up later today. I'll add the inverse operation of community.general/plugins/module_utils/proxmox.py Lines 52 to 54 in 80d650f
EDIT: By inverse I mean True -> 1, False -> 0, None -> None. |
I was operating under the assumption that the value passed to |
Summary
When I try to create a container on Proxmox, it fails saying that "fatal: [central.local]: FAILED! => {"changed": false, "msg": "creation of lxc VM 810 failed with exception: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"}"
Issue Type
Bug Report
Component Name
community.general.proxmox
Ansible Version
Community.general Version
Configuration
OS / Environment
Arch Linux in LXC on Proxmox (although I get the exact same errors running from a bare-metal install of Arch Linux)
Steps to Reproduce
Expected Results
I expect it to connect and create a container.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: