[pbs-devel] [PATCH proxmox/proxmox-backup] add 'pbs-shell' tool
Dominik Csapak
d.csapak at proxmox.com
Mon Sep 13 12:38:06 CEST 2021
thanks for testing!
On 9/13/21 11:36, Hannes Laimer wrote:
> I just noticed two things while testing:
> - if an endpoint expects a parameter called 'path'(e.g. POST /config
> /datastore), the parameter conflicts with the api path itself
i'll fix it in the v2 by renaming the variable to 'api-path'. or
should i prefix it with 'pbs-shell' or something?
(it must be something that will not occur in the normal api)
> - even though commands like verify(POST /admin/datastore/<name>/verify)
> or gc(POST /admin/datastore/<name>/gc) are started and run successfully,
> `Error: control socket connect failed - Connection refused (os error
> 111)` is displayed almost always at the end.
after looking at/testing the code a bit closer, i noticed it cannot
currently work as i do it:
* pbs-shell starts a worker
* pbs-shell connects to 8007 for the log
* proxy tries to query the worker status via command socket, which
does not exists for the pbs-shell
i'll have to display the task log manually from the pbs-shell
and wait for the worker to finish
while i think it *would* be better if we let the proxy/daemon
start the worker, there is no way to detect api calls
that start a worker before actually executing it...
since it's *only* a debug tool, its still fine i think..
alternatively, we can switch to a http client for executing
the api entirely...
>
> Note: For testing I applied the patches on
> b65dfff574f44e5a60db3903d2226f4dbe386b7a, I assume the moving of stuff
> after that should not effect the functionality
>
i'll rebase onto master for the v2
More information about the pbs-devel
mailing list