* [PATCH manager] ui: ceph: use record sizes in Ceph pool edit dialog
@ 2026-01-29 14:42 Kefu Chai
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
0 siblings, 1 reply; 7+ messages in thread
From: Kefu Chai @ 2026-01-29 14:42 UTC (permalink / raw)
To: pve-devel; +Cc: Kefu Chai
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
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(),
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-01-29 14:42 [PATCH manager] ui: ceph: use record sizes in Ceph pool edit dialog Kefu Chai
@ 2026-01-29 14:52 ` Kefu Chai
2026-02-04 8:55 ` Kefu Chai
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kefu Chai @ 2026-01-29 14:52 UTC (permalink / raw)
To: pve-devel; +Cc: Kefu Chai
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(),
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
@ 2026-02-04 8:55 ` Kefu Chai
2026-02-05 12:32 ` Aaron Lauterer
2026-02-16 19:23 ` applied: " Thomas Lamprecht
2 siblings, 0 replies; 7+ messages in thread
From: Kefu Chai @ 2026-02-04 8:55 UTC (permalink / raw)
To: Kefu Chai, pve-devel, Aaron Lauterer; +Cc: Kefu Chai
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(),
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
2026-02-04 8:55 ` Kefu Chai
@ 2026-02-05 12:32 ` Aaron Lauterer
2026-02-10 5:00 ` Kefu Chai
2026-02-16 19:23 ` applied: " Thomas Lamprecht
2 siblings, 1 reply; 7+ messages in thread
From: Aaron Lauterer @ 2026-02-05 12:32 UTC (permalink / raw)
To: Kefu Chai, pve-devel; +Cc: Kefu Chai
I was only able to reproduce the bug partially by limiting the network
speed via the browsers dev tools. And even then only for a non-default
min-size (!=2). The size was always shown as configured, even with a non
default value (3).
With this patch, I wasn't able to reproduce the bug anymore. The fix
looks good.
Consider this patch:
Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
On 2026-01-29 15:52, 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(),
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-02-05 12:32 ` Aaron Lauterer
@ 2026-02-10 5:00 ` Kefu Chai
2026-02-11 11:31 ` Kefu Chai
0 siblings, 1 reply; 7+ messages in thread
From: Kefu Chai @ 2026-02-10 5:00 UTC (permalink / raw)
To: Fiona Ebner, pve-devel; +Cc: Kefu Chai
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
> speed via the browsers dev tools. And even then only for a non-default
> min-size (!=2). The size was always shown as configured, even with a non
> default value (3).
>
> With this patch, I wasn't able to reproduce the bug anymore. The fix
> looks good.
>
> Consider this patch:
>
> Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
>
> On 2026-01-29 15:52, 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(),
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-02-10 5:00 ` Kefu Chai
@ 2026-02-11 11:31 ` Kefu Chai
0 siblings, 0 replies; 7+ messages in thread
From: Kefu Chai @ 2026-02-11 11:31 UTC (permalink / raw)
To: Kefu Chai, Thomas Lamprecht, pve-devel; +Cc: Kefu Chai
Hi Thomas,
I'm following up on a patch that Aaron Lauterer reviewed and approved
last week (February 5th). The patch addresses a bug related to network
speed and min-size configuration.
Could you help review this patch for merging? If you're not the right
maintainer to contact, I'd appreciate it if you could point me to who I
should reach out to.
Thanks for your help!
On Tue Feb 10, 2026 at 1:00 PM CST, Kefu Chai wrote:
> 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
>> speed via the browsers dev tools. And even then only for a non-default
>> min-size (!=2). The size was always shown as configured, even with a non
>> default value (3).
>>
>> With this patch, I wasn't able to reproduce the bug anymore. The fix
>> looks good.
>>
>> Consider this patch:
>>
>> Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
>> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
>>
>> On 2026-01-29 15:52, 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(),
^ permalink raw reply [flat|nested] 7+ messages in thread
* applied: [PATCH manager v2] ui: ceph: use record sizes in Ceph pool edit dialog
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
2026-02-04 8:55 ` Kefu Chai
2026-02-05 12:32 ` Aaron Lauterer
@ 2026-02-16 19:23 ` Thomas Lamprecht
2 siblings, 0 replies; 7+ messages in thread
From: Thomas Lamprecht @ 2026-02-16 19:23 UTC (permalink / raw)
To: pve-devel, Kefu Chai; +Cc: Kefu Chai
On Thu, 29 Jan 2026 22:52:54 +0800, Kefu Chai wrote:
> 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:
>
> [...]
Applied, thanks!
[1/1] ui: ceph: use record sizes in Ceph pool edit dialog
commit: 3936276e2241b07a9546747e2ff2a91b4502c429
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-02-16 19:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 14:42 [PATCH manager] ui: ceph: use record sizes in Ceph pool edit dialog Kefu Chai
2026-01-29 14:52 ` [PATCH manager v2] " Kefu Chai
2026-02-04 8:55 ` Kefu Chai
2026-02-05 12:32 ` Aaron Lauterer
2026-02-10 5:00 ` Kefu Chai
2026-02-11 11:31 ` Kefu Chai
2026-02-16 19:23 ` applied: " Thomas Lamprecht
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.