From: "Kefu Chai" <k.chai@proxmox.com>
To: "Kefu Chai" <k.chai@proxmox.com>, <pve-devel@lists.proxmox.com>,
"Aaron Lauterer" <a.lauterer@proxmox.com>
Cc: Kefu Chai <tchaikov@gmail.com>
Subject: Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
Date: Wed, 04 Feb 2026 16:55:20 +0800 [thread overview]
Message-ID: <DG61VBLQPC9D.141PF4GF227FY@proxmox.com> (raw)
In-Reply-To: <20260129145253.110677-2-k.chai@proxmox.com>
Hi Aaron,
Since you recently updated the related area, would you mind reviewing
this change as well?
Thanks!
On Thu Jan 29, 2026 at 10:52 PM CST, Kefu Chai wrote:
> From: Kefu Chai <tchaikov@gmail.com>
>
> When editing Ceph pools via the GUI, the edit dialog displays incorrect
> Size and Min Size values that don't match the pool overview table. This
> can lead to accidental data loss if users save the pool configuration
> without noticing the discrepancy.
>
> Root Cause:
> The run_editor function creates the PVE.Ceph.PoolEdit dialog but fails
> to pass the actual size and min_size values from the grid record. This
> causes a race condition where:
>
> 1. Form fields initialize with undefined defaultSize/defaultMinSize
> 2. Fields fall back to default values (e.g., size=2)
> 3. The sizeChange handler fires and calculates minSize = size/2
> 4. ViewModel is updated with incorrect values
> 5. autoLoad tries to load correct data asynchronously
> 6. But pmxDisplayEditField binding doesn't work properly (see line 30)
> 7. User sees wrong values and may accidentally save them
>
> The bug is intermittent because closing and reopening the dialog changes
> the timing, allowing autoLoad to complete before form initialization.
>
> Fix:
> Pass defaultSize and defaultMinSize from the grid record to the edit
> dialog, matching the pattern already used by the Create dialog. This
> ensures form fields initialize with correct values immediately, avoiding
> the race condition.
>
> Impact:
> - Prevents accidental reduction of replication factor
> - Prevents data loss from incorrect min_size values
> - Ensures GUI consistency between overview table and edit dialog
>
> Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7266
> Signed-off-by: Kefu Chai <k.chai@proxmox.com>
> ---
> www/manager6/ceph/Pool.js | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
> index 26384e32..80d57f11 100644
> --- a/www/manager6/ceph/Pool.js
> +++ b/www/manager6/ceph/Pool.js
> @@ -457,6 +457,8 @@ Ext.define(
> nodename: nodename,
> pool_name: rec.data.pool_name,
> isErasure: rec.data.type === 'erasure',
> + defaultSize: rec.data.size,
> + defaultMinSize: rec.data.min_size,
> autoShow: true,
> listeners: {
> destroy: () => rstore.load(),
prev parent reply other threads:[~2026-02-04 8:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 14:42 [PATCH manager] " Kefu Chai
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
2026-02-04 8:55 ` Kefu Chai [this message]
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=DG61VBLQPC9D.141PF4GF227FY@proxmox.com \
--to=k.chai@proxmox.com \
--cc=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=tchaikov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.