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 1D7441FF139 for ; Tue, 10 Feb 2026 05:59:35 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BF9F016D1E; Tue, 10 Feb 2026 06:00:13 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 10 Feb 2026 13:00:00 +0800 Message-Id: To: "Fiona Ebner" , Subject: Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog From: "Kefu Chai" X-Mailer: aerc 0.20.0 References: <20260129144255.108808-2-k.chai@proxmox.com> <20260129145253.110677-2-k.chai@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770699522744 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.136 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: N3R7G27JWBTPRY53MSLFUNFMVOXW5N22 X-Message-ID-Hash: N3R7G27JWBTPRY53MSLFUNFMVOXW5N22 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 Fiona, I hope you're doing well. I wanted to follow up on a patch that Aaron reviewed last week. He's already tested and approved it (see his review below), so I was hoping you might be able to merge it when you have a chance. Thanks for considering this! On Thu Feb 5, 2026 at 8:32 PM CST, Aaron Lauterer wrote: > I was only able to reproduce the bug partially by limiting the network=20 > speed via the browsers dev tools. And even then only for a non-default=20 > min-size (!=3D2). The size was always shown as configured, even with a no= n=20 > default value (3). > > With this patch, I wasn't able to reproduce the bug anymore. The fix=20 > looks good. > > Consider this patch: > > Reviewed-By: Aaron Lauterer > Tested-By: Aaron Lauterer > > On 2026-01-29 15:52, Kefu Chai wrote: >> From: Kefu Chai >>=20 >> 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. >>=20 >> 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: >>=20 >> 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 >>=20 >> The bug is intermittent because closing and reopening the dialog changes >> the timing, allowing autoLoad to complete before form initialization. >>=20 >> 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. >>=20 >> Impact: >> - Prevents accidental reduction of replication factor >> - Prevents data loss from incorrect min_size values >> - Ensures GUI consistency between overview table and edit dialog >>=20 >> 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(+) >>=20 >> 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(),