public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Parker Wahle <regulad@regulad.xyz>
To: pve-devel@lists.proxmox.com
Cc: Parker Wahle <regulad@regulad.xyz>,
	"Claude Opus 5.5" <noreply@anthropic.com>
Subject: SPAM: [PATCH manager] fix #8193: ceph: pool set: keep min_size when changing size
Date: Sun, 18 Oct 2026 16:52:04 -0400	[thread overview]
Message-ID: <20261018205203.654-2-regulad@regulad.xyz> (raw)

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




                 reply	other threads:[~2026-10-18 20:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261018205203.654-2-regulad@regulad.xyz \
    --to=regulad@regulad.xyz \
    --cc=noreply@anthropic.com \
    --cc=pve-devel@lists.proxmox.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 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