]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: add --require-osd-and-client-version and --use-crush-tunables flags
authorSamuel Just <sjust@redhat.com>
Fri, 1 Dec 2023 06:12:19 +0000 (22:12 -0800)
committerSamuel Just <sjust@redhat.com>
Sun, 4 Feb 2024 05:00:11 +0000 (21:00 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/vstart.sh

index 4e776def9717a78646b5e29a61634db2dfac924a..20a35729c8e7682fedbed9fbc27c28d97045a996 100755 (executable)
@@ -177,6 +177,8 @@ io_uring_enabled=0
 with_jaeger=0
 force_addr=0
 osds_per_host=0
+require_osd_and_client_version=""
+use_crush_tunables=""
 
 with_mgr_dashboard=true
 if [[ "$(get_cmake_variable WITH_MGR_DASHBOARD_FRONTEND)" != "ON" ]] ||
@@ -267,6 +269,8 @@ options:
        --seastore-secondary-devs-type: device type of all secondary blockdevs. HDD, SSD(default), ZNS or RANDOM_BLOCK_SSD
        --crimson-smp: number of cores to use for crimson
        --osds-per-host: populate crush_location as each host holds the specified number of osds if set
+       --require-osd-and-client-version: if supplied, do set-require-min-compat-client and require-osd-release to specified value
+       --use-crush-tunables: if supplied, set tunables to specified value
 \n
 EOF
 
@@ -606,6 +610,16 @@ case $1 in
         shift
         echo "osds_per_host $osds_per_host"
         ;;
+    --require-osd-and-client-version)
+        require_osd_and_client_version="$2"
+        shift
+        echo "require_osd_and_client_version $require_osd_and_client_version"
+        ;;
+    --use-crush-tunables)
+        use_crush_tunables="$2"
+        shift
+        echo "use_crush_tunables $use_crush_tunables"
+        ;;
     *)
         usage_exit
 esac
@@ -1102,6 +1116,15 @@ EOF
     if [ "$crimson" -eq 1 ]; then
         $CEPH_BIN/ceph osd set-allow-crimson --yes-i-really-mean-it
     fi
+
+    if [ -n "$require_osd_and_client_version" ]; then
+        $CEPH_BIN/ceph osd set-require-min-compat-client $require_osd_and_client_version
+        $CEPH_BIN/ceph osd require-osd-release $require_osd_and_client_version --yes-i-really-mean-it
+    fi
+
+    if [ -n "$use_crush_tunables" ]; then
+        $CEPH_BIN/ceph osd crush tunables $use_crush_tunables
+    fi
 }
 
 start_osd() {