]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc,test: clean up crush rule min/max_size leftovers 52169/head
authorIlya Dryomov <idryomov@gmail.com>
Mon, 28 Mar 2022 18:35:35 +0000 (20:35 +0200)
committerZac Dover <zac.dover@proton.me>
Fri, 23 Jun 2023 02:02:42 +0000 (12:02 +1000)
These fields were removed in quincy in commit f95eb04411cd ("crush:
eliminate min_size and max_size").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1ab943cabb7677f9465e92a00a84d2bfca60beb7)

doc/rados/operations/crush-map-edits.rst
doc/rados/operations/crush-map.rst
src/script/set_up_stretch_mode.sh
src/test/cli/crushtool/simple.template.three
src/test/test_pool_create.sh [deleted file]

index bb7ba0b2e92f9f45e9bb4f9363837f04a4a5b638..88ac45705a6a61fa47b20d8bd24ef0b1f34b29d8 100644 (file)
@@ -407,8 +407,6 @@ A rule takes the following form::
 
                id [a unique whole numeric ID]
                type [ replicated | erasure ]
-               min_size <min-size>
-               max_size <max-size>
                step take <bucket-name> [class <device-class>]
                step [choose|chooseleaf] [firstn|indep] <N> type <bucket-type>
                step emit
@@ -436,26 +434,6 @@ A rule takes the following form::
 :Default: ``replicated``
 :Valid Values: Currently only ``replicated`` and ``erasure``
 
-``min_size``
-
-:Description: If a pool makes fewer replicas than this number, CRUSH will
-              **NOT** select this rule.
-
-:Type: Integer
-:Purpose: A component of the rule mask.
-:Required: Yes
-:Default: ``1``
-
-``max_size``
-
-:Description: If a pool makes more replicas than this number, CRUSH will
-              **NOT** select this rule.
-
-:Type: Integer
-:Purpose: A component of the rule mask.
-:Required: Yes
-:Default: 10
-
 
 ``step take <bucket-name> [class <device-class>]``
 
index 942b1fa8224460fa502742ffc462a9a393989591..a27640ab197f9df273c7e5b71a994520ec7ee061 100644 (file)
@@ -1128,8 +1128,6 @@ not to contain any of the same servers, as seen in the following CRUSH rule::
         rule mixed_replicated_rule_two {
                id 1
                type replicated
-               min_size 1
-               max_size 10
                step take ssd_hosts class ssd
                step chooseleaf firstn 1 type host
                step emit
index a28f181e6c6fd7f0ddc7e7568c2882b767fe45f8..79b214915d9950d0bbc6edd96910ca875bfa6e19 100755 (executable)
@@ -15,8 +15,6 @@ cat <<EOF >> crush.map.txt
 rule stretch_rule {
         id 1
         type replicated
-        min_size 1
-        max_size 10
         step take site1
         step chooseleaf firstn 2 type host
         step emit
@@ -27,8 +25,6 @@ rule stretch_rule {
 rule stretch_rule2 {
         id 2
         type replicated
-        min_size 1
-        max_size 10
         step take site1
         step chooseleaf firstn 2 type host
         step emit
@@ -39,8 +35,6 @@ rule stretch_rule2 {
 rule stretch_rule3 {
         id 3
         type replicated
-        min_size 1
-        max_size 10
         step take site1
         step chooseleaf firstn 2 type host
         step emit
index 4dcb1505d85638a0b380f27142859a5180f018b1..33ebc662a257368c3ddf3d8997f0fac738dee712 100644 (file)
@@ -30,8 +30,6 @@ cluster cluster0 {
 rule data {
        id 0
        type replicated
-       min_size 1
-       max_size 10
        step take cluster0
        step chooseleaf firstn 0 type host
        step emit
@@ -39,8 +37,6 @@ rule data {
 rule metadata {
        id 1
        type replicated
-       min_size 1
-       max_size 10
        step take cluster0
        step chooseleaf firstn 0 type host
        step emit
@@ -48,8 +44,6 @@ rule metadata {
 rule rbd {
        id 2
        type replicated
-       min_size 1
-       max_size 10
        step take cluster0
        step chooseleaf firstn 0 type host
        step emit
diff --git a/src/test/test_pool_create.sh b/src/test/test_pool_create.sh
deleted file mode 100755 (executable)
index 5dd5aed..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-
-#Generic create pool use crush rule  test
-#
-
-# Includes
-source ../qa/standalone/ceph-helpers.sh
-
-function run() {
-    local dir=$1
-    shift
-
-    export CEPH_MON="127.0.0.1:17109" # git grep '\<17109\>' : there must be only one
-    export CEPH_ARGS
-    CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
-    CEPH_ARGS+="--mon-host=$CEPH_MON "
-
-    local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for func in $funcs ; do
-        $func $dir || return 1
-    done
-}
-
-function TEST_pool_create() {
-    local dir=$1
-    setup $dir || return 1
-    run_mon $dir a || return 1
-    run_osd $dir 0 || return 1
-    run_osd $dir 1 || return 1
-    run_osd $dir 2 || return 1
-
-    local rulename=testrule
-    local poolname=rulepool
-    local var=`ceph osd crush rule dump|grep -w rule|sed -n '$p'|grep -o '[0-9]\+'`
-    var=`expr  $var + 1 `
-    ceph osd getcrushmap -o "$dir/map1"
-    crushtool -d "$dir/map1" -o "$dir/map1.txt"
-
-    local minsize=0
-    local maxsize=1
-    sed -i '/# end crush map/i\rule '$rulename' {\n id \'$var'\n type replicated\n min_size \'$minsize'\n max_size \'$maxsize'\n step take default\n step choose firstn 0 type osd\n step emit\n }\n' "$dir/map1.txt"
-    crushtool  -c "$dir/map1.txt" -o "$dir/map1.bin"
-    ceph osd setcrushmap -i "$dir/map1.bin"
-    ceph osd pool create $poolname 200 $rulename 2>"$dir/rev"
-    local result=$(cat "$dir/rev" | grep "Error EINVAL: pool size")
-
-    if [ "$result" = "" ];
-    then
-      ceph osd pool delete  $poolname $poolname  --yes-i-really-really-mean-it
-      ceph osd crush rule rm $rulename
-      return 1
-    fi
-    ceph osd crush rule rm $rulename
-}
-
-main testpoolcreate
-