mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #117] returning invalid task ID from VM start command #62
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#62
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 @vakabus on GitHub (Nov 3, 2022).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/117
Hi, I've found a weird behavior which I am assuming is a bug. I am not sure if it's related to the library or Proxmox API itself, I am posting it just here for now.
What happens
When I run:
the return value of the last command is:
What I would expect
I would expect just the string
UPID:tapir:00128784:028D7FB7:6363E6E9:qmstart:500:root@pam:being returned.@jhollowe commented on GitHub (Nov 3, 2022):
I'm 99% sure this is an issue with PVE, but just to check can you try the same thing with the
httpsbackend? This might be an issue where the CLI for the API (which is what theopensshbackend uses) prints extra information when using cloud-init.@vakabus commented on GitHub (Nov 3, 2022):
I can confirm that with the
httpsbackend it works as expected and only the task id is returned.@jhollowe commented on GitHub (Nov 3, 2022):
yeah, than this is a Proxmox issue. You can ask about the issue on the official forums or just directly file a PVE bug
@BioSehnsucht commented on GitHub (Nov 28, 2022):
This issue also occurs in local mode (which is more or less SSH backend without the SSH).
I guess Proxmox shouldn't return an informative message as an error, so it really is a Proxmox issue, but the VM does actually start without any issues as far as I can tell, so of course, that's confusing.
For reference, I see that this has been reported to Proxmox : https://bugzilla.proxmox.com/show_bug.cgi?id=4333
Seems to be messages are being output to STDOUT rather than STDERR or added to the JSON properly.
@reitermarkus commented on GitHub (Nov 28, 2022):
To be clear, Proxmox outputs the message to STDOUT, which leads to Proxmoxer trying to parse both the message line and the following JSON line as JSON.
While this is of course a Proxmox issue, and has already reported, it would still make sense in my opinion to work around it in Proxmoxer until an official fix has been released, since as least Proxmox 7.2 and 7.3 are affected by this now.
As far as I can tell, it should be as simple as trying parsing only the last line as JSON if parsing fails the first time on the affected Proxmox versions. Basically what I did at https://github.com/ansible-collections/community.general/pull/4027/files#diff-e0436e452ddd5c8a44426d18198373fd4f991b98348e497741e111495defaf47R1023-R1025, but more generally applied to all Proxmoxer calls.