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 E59E81FF17E for ; Thu, 30 Oct 2025 13:04:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 879941FCBF; Thu, 30 Oct 2025 13:05:22 +0100 (CET) Message-ID: Date: Thu, 30 Oct 2025 13:05:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox Backup Server development discussion , Robert Obkircher References: <20251030105034.45964-1-r.obkircher@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20251030105034.45964-1-r.obkircher@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761825904094 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.022 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) RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup] Avoid lost updates to configuration during datastore deletion 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" Am 30.10.25 um 11:51 AM schrieb Robert Obkircher: > Previously, the following steps created files in /srv/test2 but > removed test2 from the configuration: > > proxmox-backup-manager datastore create test1 /srv/test1 > proxmox-backup-manager datastore remove test1 --destroy-data & > sleep 0.1 > proxmox-backup-manager datastore create test2 /srv/test2 > > Reported-by: https://forum.proxmox.com/threads/possible-bug-when-deleting-a-datastore.174715/ Please tell the user (and other developers to avoid potentially duplicate work ;)) about the proposed fix in the forum. > Signed-off-by: Robert Obkircher > --- > pbs-datastore/src/datastore.rs | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs > index 03830616..14dad93a 100644 > --- a/pbs-datastore/src/datastore.rs > +++ b/pbs-datastore/src/datastore.rs > @@ -2154,6 +2154,8 @@ impl DataStore { > if ok { > info!("Removing datastore from config..."); > let _lock = pbs_config::datastore::lock_config()?; > + // read again to avoid loosing concurrent modifications > + let (mut config, _digest) = pbs_config::datastore::config()?; > let _ = config.sections.remove(name); > pbs_config::datastore::save_config(&config)?; > } Not very familiar with the code here, but looks good to me :) _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel