remove set_configs

Change-Id: I9bb0a1fac63cc326234b0f06b1e56b43e0753279
Partially-Implements: blueprint replace-config-external
This commit is contained in:
Sam Yaple 2015-09-27 11:38:25 +00:00
parent 5e60d8ec87
commit 160f1cc011
67 changed files with 10 additions and 303 deletions

View File

@ -1,22 +1,5 @@
#!/bin/bash
set_configs() {
case $KOLLA_CONFIG_STRATEGY in
COPY_ALWAYS)
source /opt/kolla/config-external.sh
;;
COPY_ONCE)
if [[ -f /configured ]]; then
echo 'INFO - This container has already been configured; Refusing to copy new configs'
else
source /opt/kolla/config-external.sh
touch /configured
fi
;;
*)
echo '$KOLLA_CONFIG_STRATEGY is not set properly'
exit 1
;;
esac
}
# Copying configs into place if needed and set run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-alarm"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-api"
@ -8,9 +7,6 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here.
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-agent-central"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-collector"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-agent-compute"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceilometer-agent-notification"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/ceph-mon"
@ -14,9 +13,6 @@ MON_DIR="/var/lib/ceph/mon/ceph-$(hostname)"
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,13 +1,9 @@
#!/bin/bash
set -o xtrace
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,14 +1,9 @@
#!/bin/bash
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,12 +1,7 @@
#!/bin/bash
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -1,12 +1,7 @@
#!/bin/bash
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -1,12 +1,7 @@
#!/bin/bash
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -1,15 +1,12 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/designate-api"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -o errexit
CMD="/usr/sbin/named"
ARGS="-u named -g"
# Execute config strategy
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/designate-central"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/designate-mdns"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/designate-pool-manager"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/designate-sink"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@ -15,5 +11,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
exit 0
fi
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -7,9 +7,6 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -7,8 +7,5 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# We are intentionally not using exec so we can reload the haproxy config later
$CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
# Loading common functions
@ -11,8 +10,4 @@ if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \
source /etc/apache2/envvars
fi
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
modprobe ip_vs
# Workaround for bug #1485079

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
# Loading common functions
@ -11,10 +10,6 @@ if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \
source /etc/apache2/envvars
fi
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -4,7 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD $ARGS

View File

@ -1,15 +1,12 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/magnum-api"
ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/magnum-conductor"
@ -8,7 +7,4 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS

View File

@ -1,15 +1,8 @@
#!/bin/bash
set -o errexit
# Loading common functions
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Loading functions
source /opt/kolla/config/config-galera.sh
chown mysql: /var/lib/mysql
@ -24,5 +17,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]] && [[ ! -e /var/lib/mysql/cluster.exists ]]; t
exit 0
fi
echo "Running command: ${CMD}"
exec $CMD

View File

@ -1,12 +1,7 @@
#!/bin/bash
set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -5,8 +5,4 @@ set -o errexit
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -5,8 +5,4 @@ set -o errexit
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -4,10 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@ -15,5 +11,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
exit 0
fi
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,9 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
mkdir -p "/run/openvswitch"
if [[ ! -e "/etc/openvswitch/conf.db" ]]; then
ovsdb-tool create "/etc/openvswitch/conf.db"

View File

@ -4,9 +4,6 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
modprobe openvswitch
exec $CMD

View File

@ -1,15 +1,8 @@
#!/bin/bash
set -o errexit
# loading common functions
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# loading functions
source /opt/kolla/config-rabbit.sh
# This catches all cases of the BOOTSTRAP variable being set, including empty
@ -18,5 +11,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
exit 0
fi
echo "Running command: ${CMD}"
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -5,8 +5,4 @@ set -o errexit
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-swift.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -4,8 +4,4 @@ set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -o errexit
CMD="/usr/bin/zaqar-server"
@ -8,9 +7,6 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then