[pve-devel] [PATCH v2 manager 1/3] task index: allow selection of task source(s)

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jan 11 18:13:07 CET 2019


On Thu, Jan 10, 2019 at 07:16:46PM +0100, Thomas Lamprecht wrote:
> On 1/9/19 2:04 PM, Fabian Grünbichler wrote:
> > otherwise there is no way to find out about (all) active tasks over the
> > API if their UPIDs were not recorded when the initial API calls happened.
> > 
> > Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> > ---
> > changed from v1:
> > - moved from bool to tri-state as suggested by W.Bumiller
> > - previously called 'task index: optionally include active tasks'
> 
> When starting a backup task and doing:
> 
> # pvenode task list --source active

forgot that we had that ;) I only tested with the API endpoint directly.

> 
> I get:
> > Use of uninitialized value in string ne at /usr/share/perl5/PVE/CLI/pvenode.pm line 168.
> 
> We access $task->{status} in the CLI output parser, and this is not defined there
> yet for (still) running task. Besides the uninitialized value warning this then shows
> even "ERROR" in the Status column for all running tasks. You may want to adapt the
> output formatter to print RUNNING if no status is defined in this patch? And then
> maybe it's warranted to split the refactor $filter_task out and introduce "source"
> parameter into two patches out, but no strong feelings here..

it might be best to introduce a new return property 'source', and then
set the status to RUNNING or UNKNOWN depending on source (and maybe
print source as well?)

thanks for your review!




More information about the pve-devel mailing list