Skip to content

tentacle: Mgr: Allow autoscaling for overlapped roots + mgr: Fix autoscaling PG distribution - #70730

Merged
batrick merged 7 commits into
ceph:tentaclefrom
Ericmzhang:wip-78885-tentacle
Aug 21, 2026
Merged

batrick merged 7 commits into
ceph:tentaclefrom
Ericmzhang:wip-78885-tentacle

Conversation

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 30, 2026
@Ericmzhang Ericmzhang changed the title tentacle: Mgr: Allow autoscaling for overlapped roots tentacle: Mgr: Allow autoscaling for overlapped roots + mgr: Fix autoscaling PG distribution Jul 30, 2026
@Ericmzhang Ericmzhang removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 30, 2026
@Ericmzhang

Copy link
Copy Markdown
Contributor Author

/audit retest

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 30, 2026
@github-actions

Copy link
Copy Markdown

🔄 Audit Retest Triggered by @Ericmzhang.

View workflow run

@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #70730 SOURCE PR SOURCE STATUS
58eb492 mgr: Fix autoscaler not distributing PGs evenly + wrong pg_left update PR #67551 1933993 mgr: Fix autoscaler not distributing PGs evenly + wrong pg_left update
2052628 mgr: Modify unit tests to reflect changes f2d8ef5 mgr: Modify unit tests to reflect changes
0c3d0b1 doc/rados/operations/placement-groups: Add pg_autoscaler allocation description 76e76f8 doc/rados/operations/placement-groups: Add pg_autoscaler allocation description
53043e2 mgr: Allow autoscaling for overlapped roots PR #68532 43dfdc8 mgr: Allow autoscaling for overlapped roots
b12b19b mgr: Modify test_overlapping_roots for PG budget 47c8ab5 mgr: Modify test_overlapping_roots for PG budget
76e5bbc docs: Add docs about allowing PG autoscaling for overlapped roots 6831e7c docs: Add docs about allowing PG autoscaling for overlapped roots
ddb0211 qa: Add overlapped roots test case 7f9e383 qa: Add overlapped roots test case

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport ddb0211 (cherry-pick of 7f9e383)

Affected File(s)

Range Diff

Click to expand
--- Original (7f9e383e)
+++ Backport (ddb02112)
@@ -47,3 +47,9 @@
 Fixes: https://tracker.ceph.com/issues/73892
 
 Signed-off-by: Eric Zhang <[email protected]>
+(cherry picked from commit 7f9e383ecba2a0d72cb774e30a10f8d9fed96661)
+
+Conflicts:
+	qa/workunits/mon/pg_autoscaler.sh
+-Add new test cases for overlapped roots and separate different parts of script into
+functions

================================================================================
RANGE DIFF
================================================================================

