From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0C55A1FF16B for ; Tue, 15 Jul 2025 14:53:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 306BC3BF10; Tue, 15 Jul 2025 14:54:22 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 15 Jul 2025 14:52:47 +0200 Message-ID: <20250715125332.954494-10-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250715125332.954494-1-c.ebner@proxmox.com> References: <20250715125332.954494-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.046 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 RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox v8 9/9] pbs-api-types: maintenance: add new maintenance mode S3 refresh X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" The new maintenance mode S3 refresh disallows any read and write operations on the underlying datastore, but without expecting it to be unmountable or clearing it from the internal datastore cache. This mode is intended to be used when refreshing a datastore backed by and S3 object store, downloading, clearing and recreating the contents. Signed-off-by: Christian Ebner --- changes since version 7: - fix formatting issues pbs-api-types/src/datastore.rs | 1 + pbs-api-types/src/maintenance.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index 5d1e0555..b8464a10 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -567,6 +567,7 @@ impl DataStoreConfig { Some(MaintenanceType::Unmount) => { /* used to reset it after failed unmount, or alternative for aborting unmount task */ } + Some(MaintenanceType::S3Refresh) => { /* used to reset state after refresh finished */ } Some(MaintenanceType::Delete) => { match new_type { Some(MaintenanceType::Delete) => { /* allow to delete a deleted storage */ } diff --git a/pbs-api-types/src/maintenance.rs b/pbs-api-types/src/maintenance.rs index 3c9aa819..a516a1d9 100644 --- a/pbs-api-types/src/maintenance.rs +++ b/pbs-api-types/src/maintenance.rs @@ -49,6 +49,8 @@ pub enum MaintenanceType { Delete, /// The (removable) datastore is being unmounted. Unmount, + /// The S3 cache store is being refreshed. + S3Refresh, } serde_plain::derive_display_from_serialize!(MaintenanceType); serde_plain::derive_fromstr_from_deserialize!(MaintenanceType); @@ -100,6 +102,8 @@ impl MaintenanceMode { bail!("datastore is being unmounted"); } else if self.ty == MaintenanceType::Offline { bail!("offline maintenance mode: {}", message); + } else if self.ty == MaintenanceType::S3Refresh { + bail!("S3 refresh maintenance mode: {}", message); } else if self.ty == MaintenanceType::ReadOnly { if let Some(Operation::Write) = operation { bail!("read-only maintenance mode: {}", message); -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel