Merge "devstack: Use magnum-api and magnum-cond for services"
This commit is contained in:
commit
3025fcc7e9
|
@ -250,7 +250,7 @@ function create_magnum_cache_dir {
|
|||
# init_magnum() - Initialize databases, etc.
|
||||
function init_magnum {
|
||||
# Only do this step once on the API node for an entire cluster.
|
||||
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled m-api; then
|
||||
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled magnum-api; then
|
||||
# (Re)create magnum database
|
||||
recreate_database magnum
|
||||
|
||||
|
@ -300,7 +300,7 @@ function start_magnum_api {
|
|||
service_protocol="http"
|
||||
fi
|
||||
|
||||
run_process m-api "$MAGNUM_BIN_DIR/magnum-api"
|
||||
run_process magnum-api "$MAGNUM_BIN_DIR/magnum-api"
|
||||
echo "Waiting for magnum-api to start..."
|
||||
if ! wait_for_service $SERVICE_TIMEOUT $service_protocol://$MAGNUM_SERVICE_HOST:$service_port; then
|
||||
die $LINENO "magnum-api did not start"
|
||||
|
@ -320,7 +320,7 @@ function configure_iptables {
|
|||
ROUTE_TO_INTERNET=$(ip route get 8.8.8.8)
|
||||
OBOUND_DEV=$(echo ${ROUTE_TO_INTERNET#*dev} | awk '{print $1}')
|
||||
sudo iptables -t nat -A POSTROUTING -o $OBOUND_DEV -j MASQUERADE
|
||||
# bay nodes will access m-api (port $MAGNUM_SERVICE_PORT) to get CA certificate.
|
||||
# bay nodes will access magnum-api (port $MAGNUM_SERVICE_PORT) to get CA certificate.
|
||||
sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $MAGNUM_SERVICE_PORT -j ACCEPT || true
|
||||
sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $KEYSTONE_SERVICE_PORT -j ACCEPT || true
|
||||
fi
|
||||
|
@ -332,12 +332,12 @@ function start_magnum {
|
|||
|
||||
# ``run_process`` checks ``is_service_enabled``, it is not needed here
|
||||
start_magnum_api
|
||||
run_process m-cond "$MAGNUM_BIN_DIR/magnum-conductor"
|
||||
run_process magnum-cond "$MAGNUM_BIN_DIR/magnum-conductor"
|
||||
}
|
||||
|
||||
# stop_magnum() - Stop running processes (non-screen)
|
||||
function stop_magnum {
|
||||
for serv in m-api m-cond; do
|
||||
for serv in magnum-api magnum-cond; do
|
||||
stop_process $serv
|
||||
done
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ echo_summary "magnum's plugin.sh was called..."
|
|||
source $DEST/magnum/devstack/lib/magnum
|
||||
(set -o posix; set)
|
||||
|
||||
if is_service_enabled m-api m-cond; then
|
||||
if is_service_enabled magnum-api magnum-cond; then
|
||||
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
echo_summary "Installing magnum"
|
||||
install_magnum
|
||||
|
||||
# add image to glance
|
||||
if [[ "$ENABLED_SERVICES" =~ 'm-api' ]]; then
|
||||
if [[ "$ENABLED_SERVICES" =~ 'magnum-api' ]]; then
|
||||
# TODO Add a "latest" link to fedora release process
|
||||
# TODO(hongbin): Uncomment below when the mirror become stable
|
||||
#ATOMIC_IMAGE_NAME=$( \
|
||||
|
|
|
@ -33,5 +33,5 @@ enable_service h-api-cfn
|
|||
enable_service h-api-cw
|
||||
|
||||
# Enable Magnum services
|
||||
enable_service m-api
|
||||
enable_service m-cond
|
||||
enable_service magnum-api
|
||||
enable_service magnum-cond
|
||||
|
|
Loading…
Reference in New Issue