From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 392111FF13C for ; Thu, 05 Mar 2026 10:19:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AE26E1F31F; Thu, 5 Mar 2026 10:20:38 +0100 (CET) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2] datastore: don't skip empty namespaces on s3 refresh Date: Thu, 5 Mar 2026 10:20:32 +0100 Message-ID: <20260305092032.29058-1-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772702408650 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.065 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DBJIWXDSZKQTNAYJDEL32J4Q23FB3BOO X-Message-ID-Hash: DBJIWXDSZKQTNAYJDEL32J4Q23FB3BOO X-MailFrom: h.laimer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Without this empty namespaces present on s3 won't be visible locally. Signed-off-by: Hannes Laimer --- v2, thanks @Fabian: - don't duplicate dir creation, just move ns check to after dir creation since it is identicaly for namespaces and other things pbs-datastore/src/datastore.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs index 7ad3d917..76b66f7d 100644 --- a/pbs-datastore/src/datastore.rs +++ b/pbs-datastore/src/datastore.rs @@ -2534,11 +2534,6 @@ impl DataStore { let object_path = object_path.strip_prefix(&store_prefix).with_context(|| { format!("failed to strip store context prefix {store_prefix} for {object_key}") })?; - if object_path.ends_with(NAMESPACE_MARKER_FILENAME) { - continue; - } - - info!("Fetching object {object_path}"); let file_path = tmp_base.join(object_path); if let Some(parent) = file_path.parent() { @@ -2549,6 +2544,13 @@ impl DataStore { )?; } + if object_path.ends_with(NAMESPACE_MARKER_FILENAME) { + info!("Created namespace {object_path}"); + continue; + } else { + info!("Fetching object {object_path}"); + } + let mut target_file = tokio::fs::OpenOptions::new() .write(true) .create(true) -- 2.47.3