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 1A08B1FF16F for ; Tue, 8 Jul 2025 19:01:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6DF9A1C42A; Tue, 8 Jul 2025 19:01:42 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 8 Jul 2025 19:00:37 +0200 Message-ID: <20250708170114.1556057-10-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250708170114.1556057-1-c.ebner@proxmox.com> References: <20250708170114.1556057-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.040 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 Subject: [pbs-devel] [PATCH proxmox v6 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 --- pbs-api-types/src/datastore.rs | 3 +++ pbs-api-types/src/maintenance.rs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index fb921e49..86b45614 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -554,6 +554,9 @@ 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