From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 0/6] fix #7639: task cache: consider running tasks when updating the cutoff timestamp
Date: Fri, 29 May 2026 15:39:45 +0200 [thread overview]
Message-ID: <20260529133951.326103-1-l.wagner@proxmox.com> (raw)
At the moment, PDM only polls finished tasks from remote nodes.
Considering two tasks:
A: starts at 100, ends at 300
B: starts ad 150, ends at 200
If PDM polls the node at t = 250, it would see that B has finished and
update the cutoff timestamp for the next poll to 150. However, since A
has a starttime of 100, and the cutoff determines the minimum starttime
of tasks to retrieve from the remote via the API, PDM would never fetch
task A, leading to gaps in the task archive.
The solution is to fetch all tasks, running and finished, and then
update the cutoff with the oldest running active task in mind.
A side effect is that we now also return foreign (as in, not started by
PDM) running tasks from the API, which makes them appear in the UI as
well. This was always intended as a future extension anyways, so this
should be okay.
To avoid polled active tasks appearing as 'stuck' until the next regular poll,
we also lower the interval in which we poll foreign active tasks to 30 seconds.
NOTE to testers/reviewers:
An easy way to observe the previously missing tasks is to use the 'Guest
Console' as a task with manually controllable duration.
For instance:
- Start console for VM 100 in the PVE Web UI
- Start console for VM 101 in the PVE Web UI
-> both start a task that runs as long as the browser actively shows the console
- Close console for VM 101
- Force-refresh the task view in PDM
-> the console task for VM 101 should now appear (it is finished)
- Close console for VM 100
- Force-refresh the task view in PDM
-> the console task does NOT show up, since the cutoff has already been set
to the start time of the task for VM 101, which started *later*
Reported in the community forum:
https://forum.proxmox.com/threads/180317/
proxmox-datacenter-manager:
Lukas Wagner (6):
pdm-api-types: add NativeUpid::node() convenience getter
task cache: tests: allow to provide an explicit end time in 'task'
helper
task cache: tests: add get_cutoff helper
task cache: tests: add 'make_cache' convenience helper
fix #7639: task cache: consider running tasks when updating the cutoff
timestamp
task cache: poll known active tasks every 30 seconds
lib/pdm-api-types/src/remote_upid.rs | 10 +
server/src/remote_tasks/refresh_task.rs | 13 +-
server/src/remote_tasks/task_cache.rs | 252 ++++++++++++++----------
3 files changed, 159 insertions(+), 116 deletions(-)
Summary over all repositories:
3 files changed, 159 insertions(+), 116 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-05-29 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 13:39 Lukas Wagner [this message]
2026-05-29 13:39 ` [PATCH datacenter-manager 1/6] pdm-api-types: add NativeUpid::node() convenience getter Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 2/6] task cache: tests: allow to provide an explicit end time in 'task' helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 3/6] task cache: tests: add get_cutoff helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 4/6] task cache: tests: add 'make_cache' convenience helper Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 5/6] fix #7639: task cache: consider running tasks when updating the cutoff timestamp Lukas Wagner
2026-05-29 13:39 ` [PATCH datacenter-manager 6/6] task cache: poll known active tasks every 30 seconds Lukas Wagner
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=20260529133951.326103-1-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.