1:  7f9e383ecba ! 1:  ddb02112142 qa: Add overlapped roots test case Added overlapped roots test case for CRUSH rules rule zone-1-only   step take zone us-east-1   step chooseleaf firstn 3 type host   step emit
    @@ Commit message
         Fixes: https://tracker.ceph.com/issues/73892
     
         Signed-off-by: Eric Zhang <[email protected]>
    +    (cherry picked from commit 7f9e383ecba2a0d72cb774e30a10f8d9fed96661)
    +
    +    Conflicts:
    +            qa/workunits/mon/pg_autoscaler.sh
    +    -Add new test cases for overlapped roots and separate different parts of script into
    +    functions
     
      ## qa/workunits/mon/pg_autoscaler.sh ##
    -@@ qa/workunits/mon/pg_autoscaler.sh: function test_autoscaler_basic() {
    -     wait_for 60 "ceph health detail | grep POOL_HAS_TARGET_SIZE_BYTES_AND_RATIO"
    - 
    -     # test autoscale warn
    --
    -     ceph osd pool create warn0 1 --autoscale-mode=warn
    -     wait_for 120 "ceph health detail | grep POOL_TOO_FEW_PGS"
    - 
    -@@ qa/workunits/mon/pg_autoscaler.sh: function test_exact_budget() {
    -     ceph osd pool rm data1 data1 --yes-i-really-really-mean-it
    +@@ qa/workunits/mon/pg_autoscaler.sh: function eval_actual_expected_val() {
    +     fi
      }
      
    ++function test_autoscaler_basic() {
    ++    # pg_num_min
    ++    MON_TARGET_PG_PER_OSD=200
    ++    ceph config set global mon_target_pg_per_osd $MON_TARGET_PG_PER_OSD
    ++
    ++    ceph osd pool create meta0
    ++    ceph osd pool create bulk0 --bulk
    ++    ceph osd pool create bulk1 --bulk
    ++    ceph osd pool create bulk2 --bulk
    ++    ceph osd pool set meta0 pg_autoscale_mode on
    ++    ceph osd pool set bulk0 pg_autoscale_mode on
    ++    ceph osd pool set bulk1 pg_autoscale_mode on
    ++    ceph osd pool set bulk2 pg_autoscale_mode on
    ++    # set pool size
    ++    ceph osd pool set meta0 size 2
    ++    ceph osd pool set bulk0 size 2
    ++    ceph osd pool set bulk1 size 2
    ++    ceph osd pool set bulk2 size 2
    ++
    ++    # get num pools again since we created more pools
    ++    NUM_POOLS=$(ceph osd pool ls | wc -l)
    ++
    ++    # get bulk flag of each pool through the command ceph osd pool autoscale-status
    ++    BULK_FLAG_1=$(ceph osd pool autoscale-status | grep 'meta0' | grep -o -m 1 'True\|False' || true)
    ++    BULK_FLAG_2=$(ceph osd pool autoscale-status | grep 'bulk0' | grep -o -m 1 'True\|False' || true)
    ++    BULK_FLAG_3=$(ceph osd pool autoscale-status | grep 'bulk1' | grep -o -m 1 'True\|False' || true)
    ++    BULK_FLAG_4=$(ceph osd pool autoscale-status | grep 'bulk2' | grep -o -m 1 'True\|False' || true)
    ++
    ++    # evaluate the accuracy of ceph osd pool autoscale-status specifically the `BULK` column
    ++
    ++    eval_actual_expected_val $BULK_FLAG_1 'False'
    ++    eval_actual_expected_val $BULK_FLAG_2 'True'
    ++    eval_actual_expected_val $BULK_FLAG_3 'True'
    ++    eval_actual_expected_val $BULK_FLAG_4 'True'
    ++
    ++    # This part of this code will now evaluate the accuracy of the autoscaler
    ++
    ++    # get pool size
    ++    POOL_SIZE_1=$(ceph osd pool get meta0 size| grep -Eo '[0-9]{1,4}')
    ++    POOL_SIZE_2=$(ceph osd pool get bulk0 size| grep -Eo '[0-9]{1,4}')
    ++    POOL_SIZE_3=$(ceph osd pool get bulk1 size| grep -Eo '[0-9]{1,4}')
    ++    POOL_SIZE_4=$(ceph osd pool get bulk2 size| grep -Eo '[0-9]{1,4}')
    ++    sleep 30
    ++
    ++    # Calculate target pg of each pools
    ++
    ++
    ++    TARGET_PG_1=$(ceph osd pool get meta0 pg_num| grep -Eo '[0-9]{1,4}')
    ++    PG_LEFT=$(($NUM_OSDS*$MON_TARGET_PG_PER_OSD - TARGET_PG_1 * $POOL_SIZE_1))
    ++    NUM_POOLS_LEFT=$NUM_POOLS-1
    ++    # Rest of the pool is bulk and even pools so pretty straight forward
    ++    # calculations.
    ++    TARGET_PG_2=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_2))))
    ++    TARGET_PG_3=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_3))))
    ++    TARGET_PG_4=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_4))))
    ++
    ++    # evaluate target_pg against pg num of each pools
    ++    wait_for 300 "ceph osd pool get meta0 pg_num | grep $TARGET_PG_1"
    ++    wait_for 300 "ceph osd pool get bulk0 pg_num | grep $TARGET_PG_2"
    ++    wait_for 300 "ceph osd pool get bulk1 pg_num | grep $TARGET_PG_3"
    ++    wait_for 300 "ceph osd pool get bulk2 pg_num | grep $TARGET_PG_4"
    ++
    ++    # target ratio
    ++    ceph osd pool set meta0 target_size_ratio 5
    ++    ceph osd pool set bulk0 target_size_ratio 2
    ++    sleep 60
    ++    APGS=$(ceph osd dump -f json-pretty | jq '.pools[0].pg_num_target')
    ++    BPGS=$(ceph osd dump -f json-pretty | jq '.pools[1].pg_num_target')
    ++    test $APGS -gt 100
    ++    test $BPGS -gt 10
    ++
    ++    # small ratio change does not change pg_num
    ++    ceph osd pool set meta0 target_size_ratio 7
    ++    ceph osd pool set bulk0 target_size_ratio 2
    ++    sleep 60
    ++    APGS2=$(ceph osd dump -f json-pretty | jq '.pools[0].pg_num_target')
    ++    BPGS2=$(ceph osd dump -f json-pretty | jq '.pools[1].pg_num_target')
    ++    test $APGS -eq $APGS2
    ++    test $BPGS -eq $BPGS2
    ++
    ++    # target_size
    ++    ceph osd pool set meta0 target_size_bytes 1000000000000000
    ++    ceph osd pool set bulk0 target_size_bytes 1000000000000000
    ++    ceph osd pool set meta0 target_size_ratio 0
    ++    ceph osd pool set bulk0 target_size_ratio 0
    ++    wait_for 60 "ceph health detail | grep POOL_TARGET_SIZE_BYTES_OVERCOMMITTED"
    ++
    ++    ceph osd pool set meta0 target_size_bytes 1000
    ++    ceph osd pool set bulk0 target_size_bytes 1000
    ++    ceph osd pool set meta0 target_size_ratio 1
    ++    wait_for 60 "ceph health detail | grep POOL_HAS_TARGET_SIZE_BYTES_AND_RATIO"
    ++
    ++    # test autoscale warn
    ++    ceph osd pool create warn0 1 --autoscale-mode=warn
    ++    wait_for 120 "ceph health detail | grep POOL_TOO_FEW_PGS"
    ++
    ++    ceph osd pool create warn1 256 --autoscale-mode=warn
    ++    wait_for 120 "ceph health detail | grep POOL_TOO_MANY_PGS"
    ++
    ++    ceph osd pool rm meta0 meta0 --yes-i-really-really-mean-it
    ++    ceph osd pool rm bulk0 bulk0 --yes-i-really-really-mean-it
    ++    ceph osd pool rm bulk1 bulk1 --yes-i-really-really-mean-it
    ++    ceph osd pool rm bulk2 bulk2 --yes-i-really-really-mean-it
    ++    ceph osd pool rm warn0 warn0 --yes-i-really-really-mean-it
    ++    ceph osd pool rm warn1 warn1 --yes-i-really-really-mean-it
    ++}
    ++
    ++function test_pool_starvation() {
    ++    # test pool starvation where PGs not distributed evenly
    ++    MON_TARGET_PG_PER_OSD=200
    ++    ceph config set global mon_target_pg_per_osd $MON_TARGET_PG_PER_OSD
    ++
    ++    ceph osd pool create data0
    ++    ceph osd pool create data1
    ++    ceph osd pool create data2
    ++    ceph osd pool set data0 pg_autoscale_mode on
    ++    ceph osd pool set data1 pg_autoscale_mode on
    ++    ceph osd pool set data2 pg_autoscale_mode on
    ++    ceph osd pool set data0 target_size_ratio 0.3333
    ++    ceph osd pool set data1 target_size_ratio 0.3333
    ++    ceph osd pool set data2  target_size_ratio 0.3333
    ++    sleep 30
    ++
    ++    PG_LEFT=$(($NUM_OSDS*$MON_TARGET_PG_PER_OSD))
    ++    POOL_SIZE=$(ceph osd pool get data0 size| grep -Eo '[0-9]{1,4}')
    ++    NUM_POOLS=$(ceph osd pool ls | wc -l)
    ++    TARGET_PG=$(power2_floor $((($PG_LEFT)/($NUM_POOLS)/($POOL_SIZE))))
    ++    wait_for 300 "ceph osd pool get data0 pg_num | grep $TARGET_PG"
    ++    wait_for 300 "ceph osd pool get data1 pg_num | grep $TARGET_PG"
    ++    wait_for 300 "ceph osd pool get data2 pg_num | grep $TARGET_PG"
    ++
    ++    ceph osd pool rm data0 data0 --yes-i-really-really-mean-it
    ++    ceph osd pool rm data1 data1 --yes-i-really-really-mean-it
    ++    ceph osd pool rm data2 data2 --yes-i-really-really-mean-it
    ++}
    ++
    ++function test_exact_budget() {
    ++    # test edge case for exact budget
    ++    MON_TARGET_PG_PER_OSD=128
    ++    ceph config set global mon_target_pg_per_osd $MON_TARGET_PG_PER_OSD
    ++
    ++    ceph osd pool create data0
    ++    ceph osd pool create data1
    ++    ceph osd pool set data0 pg_autoscale_mode on
    ++    ceph osd pool set data1 pg_autoscale_mode on
    ++    ceph osd pool set data0 size 3
    ++    ceph osd pool set data1 size 3
    ++    ceph osd pool set data0 target_size_ratio 0.5
    ++    ceph osd pool set data1 target_size_ratio 0.5
    ++    sleep 60
    ++
    ++    POOL_SIZE_1=$(ceph osd pool get data0 size| grep -Eo '[0-9]{1,4}')
    ++    POOL_SIZE_2=$(ceph osd pool get data1 size| grep -Eo '[0-9]{1,4}')
    ++    PG_LEFT=$(($NUM_OSDS * $MON_TARGET_PG_PER_OSD))
    ++    NUM_POOLS=$(ceph osd pool ls | wc -l)
    ++    TARGET_PG_1=$(power2_floor $((($PG_LEFT)/($NUM_POOLS)/($POOL_SIZE_1))))
    ++    TARGET_PG_2=$(power2_floor $((($PG_LEFT)/($NUM_POOLS)/($POOL_SIZE_2))))
    ++
    ++    wait_for 300 "ceph osd pool get data0 pg_num | grep $TARGET_PG_1"
    ++    wait_for 300 "ceph osd pool get data1 pg_num | grep $TARGET_PG_2"
    ++
    ++    ceph osd pool rm data0 data0 --yes-i-really-really-mean-it
    ++    ceph osd pool rm data1 data1 --yes-i-really-really-mean-it
    ++}
    ++
     +function test_overlapping_roots() {
     +    # Create custom CRUSH rules for zone-based placement
     +    MON_TARGET_PG_PER_OSD=100
    @@ qa/workunits/mon/pg_autoscaler.sh: function test_exact_budget() {
     +    ceph osd pool rm data2 data2 --yes-i-really-really-mean-it
     +    ceph osd pool rm data3 data3 --yes-i-really-really-mean-it
     +}
    - 
    ++
      # enable
      ceph config set mgr mgr/pg_autoscaler/sleep_interval 60
      ceph mgr module enable pg_autoscaler
    +-# ceph config set global osd_pool_default_pg_autoscale_mode on
    +-
    +-# pg_num_min
    +-ceph osd pool create meta0 16
    +-ceph osd pool create bulk0 16 --bulk
    +-ceph osd pool create bulk1 16 --bulk
    +-ceph osd pool create bulk2 16 --bulk
    +-ceph osd pool set meta0 pg_autoscale_mode on
    +-ceph osd pool set bulk0 pg_autoscale_mode on
    +-ceph osd pool set bulk1 pg_autoscale_mode on
    +-ceph osd pool set bulk2 pg_autoscale_mode on
    +-# set pool size
    +-ceph osd pool set meta0 size 2
    +-ceph osd pool set bulk0 size 2
    +-ceph osd pool set bulk1 size 2
    +-ceph osd pool set bulk2 size 2
    +-
    +-# get num pools again since we created more pools
    +-NUM_POOLS=$(ceph osd pool ls | wc -l)
    +-
    +-# get bulk flag of each pool through the command ceph osd pool autoscale-status
    +-BULK_FLAG_1=$(ceph osd pool autoscale-status | grep 'meta0' | grep -o -m 1 'True\|False' || true)
    +-BULK_FLAG_2=$(ceph osd pool autoscale-status | grep 'bulk0' | grep -o -m 1 'True\|False' || true)
    +-BULK_FLAG_3=$(ceph osd pool autoscale-status | grep 'bulk1' | grep -o -m 1 'True\|False' || true)
    +-BULK_FLAG_4=$(ceph osd pool autoscale-status | grep 'bulk2' | grep -o -m 1 'True\|False' || true)
    +-
    +-# evaluate the accuracy of ceph osd pool autoscale-status specifically the `BULK` column
    +-
    +-eval_actual_expected_val $BULK_FLAG_1 'False'
    +-eval_actual_expected_val $BULK_FLAG_2 'True'
    +-eval_actual_expected_val $BULK_FLAG_3 'True'
    +-eval_actual_expected_val $BULK_FLAG_4 'True'
    +-
    +-# This part of this code will now evaluate the accuracy of the autoscaler
    +-
    +-# get pool size
    +-POOL_SIZE_1=$(ceph osd pool get meta0 size| grep -Eo '[0-9]{1,4}')
    +-POOL_SIZE_2=$(ceph osd pool get bulk0 size| grep -Eo '[0-9]{1,4}')
    +-POOL_SIZE_3=$(ceph osd pool get bulk1 size| grep -Eo '[0-9]{1,4}')
    +-POOL_SIZE_4=$(ceph osd pool get bulk2 size| grep -Eo '[0-9]{1,4}')
    +-
    +-# Calculate target pg of each pools
    +-# First Pool is a non-bulk so we do it first.
    +-# Since the Capacity ratio = 0 we first meta pool remains the same pg_num
    +-
    +-TARGET_PG_1=$(ceph osd pool get meta0 pg_num| grep -Eo '[0-9]{1,4}')
    +-PG_LEFT=$(($NUM_OSDS*100 - $TARGET_PG_1 * $POOL_SIZE_1))
    +-NUM_POOLS_LEFT=$NUM_POOLS-1
    +-# Rest of the pool is bulk and even pools so pretty straight forward
    +-# calculations.
    +-TARGET_PG_2=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_2))))
    +-TARGET_PG_3=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_3))))
    +-TARGET_PG_4=$(power2_floor $((($PG_LEFT)/($NUM_POOLS_LEFT)/($POOL_SIZE_4))))
    +-
    +-# evaluate target_pg against pg num of each pools
    +-wait_for 300 "ceph osd pool get meta0 pg_num | grep $TARGET_PG_1"
    +-wait_for 300 "ceph osd pool get bulk0 pg_num | grep $TARGET_PG_2"
    +-wait_for 300 "ceph osd pool get bulk1 pg_num | grep $TARGET_PG_3"
    +-wait_for 300 "ceph osd pool get bulk2 pg_num | grep $TARGET_PG_4"
    +-
    +-# target ratio
    +-ceph osd pool set meta0 target_size_ratio 5
    +-ceph osd pool set bulk0 target_size_ratio 2
    +-sleep 60
    +-APGS=$(ceph osd dump -f json-pretty | jq '.pools[0].pg_num_target')
    +-BPGS=$(ceph osd dump -f json-pretty | jq '.pools[1].pg_num_target')
    +-test $APGS -gt 100
    +-test $BPGS -gt 10
    +-
    +-# small ratio change does not change pg_num
    +-ceph osd pool set meta0 target_size_ratio 7
    +-ceph osd pool set bulk0 target_size_ratio 2
    +-sleep 60
    +-APGS2=$(ceph osd dump -f json-pretty | jq '.pools[0].pg_num_target')
    +-BPGS2=$(ceph osd dump -f json-pretty | jq '.pools[1].pg_num_target')
    +-test $APGS -eq $APGS2
    +-test $BPGS -eq $BPGS2
    +-
    +-# target_size
    +-ceph osd pool set meta0 target_size_bytes 1000000000000000
    +-ceph osd pool set bulk0 target_size_bytes 1000000000000000
    +-ceph osd pool set meta0 target_size_ratio 0
    +-ceph osd pool set bulk0 target_size_ratio 0
    +-wait_for 60 "ceph health detail | grep POOL_TARGET_SIZE_BYTES_OVERCOMMITTED"
    +-
    +-ceph osd pool set meta0 target_size_bytes 1000
    +-ceph osd pool set bulk0 target_size_bytes 1000
    +-ceph osd pool set meta0 target_size_ratio 1
    +-wait_for 60 "ceph health detail | grep POOL_HAS_TARGET_SIZE_BYTES_AND_RATIO"
    +-
    +-# test autoscale warn
    +-
    +-ceph osd pool create warn0 1 --autoscale-mode=warn
    +-wait_for 120 "ceph health detail | grep POOL_TOO_FEW_PGS"
    +-
    +-ceph osd pool create warn1 256 --autoscale-mode=warn
    +-wait_for 120 "ceph health detail | grep POOL_TOO_MANY_PGS"
    +-
    +-ceph osd pool rm meta0 meta0 --yes-i-really-really-mean-it
    +-ceph osd pool rm bulk0 bulk0 --yes-i-really-really-mean-it
    +-ceph osd pool rm bulk1 bulk1 --yes-i-really-really-mean-it
    +-ceph osd pool rm bulk2 bulk2 --yes-i-really-really-mean-it
    +-ceph osd pool rm warn0 warn0 --yes-i-really-really-mean-it
    +-ceph osd pool rm warn1 warn1 --yes-i-really-really-mean-it
    +-
    +-# test pool starvation where PGs not distributed evenly
    +-ceph osd pool create data0
    +-ceph osd pool create data1
    +-ceph osd pool create data2
    +-ceph osd pool set data0 target_size_ratio 0.3333
    +-ceph osd pool set data1 target_size_ratio 0.3333
    +-ceph osd pool set data2  target_size_ratio 0.3333
    +-sleep 30
    +-
    +-TARGET_PG_1=$(ceph osd pool get data0 pg_num| grep -Eo '[0-9]{1,4}')
    +-wait_for 300 "ceph osd pool get data1 pg_num | grep $TARGET_PG_1"
    +-wait_for 300 "ceph osd pool get data2 pg_num | grep $TARGET_PG_1"
    +-
    +-ceph osd pool rm data0 data0 --yes-i-really-really-mean-it
    +-ceph osd pool rm data1 data1 --yes-i-really-really-mean-it
    +-ceph osd pool rm data2 data2 --yes-i-really-really-mean-it
    +-
    +-# test edge case for exact budget
    +-ceph config set global mon_target_pg_per_osd 128
    +-
    +-ceph osd pool create data0
    +-ceph osd pool create data1
    +-ceph osd pool set data0 target_size_ratio 0.5
    +-ceph osd pool set data1 target_size_ratio 0.5
    +-
    +-POOL_SIZE_1=$(ceph osd pool get data0 size| grep -Eo '[0-9]{1,4}')
    +-POOL_SIZE_2=$(ceph osd pool get data1 size| grep -Eo '[0-9]{1,4}')
    +-PG_LEFT=$(($NUM_OSDS * 128))
    +-NUM_POOLS=$(ceph osd pool ls | wc -l)
    +-TARGET_PG_1=$(power2_floor $((($PG_LEFT)/($NUM_POOLS)/($POOL_SIZE_1))))
    +-TARGET_PG_2=$(power2_floor $((($PG_LEFT)/($NUM_POOLS)/($POOL_SIZE_2))))
     +ceph osd pool set threshold 1.0
    -+
      
    - test_autoscaler_basic || return 1
    - test_pool_starvation || return 1
    - test_exact_budget || return 1
    +-wait_for 300 "ceph osd pool get data0 pg_num | grep $TARGET_PG_1"
    +-wait_for 300 "ceph osd pool get data1 pg_num | grep $TARGET_PG_2"
    + 
    +-ceph osd pool rm data0 data0 --yes-i-really-really-mean-it
    +-ceph osd pool rm data1 data1 --yes-i-really-really-mean-it
    ++test_autoscaler_basic || return 1
    ++test_pool_starvation || return 1
    ++test_exact_budget || return 1
     +test_overlapping_roots || exit 1
      
      echo OK

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 30, 2026
@Ericmzhang

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@yuriw

