From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: "Lukas Sichert" <l.sichert@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove
Date: Wed, 02 Dec 2026 11:39:37 +0100 [thread overview]
Message-ID: <s8ose0g55li.fsf@toolbox> (raw)
In-Reply-To: <DNA6ETJRONZ9.170XDNHO09V55@proxmox.com> (Lukas Sichert's message of "Wed, 02 Dec 2026 11:31:21 +0100")
"Lukas Sichert" <l.sichert@proxmox.com> writes:
> On 2026-11-27 16:32, Maximiliano Sandoval <m.sandoval@proxmox.com> wrote:
>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> 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
next prev parent reply other threads:[~2026-12-02 10:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:32 [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Maximiliano Sandoval
2026-11-27 15:32 ` [PATCH manager 1/3] ui: storage: SAN: add checkboxes for saferemove & on-volume-remove Maximiliano Sandoval
2026-12-02 10:31 ` Lukas Sichert
2026-12-02 10:39 ` Maximiliano Sandoval [this message]
2026-11-27 15:32 ` [PATCH manager 2/3] ui: lvm: display a warning when there is no cleanup Maximiliano Sandoval
2026-11-27 15:32 ` [PATCH manager 3/3] ui: storage: SAN: " Maximiliano Sandoval
2026-12-02 10:42 ` [PATCH manager 0/3] ui: lvm: encourage the use of saferemove or on-volume-remove Lukas Sichert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s8ose0g55li.fsf@toolbox \
--to=m.sandoval@proxmox.com \
--cc=l.sichert@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox