From 2e8413dedeed8826be4a0ab3bced6f75cc4b64ab Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 20 Jul 2017 18:06:50 -0400 Subject: [PATCH] qa: remove workloadgen test The CRUSH rule creation is busted (rules and buckets out of order), but after I fix that it doesn't seem to run right anyway. Remove it. We get the mon thrasher coverage from rados/monthrash already; I don't think this is adding meaningful coverage for the amount of effort it takes to maintain. Signed-off-by: Sage Weil --- .../rados/singleton/all/mon-thrasher.yaml | 30 ---- qa/workunits/mon/workloadgen.sh | 169 ------------------ 2 files changed, 199 deletions(-) delete mode 100644 qa/suites/rados/singleton/all/mon-thrasher.yaml delete mode 100755 qa/workunits/mon/workloadgen.sh diff --git a/qa/suites/rados/singleton/all/mon-thrasher.yaml b/qa/suites/rados/singleton/all/mon-thrasher.yaml deleted file mode 100644 index 66a1e905f3b8..000000000000 --- a/qa/suites/rados/singleton/all/mon-thrasher.yaml +++ /dev/null @@ -1,30 +0,0 @@ -roles: -- - mon.a - - mon.b - - mon.c - - mgr.x - - osd.0 - - osd.1 - - client.0 -openstack: - - volumes: # attached to each instance - count: 2 - size: 10 # GB -tasks: -- install: -- ceph: - log-whitelist: - - overall HEALTH_ - - (MON_DOWN) - - (PG_ -- mon_thrash: - revive_delay: 20 - thrash_delay: 1 -- workunit: - clients: - all: - - mon/workloadgen.sh - env: - LOADGEN_NUM_OSDS: "5" - VERBOSE: "1" - DURATION: "600" diff --git a/qa/workunits/mon/workloadgen.sh b/qa/workunits/mon/workloadgen.sh deleted file mode 100755 index d43abe1bb10e..000000000000 --- a/qa/workunits/mon/workloadgen.sh +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/bash -x -# vim: ts=8 sw=2 smarttab -# -# $0.sh - run mon workload generator - -d() { - [[ "$VERBOSE" != "" && $VERBOSE -eq 1 ]] && echo "## DEBUG ## $*" -} - -d "check for required binaries" - -required_bins="ceph crushtool ceph_test_mon_workloadgen" -for b in $required_bins; do - which $b >& /dev/null - if [[ $? -ne 0 ]]; then - echo "Unable to find '$b' in PATH" - exit 1 - fi -done - -d "Start workunit" - -crush_map_fn=test.crush.map -create_crush=0 -clobber_crush=0 -new_cluster=0 -do_run=0 -num_osds=0 - -# Assume the test is in PATH -bin_test=ceph_test_mon_workloadgen - -num_osds=10 -if [[ "$LOADGEN_NUM_OSDS" != "" ]]; then - num_osds=$LOADGEN_NUM_OSDS -fi - -duration=300 -[ ! -z $DURATION ] && duration=$DURATION - -d "checking osd tree" - -crush_testing_root="`ceph osd tree | grep 'root[ \t]\+testing'`" - -d "$crush_testing_root" - -if [[ "$crush_testing_root" == "" ]]; then - d "set create_crush" - create_crush=1 -fi - -d "generate run_id (create_crush = $create_crush)" - -run_id=`uuidgen` - -d "run_id = $run_id ; create_crush = $create_crush" - -if [[ $create_crush -eq 1 ]]; then - tmp_crush_fn="/tmp/ceph.$run_id.crush" - ceph osd getcrushmap -o $tmp_crush_fn - crushtool -d $tmp_crush_fn -o $tmp_crush_fn.plain - - highest_root_id=0 - root_ids_raw="`cat $tmp_crush_fn.plain | grep id`" - ifs=$IFS - IFS=$'\n' - for l in $root_ids_raw; do - root_id=`echo $l | sed 's/.*-\([[:digit:]]\+\).*/\1/'` - d "root id = $root_id ; highest = $highest_root_id" - if [[ $root_id -gt $highest_root_id ]]; then - highest_root_id=$root_id - fi - done - our_root_id=$(($highest_root_id+1)) - IFS=$ifs - - cat << EOF >> $tmp_crush_fn.plain -root testing { - id -$our_root_id - alg straw - hash 0 # rjenkins1 -} -rule testingdata { - ruleset 0 - type replicated - min_size 1 - max_size 10 - step take testing - step choose firstn 0 type osd - step emit -} -rule testingmetadata { - ruleset 1 - type replicated - min_size 1 - max_size 10 - step take testing - step choose firstn 0 type osd - step emit -} -rule testingrbd { - ruleset 2 - type replicated - min_size 1 - max_size 10 - step take testing - step choose firstn 0 type osd - step emit -} -EOF - - if [[ $VERBOSE -eq 1 ]]; then - cat $tmp_crush_fn.plain - fi - - crushtool -c $tmp_crush_fn.plain -o $tmp_crush_fn - if [[ $? -eq 1 ]]; then - echo "Error compiling test crush map; probably need newer crushtool" - echo "NOK" - exit 1 - fi - - d "created crush" - - ceph osd setcrushmap -i $tmp_crush_fn -fi - -keyring="/tmp/ceph.$run_id.keyring" - -ceph auth get-or-create-key osd.admin mon 'allow rwx' osd 'allow *' -ceph auth export | grep -v "export" > $keyring - -osd_ids="" - -for osd in `seq 1 $num_osds`; do - id=`ceph osd create` - osd_ids="$osd_ids $id" - d "osd.$id" - ceph osd crush set $id osd.$id 1.0 host=testhost rack=testrack root=testing -done - -d "osds: $osd_ids" - -stub_id_args="" -f= -l= -for i in $osd_ids; do - d "i: $i" - if [[ $stub_id_args == "" ]]; then - stub_id_args="--stub-id $i" - f=$i - fi - if [[ $l != "" ]]; then - if [[ $i -gt $(($l+1)) ]]; then - stub_id_args="$stub_id_args..$l --stub-id $i" - f=$i - fi - fi - l=$i -done -if [[ $l -gt $f ]]; then - stub_id_args="$stub_id_args..$l" -fi - -args="$EXTRA_ARGS --duration $duration $stub_id_args" - -d "running: $args" - -$bin_test --keyring $keyring $args -- 2.47.3