Bug 2348945

Summary: [Read Balancer] Do not allow "require_min_compat_client" to be changed when Reads balancer is enabled on cluster
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Laura Flores <lflores>
Component: RADOSAssignee: Laura Flores <lflores>
Status: CLOSED ERRATA QA Contact: Pawan <pdhiran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: bhkaur, bhubbard, ceph-eng-bugs, cephqe-warriors, cleonharris, coped1961, ngangadh, nojha, tserlin, vereddy, vumrao
Target Milestone: ---   
Target Release: 7.1z4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-18.2.1-312.el9cp Doc Type: Bug Fix
Doc Text:
.Users can no longer lower the require-min-compact version below Reef if pg_upmap_primary is in use Previously, the pg_upmap_primary structure was not properly tied to feature bits, allowing users to set a lower client compatibility version even when pg_upmap_primary was active. This could lead to compatibility issues. With this fix, pg_upmap_primary is now properly bound to the SERVER_REEF feature bit, ensuring that only Reef or newer clients can connect when it is in use.
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-07 12:48:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Laura Flores 2025-02-27 23:32:27 UTC
Description taken from 8.x counterpart: https://bugzilla.redhat.com/show_bug.cgi?id=2313033

This BZ is being created to ensure that the fix also exists in a 7.x build.

------------------------------

Description of problem:
We see that there is a gating mechanism to not allow Reads balancer to be enabled without "osd set-require-min-compat-client" to reef. But however, once we update the min-compat-client & enable upmap-read or read mode, we can change back the value of "osd set-require-min-compat-client" to older releases, and reads balancer would still perform primary balancing. 

This is not desired. There should be a gating mechanism to not allow users to revert back to older "osd set-require-min-compat-client" once they have enabled reads balancing on the cluster.

Snippets from the cluster. 

# ceph osd set-require-min-compat-client octopus
set require_min_compat_client to octopus

# ceph balancer status
{
    "active": true,
    "last_optimize_duration": "0:00:00.004260",
    "last_optimize_started": "Wed Sep 18 04:22:34 2024",
    "mode": "upmap",
    "no_optimization_needed": true,
    "optimize_result": "Unable to find further optimization, or pool(s) pg_num is decreasing, or distribution is already perfect",
    "plans": []
}
# ceph balancer mode upmap-read
Error EPERM: min_compat_client "octopus" < "reef", which is required for pg-upmap-primary. Try "ceph osd set-require-min-compat-client reef" before enabling this mode

# ceph osd set-require-min-compat-client reef
set require_min_compat_client to reef

# ceph balancer mode upmap-read

# ceph balancer status
{
    "active": true,
    "last_optimize_duration": "0:00:00.041342",
    "last_optimize_started": "Wed Sep 18 04:26:36 2024",
    "mode": "upmap-read",
    "no_optimization_needed": true,
    "optimize_result": "Optimization plan created successfully",
    "plans": []
}

# ceph osd set-require-min-compat-client octopus
set require_min_compat_client to octopus

Version-Release number of selected component (if applicable):
ceph version 19.1.1-47.el9cp (f7299ed699971b1ab459a410d1195d93ab38d13e) squid (rc)

How reproducible:
Always

Steps to Reproduce:
1. Deploy 8.0 Cluster. Update require_min_compat_client to reef. 
2. Enable Reads balancer module, set balancer mode to upmap-read. With this, we would start primary balancing in PGs.
3. Update require_min_compat_client to luminous. The command executes successfully. This should not happen. We should restrict the updation of min_compat_client to a lower release.

Actual results:
require_min_compat_client can be updated to lower ceph releases post changing balancer mode up upmap-read.

Expected results:
require_min_compat_client cannot be updated to lower release post changing balancer mode up upmap-read, and only higher releases should be allowed.

Additional info:

Comment 1 Storage PM bot 2025-02-27 23:32:38 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 9 errata-xmlrpc 2025-05-07 12:48:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Ceph Storage 7.1 security, bug fix, and enhancement updates), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2025:4664

Comment 10 Cleo Harris 2025-05-09 08:06:19 UTC
(In reply to errata-xmlrpc from comment #9)
> Since the problem described in this bug report should be
> resolved in a recent advisory, it has been closed with a
> resolution of ERRATA.
> 
> For information on the advisory (Important: Red Hat Ceph Storage 7.1
> security, bug fix, and enhancement updates), and where to find the updated
> files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2025:4664 https://cluster-rush.com

Hello. I'm new here.

Comment 11 Difes1940 2025-05-19 08:15:19 UTC
(In reply to errata-xmlrpc from comment #9)
> Since the problem described in this bug report should be
> resolved in a recent advisory, it has been closed with a
> resolution of ERRATA.
> 
> For information on the advisory (Important: Red Hat Ceph Storage 7.1
> security, bug fix, and enhancement updates), and where to find the updated
> files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2025:4664 https://geometrydashspam.io

Thanks for your enthusiasm.