From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 376D01FF0BC for ; Wed, 02 Dec 2026 11:39:44 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9E437215AD; Wed, 02 Dec 2026 11:39:41 +0100 (CET) From: Maximiliano Sandoval To: "Lukas Sichert" Subject: Re: [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove In-Reply-To: (Lukas Sichert's message of "Wed, 02 Dec 2026 11:31:21 +0100") References: <20261127153243.488023-1-m.sandoval@proxmox.com> <20261127153243.488023-2-m.sandoval@proxmox.com> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Wed, 02 Dec 2026 11:39:37 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796207977640 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.655 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: IOUK2UF5GRYSOGWXPPNNOXTDISRWIZAZ X-Message-ID-Hash: IOUK2UF5GRYSOGWXPPNNOXTDISRWIZAZ X-MailFrom: m.sandoval@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 CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: "Lukas Sichert" writes: > On 2026-11-27 16:32, Maximiliano Sandoval wrote: > >> Signed-off-by: Maximiliano Sandoval >> --- >> www/manager6/storage/wizard/Wizard.js | 36 ++++++++++++++++++++++++++- >> - return { >> + let values = { >> storage: value('storage'), >> vgname: value('vgname') || value('storage'), >> 'snapshot-as-volume-chain': value('snapshot-as-volume-chain') ? 1 : 0, >> + saferemove: value('saferemove') ? 1 : 0, >> nodes: >> me.wizardType === 'fc' >> ? [] >> @@ -160,6 +161,14 @@ Ext.define('PVE.storage.wizard.SAN', { >> .join(',') >> : me.connection.nodes, >> }; >> + >> + if (value('on-remove-discard')) { >> + let onRemove = { discard: 1 }; >> + let onRemoveString = PVE.Parser.printPropertyString(onRemove); >> + values['on-volume-remove'] = onRemoveString; >> + } >> + >> + return values; > > nit: Generally it is avoided to serialize the value 0 into the config. > Already logic is added to only write the on-volume-remove parameter > string into the config if enabled. This should also be done for > saferemove and 'snapshot-as-volume-chain'. The LVMEdit window already > does this correctly for 'snapshot-as-volume-chain'. Correct handling for > saferemove should be added there as well in the future. saferemove 0 is set explicitly in the configuration in order to match the behavior of the LVMEdit dialog for this particular setting. For the record, I opted to follow the other dialog's behavior before changing the existing LVMEdit dialog to have consistent behavior. I have no strong preference for either behavior so please let me know if I should send v2 cleaning this. -- Maximiliano