* [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; 4+ 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] 4+ 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; 4+ 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] 4+ 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
2026-08-28 15:54 ` Jonas Theisen
1 sibling, 1 reply; 4+ 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] 4+ messages in thread
* Re: [PATCH proxmox-backup] fix #6251: api: Remove running tasks from errors output
2026-08-28 7:09 ` Christian Ebner
@ 2026-08-28 15:54 ` Jonas Theisen
0 siblings, 0 replies; 4+ messages in thread
From: Jonas Theisen @ 2026-08-28 15:54 UTC (permalink / raw)
To: pbs-devel
On 8/28/26 09:10, Christian Ebner wrote:
> -snip-
>
> 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
I've now checked the behavior on all four platforms.
For PVE the tasks endpoint is just run against finished tasls [1] and
only returns tasks with errors as intended.
For PDM there are two patches [2], one for the PDM internal tasks
API since it has the same problem as the PBS API.
The additional one aligns the fetched tasks from PVE to the ones
from PBS and PDM alike since the linked filter logic in [0] already
works for these types of running tasks.
PMG also does not return running tasks, so nothing to do.
[1]
https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/API2/Tasks.pm;h=df39dc77c2c0bbd917431be4881d654a50b72a21;hb=HEAD#l39
[2]
https://lore.proxmox.com/pdm-devel/20260828155110.563237-1-j.theisen@proxmox.com/T/#t
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-28 15:54 UTC | newest]
Thread overview: 4+ 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
2026-08-28 15:54 ` Jonas Theisen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox