all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Jonas Theisen <j.theisen@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output
Date: Fri, 28 Aug 2026 08:31:57 +0200	[thread overview]
Message-ID: <s8objamrc0y.fsf@toolbox> (raw)
In-Reply-To: <20260827154740.427154-1-j.theisen@proxmox.com> (Jonas Theisen's message of "Thu, 27 Aug 2026 17:47:32 +0200")

Jonas Theisen <j.theisen@proxmox.com> writes:

> Currently running tasks are returned by the PBS API in the query
> for errored tasks.
> This patch adds an additional condition to filter out running tasks
> when queried for errored tasks.
>
> Reported in https://forum.proxmox.com/threads/163872/,
> https://forum.proxmox.com/threads/185999/ and
> https://bugzilla.proxmox.com/show_bug.cgi?id=6251
>
> Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
> ---
>  src/api2/node/tasks.rs | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/api2/node/tasks.rs b/src/api2/node/tasks.rs
> index 96f5e080f..4786820a3 100644
> --- a/src/api2/node/tasks.rs
> +++ b/src/api2/node/tasks.rs
> @@ -610,6 +610,7 @@ pub fn list_tasks(
>              (Some(state), Some(filters)) if !filters.contains(&tasktype(state)) => {
>                  continue;
>              }
> +            (None, _) if errors => continue,
>              (None, Some(_)) => continue,
>              _ => {}
>          }

What I tested:

>From one terminal:

    proxmox-backup-manager garbage-collection start <datastore>

before the task finished, from another terminal:

    proxmox-backup-debug api get /nodes/$(hostname)/tasks --limit 3 --errors true

Without this patch, the GC task would show in the task list even though
it does not have errors. This is addressed by the patch.

lgtm.

Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Maximiliano Sandoval <m.sandoval@proxmox.com>

-- 
Maximiliano




  reply	other threads:[~2026-08-28  6:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 15:47 [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output Jonas Theisen
2026-08-28  6:31 ` Maximiliano Sandoval [this message]
2026-08-28  7:09 ` Christian Ebner
2026-08-28 15:54   ` Jonas Theisen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s8objamrc0y.fsf@toolbox \
    --to=m.sandoval@proxmox.com \
    --cc=j.theisen@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal