all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] remote tasks: correctly filter out foreign running PBS tasks
Date: Mon, 17 Nov 2025 16:35:10 +0100	[thread overview]
Message-ID: <20251117153509.390137-2-l.wagner@proxmox.com> (raw)

At the moment, only tasks started by PDM will ever show up as 'active' -
mostly to avoid having to regularly poll foreign (as in, not started by
PDM) tasks. If we included running tasks in the task cache, they could
appear as 'stuck' for up to one poll interval, even if they ran only for
a couple of seconds.

This commit fixes a mistake when checking whether the task is still
running or not. Before, we *only* included running tasks, which is the
opposite of what we want.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs b/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
index 92f0f241..d3c8395e 100644
--- a/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
+++ b/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
@@ -301,7 +301,7 @@ async fn fetch_tasks_from_single_node(
                 .await?
                 .into_iter()
                 .filter_map(|task| {
-                    if task.endtime.is_none() {
+                    if task.endtime.is_some() {
                         // We only care about finished tasks.
                         Some(map_pbs_task(task, remote.id.clone()))
                     } else {
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


             reply	other threads:[~2025-11-17 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 15:35 Lukas Wagner [this message]
2025-11-19  8:33 ` [pdm-devel] applied: " Thomas Lamprecht

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=20251117153509.390137-2-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pdm-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