public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* SPAM: [PATCH manager] fix #8193: ceph: pool set: keep min_size when changing size
@ 2026-10-18 20:52 Parker Wahle
  0 siblings, 0 replies; only message in thread
From: Parker Wahle @ 2026-10-18 20:52 UTC (permalink / raw)
  To: pve-devel; +Cc: Parker Wahle, Claude Opus 5.5

Since commit 76ed4900 ("fix #5010: ceph: pool set only changed
properties"), set_pool reads the pool's properties once, before
applying anything, and skips every requested setting that matches
them. Ceph resets min_size whenever size changes, which is why
set_pool applies size first. But a requested min_size equal to the
old one was still compared with the value from before that reset and
skipped, so Ceph's reset value stayed in place: for example, size=3
min_size=1 on a size 2 / min_size 1 pool left min_size at 2, and
size=3 min_size=3 on a size 4 / min_size 3 pool lowered it to 2.

This code change has PVE re-read the pool's properties after setting
the size, so the remaining settings are compared with the pool's
current values.

An LLM was used to isolate the cause of bug #8193 and draft a fix.
The fix was then tested against a reproducer on a live node and
found to work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Parker Wahle <regulad@regulad.xyz>
---
 PVE/Ceph/Tools.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/Ceph/Tools.pm b/PVE/Ceph/Tools.pm
index 94177709..ad5ba687 100644
--- a/PVE/Ceph/Tools.pm
+++ b/PVE/Ceph/Tools.pm
@@ -304,6 +304,8 @@ sub set_pool {
             print "$err";
         } else {
             delete $param->{$setting};
+            # Ceph resets min_size when size changes, so re-read before comparing the rest
+            $current_properties = get_pool_properties($pool, $rados) if $setting eq 'size';
         }
     }
 
-- 
2.56.0




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-18 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 20:52 SPAM: [PATCH manager] fix #8193: ceph: pool set: keep min_size when changing size Parker Wahle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal