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 3105E1FF138 for ; Wed, 04 Feb 2026 09:55:04 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 83CCBCBFC; Wed, 4 Feb 2026 09:55:32 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 04 Feb 2026 16:55:20 +0800 Message-Id: From: "Kefu Chai" To: "Kefu Chai" , , "Aaron Lauterer" Subject: Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog X-Mailer: aerc 0.20.0 References: <20260129144255.108808-2-k.chai@proxmox.com> <20260129145253.110677-2-k.chai@proxmox.com> In-Reply-To: <20260129145253.110677-2-k.chai@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770195250438 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.155 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_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 Message-ID-Hash: AGD67GEUCD6Q42YMXQHUPA6SZYOLTEPS X-Message-ID-Hash: AGD67GEUCD6Q42YMXQHUPA6SZYOLTEPS X-MailFrom: k.chai@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: Kefu Chai X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > > 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=3D2) > 3. The sizeChange handler fires and calculates minSize =3D 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=3D7266 > Signed-off-by: Kefu Chai > --- > 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 =3D=3D=3D 'erasure', > + defaultSize: rec.data.size, > + defaultMinSize: rec.data.min_size, > autoShow: true, > listeners: { > destroy: () =3D> rstore.load(),