yuriw commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri9-testing-20260803.203514-tentacle.

@yuriw

yuriw commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri14-testing-20260812.153525-tentacle.

Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Check if adding a new pool results in max PG allowed to be exceeded
Check if increasing replication size results in max PG allowed to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 68bd1a5)

 Conflicts:
	src/pybind/mgr/pg_autoscaler/module.py
	src/pybind/mgr/pg_autoscaler/tests/test_calculate_final_pool_pg_target.py
Add dependencies which are backported in ceph#70730
Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Added unit tests to check for adding a pool that causes max PG
to be exceeded and increasing replication size that causes max PG to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit cb7ca7b)

Conflicts:
	qa/workunits/mon/pg_autoscaler.sh
-Add dependencies which are in ceph#70730
Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Check if adding a new pool results in max PG allowed to be exceeded
Check if increasing replication size results in max PG allowed to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 68bd1a5)

 Conflicts:
	src/pybind/mgr/pg_autoscaler/module.py
	src/pybind/mgr/pg_autoscaler/tests/test_calculate_final_pool_pg_target.py
Add dependencies which are backported in ceph#70730
Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Added unit tests to check for adding a pool that causes max PG
to be exceeded and increasing replication size that causes max PG to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit cb7ca7b)

Conflicts:
	qa/workunits/mon/pg_autoscaler.sh
