mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #87] Error 500 with proxmox 7 - JSON response into exception #45
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @samyscoub on GitHub (Feb 7, 2022).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/87
Originally assigned to: @jhollowe on GitHub.
With proxmox 7 my previous working code on proxmox 6 doesn't work anymore.
Problem is also present with python3
Distribution is Debian 11 ( proxmox 7 : pve-manager/7.1-10/6ddebafe (running kernel: 5.13.19-3-pve) )
Proxmoxer 1.2.0 release
Json Response seems to be good but printed as Exception.
What's the problem with Proxmox 7 ?
@jhollowe commented on GitHub (Feb 17, 2022):
Can we get a full code example (of course with credentials redacted) so we can see the whole picture?
When I try running the for loop seen above, it works.
@samyscoub commented on GitHub (Feb 19, 2022):
@jhollowe : here is my code :
@jhollowe commented on GitHub (Feb 20, 2022):
Using your code above (except with my PVE's IP and specifying a private_key_file), the same PVE version, python 3.9.10, and paramiko 2.9.2 I get the list of VMs and containers printed successfully (from both nodes in my cluster).
What version of python and paramiko are you using? You can get this information from
python --versionandpip freeze.I would suggest trying to run the commands against one of the other nodes in your cluster to see if it responds correctly. You can also directly run
pvesh get /cluster/resources -type 'vm' --output-format jsonon the node you are connecting to and make sure the output is correct and the exit code is 0.If you are still having problems, reply with what steps you took and what the results were and we can continue troubleshooting this.
@samyscoub commented on GitHub (Feb 20, 2022):
This command return good result ( exit 0 ) :
My versions :
I supposed that
proxmox.cluster.resources.get(type='vm')return bad format ( array style instead of json style ) don't you know ?@samyscoub commented on GitHub (Feb 20, 2022):
I tried to upgrade
paramikoto 2.9.2 , but not a better result@jhollowe commented on GitHub (Feb 21, 2022):
I've added debug output to the 1.2.0 codebase which outputs the command being run and its stdout and stderr output. Install it with
pip install --upgrade git+https://github.com/jhollowe/proxmoxer.git@issue-87and try running again. That will give you the raw string output of the command. We can then see if it is somehow faulty output from PVE or if proxmoxer is interpereting it wrong.You can also use the latest development branch (installed via
pip install --upgrade git+https://github.com/proxmoxer/proxmoxer.git@develop) and see if the issue persists with that code.@samyscoub commented on GitHub (Feb 21, 2022):
@jhollowe : here is the result from your release branch :
same thing with
developbranch@jhollowe commented on GitHub (Feb 21, 2022):
The
open terminal failed: not a terminalmakes me think this is something with your terminal configuration. I suggest resetting your.bashrcand.profileto the defaults (should be in/etc/skel/) and see if that fixes it. It looks like PVE is working correctly and proxmoxer is working correctly, but something is adding the error line to the shell and thus proxmoxer sees it as an error. This error info should be presented to the user somehow so that will go on the to-do list, but this case seems to be an issue with your specific setup.@jhollowe commented on GitHub (Mar 12, 2022):
Closing due to solved with no response. Please reopen if that solution did not solve your issue.
@samyscoub commented on GitHub (Apr 1, 2022):
@jhollowe : I've found the problem : when you have a down node from a cluster, proxmoxer library failed with this kind of error. When all nodes are aonline no problem. Maybe you can check that use case on your side ?
@jhollowe commented on GitHub (May 14, 2022):
I have not been able to reproduce these errors in my testing. I'm going to close this for now since trying to support every weird thing that happens with a degraded cluster is not feasible.