mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #64] proxmoxer agent exec-status and "out-data" #32
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#32
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 @enimath on GitHub (Aug 2, 2021).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/64
Hello
How can i type "out-data" to see output of command ?
code :
it only print {'exited': 0} without "out-data" which I need (it should be /dev/sdb)
I can read that in exec-status out-data is optional so I thing I need to turn it on somehow.
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/agent/exec-status
@enimath commented on GitHub (Aug 2, 2021):
pvesh show everything :
@enimath commented on GitHub (Aug 18, 2021):
I thing there should be some python workaround to omit this "-" in "out-data". Anyone ?
@jhollowe commented on GitHub (Sep 7, 2021):
This is an issue with usage. The
exited: 0means that the command has not completed yet. You need to either poll the API until you getexited: 1and all the data, or let whatever is calling the function handle the incomplete data.Below is a version of the function that defaults to blocking (waiting) for the results but can be given an argument to be non-blocking. I've used the
sleepcommand to show a program that we know will take some time to complete, just replace with your command and it should be fine.and running
print(test = agent_get_swap("node_name",103))shows{'exitcode': 0, 'exited': 1}(there is no output thus noout-data, but a command with output will includeout-data)If this solved your problem, please close the issue; if you have further questions, please ask!
@jhollowe commented on GitHub (Oct 2, 2021):
Assuming this is resolved. Please reopen if it is not.