-Add dependencies which are in ceph#70730
Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Check if adding a new pool results in max PG allowed to be exceeded
Check if increasing replication size results in max PG allowed to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 68bd1a5)

 Conflicts:
	src/pybind/mgr/pg_autoscaler/module.py
	src/pybind/mgr/pg_autoscaler/tests/test_calculate_final_pool_pg_target.py
Add dependencies which are backported in ceph#70730
Ericmzhang added a commit to Ericmzhang/ceph that referenced this pull request Aug 12, 2026
Added unit tests to check for adding a pool that causes max PG
to be exceeded and increasing replication size that causes max PG to be exceeded

Fixes: https://tracker.ceph.com/issues/75423

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit cb7ca7b)

Conflicts:
	qa/workunits/mon/pg_autoscaler.sh
-Add dependencies which are in ceph#70730
Add optimization algorithm to distribute PGs among pools
to minimize cost (absolute difference between target PG and rounded PG).
Fix autoscaler still allocating pools when autoscale is off but bulk is on

Fixes: https://tracker.ceph.com/issues/73418
       https://tracker.ceph.com/issues/75424
Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 1933993)
Modify calc_final_pg_target test cases to reflect optimization algorithm
Add test cases that ensure cost is respected to ensure pools get rounded
closely to target

Fixes: https://tracker.ceph.com/issues/73418

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit f2d8ef5)
…escription

