File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /usr/ bin/env bash
1+ #! /bin/bash
22
33# **clean.sh**
44
@@ -83,7 +83,10 @@ if [[ -d $TOP_DIR/extras.d ]]; then
8383fi
8484
8585# Clean projects
86- cleanup_cinder
86+
87+ # BUG: cinder tgt doesn't exit cleanly if it's not running.
88+ cleanup_cinder || /bin/true
89+
8790cleanup_glance
8891cleanup_keystone
8992cleanup_nova
Original file line number Diff line number Diff line change 1+ #! /bin/bash -xe
2+ #
3+ # An up / down test for gate functional testing
4+ #
5+ # Note: this is expected to start running as jenkins
6+
7+ # Step 1: give back sudoers permissions to devstack
8+ TEMPFILE=` mktemp`
9+ echo " stack ALL=(root) NOPASSWD:ALL" > $TEMPFILE
10+ chmod 0440 $TEMPFILE
11+ sudo chown root:root $TEMPFILE
12+ sudo mv $TEMPFILE /etc/sudoers.d/51_stack_sh
13+
14+ # TODO: do something to start a guest to create crud that should
15+ # disappear
16+
17+ # Step 2: unstack
18+ echo " Running unstack.sh"
19+ sudo -H -u stack stdbuf -oL -eL bash -ex ./unstack.sh
20+
21+ # Step 3: clean
22+ echo " Running clean.sh"
23+ sudo -H -u stack stdbuf -oL -eL bash -ex ./clean.sh
24+
Original file line number Diff line number Diff line change @@ -28,17 +28,14 @@ function cleanup_database_mysql {
2828 stop_service $MYSQL
2929 if is_ubuntu; then
3030 # Get ruthless with mysql
31- stop_service $MYSQL
3231 apt_get purge -y mysql* mariadb*
3332 sudo rm -rf /var/lib/mysql
3433 sudo rm -rf /etc/mysql
3534 return
3635 elif is_fedora; then
37- stop_service mariadb
3836 uninstall_package mariadb-server
3937 sudo rm -rf /var/lib/mysql
4038 elif is_suse; then
41- stop_service mysql
4239 uninstall_package mysql-community-server
4340 sudo rm -rf /var/lib/mysql
4441 else
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ function start_dstat {
4040
4141# stop_dstat() stop dstat process
4242function stop_dstat {
43- screen_stop dstat
43+ # dstat runs as a console, not as a service, and isn't trackable
44+ # via the normal mechanisms for devstack. So lets just do a
45+ # killall and move on.
46+ killall dstat || /bin/true
4447}
4548
4649# Restore xtrace
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ function cleanup_rpc_backend {
7474 if is_service_enabled rabbit; then
7575 # Obliterate rabbitmq-server
7676 uninstall_package rabbitmq-server
77- sudo killall epmd || sudo killall -9 epmd
77+ # in case it's not actually running, /bin/true at the end
78+ sudo killall epmd || sudo killall -9 epmd || /bin/true
7879 if is_ubuntu; then
7980 # And the Erlang runtime too
8081 apt_get purge -y erlang*
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ function start_sahara {
184184# stop_sahara() - Stop running processes
185185function stop_sahara {
186186 # Kill the Sahara screen windows
187- screen -S $SCREEN_NAME -p sahara -X kill
187+ stop_process sahara
188188}
189189
190190
Original file line number Diff line number Diff line change 1- #! /usr/ bin/env bash
1+ #! /bin/bash
22
33# **unstack.sh**
44
136136
137137SCSI_PERSIST_DIR=$CINDER_STATE_PATH /volumes/*
138138
139+ # BUG: tgt likes to exit 1 on service stop if everything isn't
140+ # perfect, we should clean up cinder stop paths.
141+
139142# Get the iSCSI volumes
140143if is_service_enabled cinder; then
141- stop_cinder
142- cleanup_cinder
144+ stop_cinder || /bin/true
145+ cleanup_cinder || /bin/true
143146fi
144147
145148if [[ -n " $UNSTACK_ALL " ]]; then
@@ -179,4 +182,5 @@ if [[ -n "$SCREEN" ]]; then
179182 fi
180183fi
181184
182- clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME
185+ # BUG: maybe it doesn't exist? We should isolate this further down.
186+ clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
You can’t perform that action at this time.
0 commit comments