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 7/7] remote updates: re-enable PBS update fetching
Date: Wed, 12 Nov 2025 10:42:03 +0100	[thread overview]
Message-ID: <20251112094203.112452-8-l.wagner@proxmox.com> (raw)
In-Reply-To: <20251112094203.112452-1-l.wagner@proxmox.com>

The task subsystem does not handle PBS tasks correctly, so we can start
tasks and track them until they are completed.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 server/src/remote_updates.rs | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/server/src/remote_updates.rs b/server/src/remote_updates.rs
index cd9b1aec..b1db3b81 100644
--- a/server/src/remote_updates.rs
+++ b/server/src/remote_updates.rs
@@ -1,7 +1,7 @@
 use std::fs::File;
 use std::io::ErrorKind;
 
-use anyhow::{bail, Error};
+use anyhow::Error;
 use serde::{Deserialize, Serialize};
 
 use proxmox_apt_api_types::APTUpdateInfo;
@@ -66,18 +66,15 @@ pub async fn update_apt_database(remote: &Remote, node: &str) -> Result<RemoteUp
             crate::api::pve::new_remote_upid(remote.id.clone(), upid).await
         }
         RemoteType::Pbs => {
-            // let client = connection::make_pbs_client(remote)?;
-            //
-            // let params = crate::pbs_client::AptUpdateParams {
-            //     notify: Some(false),
-            //     quiet: Some(false),
-            // };
-            // let upid = client.update_apt_database(params).await?;
-            //
-            // crate::api::pbs::new_remote_upid(remote.id.clone(), upid).await
-            // TODO: task infrastructure for PBS not finished yet, uncomment once
-            // this is done.
-            bail!("PBS is not supported yet");
+            let client = connection::make_pbs_client(remote)?;
+
+            let params = crate::pbs_client::AptUpdateParams {
+                notify: Some(false),
+                quiet: Some(false),
+            };
+            let upid = client.update_apt_database(params).await?;
+
+            crate::api::pbs::new_remote_upid(remote.id.clone(), upid).await
         }
     }
 }
-- 
2.47.3



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


  parent reply	other threads:[~2025-11-12  9:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  9:41 [pdm-devel] [PATCH datacenter-manager 0/7] PBS remotes: task API and task cache support Lukas Wagner
2025-11-12  9:41 ` [pdm-devel] [PATCH datacenter-manager 1/7] pdm-api-types: remote upid: add helpers for getting native UPID type Lukas Wagner
2025-11-12  9:41 ` [pdm-devel] [PATCH datacenter-manager 2/7] pbs-client: add bindings for task list, task status, task log Lukas Wagner
2025-11-12 20:23   ` Thomas Lamprecht
2025-11-12  9:41 ` [pdm-devel] [PATCH datacenter-manager 3/7] pdm-api-types: api: factor out schema definitions for task log params Lukas Wagner
2025-11-12  9:42 ` [pdm-devel] [PATCH datacenter-manager 4/7] api: pbs tasks: add PBS task API Lukas Wagner
2025-11-12  9:42 ` [pdm-devel] [PATCH datacenter-manager 5/7] api: pve tasks: use shared helpers for RemoteUpid handling Lukas Wagner
2025-11-12  9:42 ` [pdm-devel] [PATCH datacenter-manager 6/7] remote tasks: fetch/track PBS tasks Lukas Wagner
2025-11-12  9:42 ` Lukas Wagner [this message]
2025-11-12 20:26   ` [pdm-devel] [PATCH datacenter-manager 7/7] remote updates: re-enable PBS update fetching Thomas Lamprecht
2025-11-12 20:27 ` [pdm-devel] applied-series: [PATCH datacenter-manager 0/7] PBS remotes: task API and task cache support 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=20251112094203.112452-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 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