Update Placement Groups doc page with description of pg_autoscaler allocation algorithm.
Add example calculations showing how the algorithm prefers fairness over greedy utilization

Fixes: https://tracker.ceph.com/issues/73418

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 76e76f8)
Remove references to overlapped roots. Assign PG budget per root as sum(mon_target_pg_per_osd/# roots that contain OSD)

Fixes: https://tracker.ceph.com/issues/73892

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 43dfdc8)
No longer need to detect which roots are overlapping. Instead test PG budget allocation when roots overlap

Fixes: https://tracker.ceph.com/issues/73892

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 47c8ab5)
Remove mention of overlapped roots failing to scale and added
example of adding overlapped roots.
Added mention of changes in PendingReleaseNotes

Fixes: https://tracker.ceph.com/issues/73892

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 6831e7c)
Added overlapped roots test case for CRUSH rules
rule zone-1-only
  step take zone us-east-1
  step chooseleaf firstn 3 type host
  step emit

rule zone-2-only
  step take zone us-east-2
  step chooseleaf firstn 3 type host
  step emit

rule zone-3-only
  step take zone us-east-3
  step chooseleaf firstn 3 type host
  step emit

rule default
   step take default
  step chooseleaf firstn 3 type host
  step emit

and osd tree
    -1         6.00000  root default
     -8         6.00000      region us-east
     -5         2.00000          zone us-east-1
    -13         1.00000              host host0
      0    ssd  1.00000                  osd.0
    -14         1.00000              host host1
      1    ssd  1.00000                  osd.1
     -6         2.00000          zone us-east-2
    -15         1.00000              host host2
      2    ssd  1.00000                  osd.2
    -16         1.00000              host host3
      3    ssd  1.00000                  osd.3
     -7         2.00000          zone us-east-3
    -17         1.00000              host host4
      4    ssd  1.00000                  osd.4
    -18         1.00000              host host5
      5    ssd  1.00000                  osd.5

    -1: pg_target = 300
    -5: pg_target = 100
    -6  pg_target = 100
    -7: pg_target = 100

Fixes: https://tracker.ceph.com/issues/73892

Signed-off-by: Eric Zhang <[email protected]>
(cherry picked from commit 7f9e383)

Conflicts:
	qa/workunits/mon/pg_autoscaler.sh
-Add new test cases for overlapped roots and separate different parts of script into
functions
@Ericmzhang

Copy link
Copy Markdown
Contributor Author

Rebased from tentacle

@kamoltat

Copy link
Copy Markdown
Member

@kamoltat

Copy link
Copy Markdown
Member

jenkins test windows

@batrick batrick modified the milestones: tentacle, v20.2.5 Aug 21, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Aug 21, 2026
@github-actions

Copy link
Copy Markdown

✅ Audit Override Applied by @batrick.

View workflow run

@batrick
batrick merged commit e29f3c9 into ceph:tentacle Aug 21, 2026
10 checks passed
@Naveenaidu

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants