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 66575e5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
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
17 changes: 15 additions & 2 deletions 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,16 +110,26 @@ 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"
echo "- CLIENT_NODES ->$CLIENT_NODES<-"
echo "- MIN_NODES ->$MIN_NODES<-"
test -n "$MDS" && echo "- MDS"
test -n "$NFS_GANESHA" && echo "- NFS-Ganesha"
test -n "$OPENSTACK" && echo "- OpenStack test pools will be pre-created"
echo "- PROFILE ->$STORAGE_PROFILE<-"
test -n "$RGW" && echo "- RGW"
test -n "$SSL" && echo "- SSL"
echo "- PROFILE ->$STORAGE_PROFILE<-"
echo -n "- TUNED: "
test -n "$TUNED" && echo "ON"
test -z "$TUNED" && echo "OFF"
echo -n "Stage 0 update: "
test -n "$NO_UPDATE" && echo "disabled" || echo "enabled"
set -x
Expand Down

0 comments on commit 66575e5

Please sign in to comment.