Files
11d6bde264a90fde1d8bb8b15e9229f7af808840
devstack /unstack.sh

175 lines
3.4 KiB
Bash
Raw Normal View History

# **unstack.sh**
# mysql and rabbit are left running as OpenStack code refreshes
# do not require them to be restarted.
#
# Keep track of the current devstack directory.
TOP_DIR=$(cd $(dirname "0ドル") && pwd)
# Import common functions
source $TOP_DIR/functions
source $TOP_DIR/lib/database
source $TOP_DIR/stackrc
DATA_DIR=${DATA_DIR:-${DEST}/data}
echo "You are running this script as root."
echo "It might work but you will have a better day running it as $STACK_USER"
exit 1
fi
# Configure Projects
# ==================
source $TOP_DIR/lib/apache
source $TOP_DIR/lib/tls
# Source project function libraries
source $TOP_DIR/lib/infra
source $TOP_DIR/lib/oslo
source $TOP_DIR/lib/stackforge
source $TOP_DIR/lib/horizon
source $TOP_DIR/lib/glance
source $TOP_DIR/lib/nova
source $TOP_DIR/lib/heat
source $TOP_DIR/lib/ldap
# --------------
# Phase: source
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i source
done
fi
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion
if [[ "1ドル" == "--all" ]]; then
UNSTACK_ALL=${UNSTACK_ALL:-1}
fi
# ==========
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i unstack
done
fi
source $TOP_DIR/openrc
if is_service_enabled heat; then
stop_heat
stop_ceilometer
fi
if is_service_enabled nova; then
stop_nova
fi
fi
if is_service_enabled key; then
stop_keystone
# Apache has the WSGI processes
if is_service_enabled horizon; then
cleanup_CA
if [[ -n "$UNSTACK_ALL" ]]; then
# Stop MySQL server
if is_service_enabled mysql; then
stop_service mysql
fi
stop_service postgresql
fi
if is_service_enabled rabbit; then
stop_service rabbitmq-server
fi
stop_neutron
stop_neutron_third_party
cleanup_neutron
cleanup_trove
fi
SCREEN=$(which screen)
if [[ -n "$SCREEN" ]]; then
SESSION=$(screen -ls | awk '/[0-9].stack/ { print 1ドル }')
if [[ -n "$SESSION" ]]; then
screen -X -S $SESSION quit
fi
fi