From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager v7 7/7] remote tasks: log error in case of task panic, instead of cancelling all tasks
Date: Wed, 20 Aug 2025 14:43:29 +0200 [thread overview]
Message-ID: <20250820124329.220124-8-l.wagner@proxmox.com> (raw)
In-Reply-To: <20250820124329.220124-1-l.wagner@proxmox.com>
Should hopefully never happen, but for cases like these we still want to
to persist the tasks from other nodes instead of failing completely.
Also remove the `set_node_failure` function for NodeFetchSuccessMap. For
panic'd tasks we don't have a straightforward way to get the node name,
and we only ever check for success any way, not failure.
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
Notes:
New in v7.
server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs | 5 +++--
server/src/remote_tasks/task_cache.rs | 5 -----
2 files changed, 3 insertions(+), 7 deletions(-)
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 4701a935..04c51dac 100644
--- a/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
+++ b/server/src/bin/proxmox-datacenter-api/tasks/remote_tasks.rs
@@ -411,10 +411,11 @@ async fn fetch_tasks(
}
Err(error) => {
log::error!("could not fetch tasks: {error:#}");
- node_results.set_node_failure(remote.id.clone(), node_name);
}
},
- Err(err) => return Err(err.into()),
+ Err(error) => {
+ log::error!("could not join task fetching task: {error:#}");
+ }
}
}
}
diff --git a/server/src/remote_tasks/task_cache.rs b/server/src/remote_tasks/task_cache.rs
index 1afeaee4..e9e708e4 100644
--- a/server/src/remote_tasks/task_cache.rs
+++ b/server/src/remote_tasks/task_cache.rs
@@ -188,11 +188,6 @@ impl NodeFetchSuccessMap {
self.0.insert((remote, node), true);
}
- /// Mark a node of a given remote as failed.
- pub fn set_node_failure(&mut self, remote: String, node: String) {
- self.0.insert((remote, node), false);
- }
-
/// Returns whether tasks from a given node of a remote were successfully fetched.
pub fn node_successful(&self, remote: &str, node: &str) -> bool {
matches!(self.0.get(&(remote.into(), node.into())), Some(true))
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-08-20 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 12:43 [pdm-devel] [PATCH proxmox-datacenter-manager v7 0/7] remote task cache fetching task / better cache backend Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 1/7] remote tasks: implement improved cache for remote tasks Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 2/7] remote tasks: add background task for task polling, use new task cache Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 3/7] pdm-api-types: remote tasks: add new_from_str constructor for TaskStateType Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 4/7] fake remote: make the fake_remote feature compile again Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 5/7] fake remote: clippy fixes Lukas Wagner
2025-08-20 12:43 ` [pdm-devel] [PATCH proxmox-datacenter-manager v7 6/7] remote tasks: task cache: create `active` file in init Lukas Wagner
2025-08-20 12:43 ` Lukas Wagner [this message]
2025-08-21 9:20 ` [pdm-devel] applied: [PATCH proxmox-datacenter-manager v7 0/7] remote task cache fetching task / better cache backend Dominik Csapak
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=20250820124329.220124-8-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox