all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output
@ 2026-08-27 15:47 Jonas Theisen
  2026-08-28  6:31 ` Maximiliano Sandoval
  2026-08-28  7:09 ` Christian Ebner
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-08-27 15:47 UTC (permalink / raw)
  To: pbs-devel

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,
             _ => {}
         }
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output
  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
  2026-08-28  7:09 ` Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2026-08-28  6:31 UTC (permalink / raw)
  To: Jonas Theisen; +Cc: pbs-devel

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output
  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
@ 2026-08-28  7:09 ` Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2026-08-28  7:09 UTC (permalink / raw)
  To: Jonas Theisen, pbs-devel

On 8/27/26 5:48 PM, Jonas Theisen wrote:
> 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,
>               _ => {}
>           }

Thanks for the patch! Did you also check the task filter implementations 
in PVE/PDM?

At least for PDM there is some analogous logic [0] which at first glance 
requires adaption as well. Note that there it is shared for PVE and PBS.

[0] 
https://git.proxmox.com/?p=proxmox-datacenter-manager.git;a=blob;f=server/src/remote_tasks/mod.rs;h=5fba867dfc675970ebc5037165f49efee439f545;hb=HEAD#l143




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-28  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-08-28  7:09 ` Christian Ebner

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