Skip to content

Commit

Permalink
qa: optionally run Stage 3 with tuned disabled
Browse files Browse the repository at this point in the history
Fixes: #1349
Signed-off-by: Nathan Cutler <ncutler@suse.com>
  • Loading branch information
smithfarm committed Sep 5, 2018
1 parent 8b34394 commit 023873e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
16 changes: 16 additions & 0 deletions qa/common/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,25 @@ function run_stage_2 {
test "$STAGE_SUCCEEDED"
}

function _disable_tuned {
local prefix=/srv/salt/ceph/tuned
mv $prefix/mgr/default.sls $prefix/mgr/default.sls-MOVED
mv $prefix/mon/default.sls $prefix/mon/default.sls-MOVED
mv $prefix/osd/default.sls $prefix/osd/default.sls-MOVED
mv $prefix/mgr/default-off.sls $prefix/mgr/default.sls
mv $prefix/mon/default-off.sls $prefix/mon/default.sls
mv $prefix/osd/default-off.sls $prefix/osd/default.sls
}

function run_stage_3 {
cat_global_conf
lsblk_on_storage_node
if [ "$TUNED" ] ; then
echo "WWWW: tuned will be deployed as usual"
else
echo "WWWW: tuned will NOT be deployed"
_disable_tuned
fi
_run_stage 3 "$@"
ceph_disk_list_on_storage_node
ceph osd tree
Expand Down
11 changes: 10 additions & 1 deletion qa/suites/basic/health-ok.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function usage {
echo " --profile Storage/OSD profile (see below)"
echo " --rgw Deploy RGW"
echo " --ssl Deploy RGW with SSL"
echo " --tuned=on/off Deploy tuned in Stage 3 (default: off)"
echo
echo "Supported storage/OSD profiles:"
echo " default Whatever is generated by Stage 1 (bluestore)"
Expand All @@ -64,7 +65,7 @@ function usage {
assert_enhanced_getopt

TEMP=$(getopt -o h \
--long "cli,client-nodes:,help,igw,mds,min-nodes:,nfs-ganesha,no-update,openstack,profile:,rgw,ssl" \
--long "cli,client-nodes:,help,igw,mds,min-nodes:,nfs-ganesha,no-update,openstack,profile:,rgw,ssl,tuned:" \
-n 'health-ok.sh' -- "$@")

if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
Expand All @@ -84,6 +85,7 @@ NFS_GANESHA=""
NO_UPDATE=""
RGW=""
SSL=""
TUNED="off"
while true ; do
case "$1" in
--cli) CLI="$1" ; shift ;;
Expand All @@ -97,6 +99,7 @@ while true ; do
--profile) shift ; STORAGE_PROFILE=$1 ; shift ;;
--rgw) RGW="$1" ; shift ;;
--ssl) SSL="$1" ; shift ;;
--tuned) shift ; TUNED=$1 ; shift ;;
--) shift ; break ;;
*) echo "Internal error" ; exit 1 ;;
esac
Expand All @@ -107,6 +110,12 @@ if [ "$NFS_GANESHA" ] ; then
exit 1
fi
fi
TUNED=${TUNED,,}
case "$TUNED" in
on) ;;
off) TUNED='' ;;
*) echo "Bad value ->$TUNED<- passed with --tuned. Bailing out!" ; exit 1 ;;
esac
echo "WWWW"
echo "health-ok.sh running with the following configuration:"
test -n "$CLI" && echo "- CLI"
Expand Down

0 comments on commit 023873e

Please sign in to comment.