Skip to content

Commit

Permalink
Merge pull request #1346 from SUSE/wip-openstack-no-initial-clean
Browse files Browse the repository at this point in the history
qa: don't initially delete openstack pools
  • Loading branch information
smithfarm committed Sep 5, 2018
2 parents a766ec1 + a0f11cd commit 8867ae9
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 15 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
2 changes: 1 addition & 1 deletion qa/common/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# helper functions (not to be called directly from test scripts)
#

STAGE_TIMEOUT_DURATION="30m"
STAGE_TIMEOUT_DURATION="60m"

function _report_stage_failure {
STAGE_SUCCEEDED=""
Expand Down
1 change: 1 addition & 0 deletions qa/common/pool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function pre_create_pools {
sleep 10
POOLS="write_test"
test "$MDS" && POOLS+=" cephfs_data cephfs_metadata"
test "$OPENSTACK" && POOLS+=" smoketest-cloud-backups smoketest-cloud-volumes smoketest-cloud-images smoketest-cloud-vms cloud-backups cloud-volumes cloud-images cloud-vms"
create_all_pools_at_once $POOLS
ceph osd pool application enable write_test deepsea_qa
sleep 10
Expand Down
20 changes: 18 additions & 2 deletions qa/suites/basic/health-ok.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ function usage {
echo " --min-nodes Minimum number of nodes"
echo " --nfs-ganesha Deploy NFS-Ganesha"
echo " --no-update Use no-update-no-reboot Stage 0 alt default"
echo " --openstack Pre-create pools for OpenStack functests"
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 @@ -63,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,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 @@ -78,10 +80,12 @@ STORAGE_PROFILE="default"
CUSTOM_STORAGE_PROFILE=""
MDS=""
MIN_NODES=1
OPENSTACK=""
NFS_GANESHA=""
NO_UPDATE=""
RGW=""
SSL=""
TUNED="off"
while true ; do
case "$1" in
--cli) CLI="$1" ; shift ;;
Expand All @@ -91,9 +95,11 @@ while true ; do
--min-nodes) shift ; MIN_NODES=$1 ; shift ;;
--nfs-ganesha) NFS_GANESHA="$1" ; shift ;;
--no-update) NO_UPDATE="$1" ; shift ;;
--openstack) OPENSTACK="$1" ; shift ;;
--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 @@ -104,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
1 change: 1 addition & 0 deletions srv/salt/ceph/functests/1node/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ include:
- .restart.mon
- .restart.rgw
- .apparmor
- .openstack
5 changes: 0 additions & 5 deletions srv/salt/ceph/functests/1node/openstack/default.sls
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{% set master = salt['master.minion']() %}

clean environment at start:
salt.state:
- tgt: {{ master }}
- sls: ceph.tests.openstack.clean

apply ceph.openstack:
salt.state:
- tgt: {{ master }}
Expand Down
7 changes: 0 additions & 7 deletions srv/salt/ceph/functests/1node/openstack/prefix.sls
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{% set master = salt['master.minion']() %}

clean environment at start (prefix=smoketest):
salt.state:
- tgt: {{ master }}
- sls: ceph.tests.openstack.clean
- pillar:
"openstack_prefix": "smoketest"

apply ceph.openstack (prefix=smoketest):
salt.state:
- tgt: {{ master }}
Expand Down

0 comments on commit 8867ae9

Please sign in to comment.