Merge "Move ansible logging to gate-check script only"
This commit is contained in:
commit
eaf58659c5
@ -31,7 +31,6 @@ export NOVA_VIRT_TYPE=${NOVA_VIRT_TYPE:-"qemu"}
|
|||||||
export TEMPEST_FLAT_CIDR=${TEMPEST_FLAT_CIDR:-"172.29.248.0/22"}
|
export TEMPEST_FLAT_CIDR=${TEMPEST_FLAT_CIDR:-"172.29.248.0/22"}
|
||||||
export FLUSH_IPTABLES=${FLUSH_IPTABLES:-"yes"}
|
export FLUSH_IPTABLES=${FLUSH_IPTABLES:-"yes"}
|
||||||
export RABBITMQ_PACKAGE_URL=${RABBITMQ_PACKAGE_URL:-""}
|
export RABBITMQ_PACKAGE_URL=${RABBITMQ_PACKAGE_URL:-""}
|
||||||
export SYMLINK_DIR=${SYMLINK_DIR:-"$(pwd)/logs"}
|
|
||||||
export MONGO_HOST=172.29.236.100
|
export MONGO_HOST=172.29.236.100
|
||||||
|
|
||||||
# Default disabled fatal deprecation warnings
|
# Default disabled fatal deprecation warnings
|
||||||
@ -55,27 +54,6 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $
|
|||||||
|
|
||||||
## Main ----------------------------------------------------------------------
|
## Main ----------------------------------------------------------------------
|
||||||
|
|
||||||
# Make the /openstack/log directory for openstack-infra gate check log publishing
|
|
||||||
mkdir -p /openstack/log
|
|
||||||
|
|
||||||
# Implement the log directory link for openstack-infra log publishing
|
|
||||||
ln -sf /openstack/log $SYMLINK_DIR
|
|
||||||
|
|
||||||
# Create ansible logging directory and add in a log file entry into ansible.cfg
|
|
||||||
if [ -f "playbooks/ansible.cfg" ];then
|
|
||||||
mkdir -p /openstack/log/ansible-logging
|
|
||||||
if [ ! "$(grep -e '^log_path\ =\ /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg)" ];then
|
|
||||||
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check that the link creation was successful
|
|
||||||
[[ -d $SYMLINK_DIR ]] || exit_fail
|
|
||||||
if ! [ -d $SYMLINK_DIR ] ; then
|
|
||||||
echo "Could not create a link from /openstack/log to ${SYMLINK_DIR}"
|
|
||||||
exit_fail
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Log some data about the instance and the rest of the system
|
# Log some data about the instance and the rest of the system
|
||||||
log_instance_info
|
log_instance_info
|
||||||
|
|
||||||
|
@ -14,10 +14,9 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
## Shell Opts ----------------------------------------------------------------
|
## Shell Opts ----------------------------------------------------------------
|
||||||
set -e -u +x
|
set -e -u -x
|
||||||
|
|
||||||
## Variables -----------------------------------------------------------------
|
## Variables -----------------------------------------------------------------
|
||||||
export ANSIBLE_DISABLE_COLOR=${ANSIBLE_DISABLE_COLOR:-"yes"}
|
|
||||||
export BOOTSTRAP_ANSIBLE=${BOOTSTRAP_ANSIBLE:-"yes"}
|
export BOOTSTRAP_ANSIBLE=${BOOTSTRAP_ANSIBLE:-"yes"}
|
||||||
export BOOTSTRAP_AIO=${BOOTSTRAP_AIO:-"yes"}
|
export BOOTSTRAP_AIO=${BOOTSTRAP_AIO:-"yes"}
|
||||||
export RUN_PLAYBOOKS=${RUN_PLAYBOOKS:-"yes"}
|
export RUN_PLAYBOOKS=${RUN_PLAYBOOKS:-"yes"}
|
||||||
@ -43,12 +42,18 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $
|
|||||||
|
|
||||||
## Main ----------------------------------------------------------------------
|
## Main ----------------------------------------------------------------------
|
||||||
|
|
||||||
# Remove color options
|
# Disable Ansible color output
|
||||||
if [ "${ANSIBLE_DISABLE_COLOR}" == "yes" ]; then
|
sed -i 's/nocolor.*/nocolor = 1/' $(dirname ${0})/../playbooks/ansible.cfg
|
||||||
pushd $(dirname ${0})/../playbooks
|
|
||||||
sed -i 's/nocolor.*/nocolor = 1/' ansible.cfg
|
# Make the /openstack/log directory for openstack-infra gate check log publishing
|
||||||
popd
|
mkdir -p /openstack/log
|
||||||
fi
|
|
||||||
|
# Implement the log directory link for openstack-infra log publishing
|
||||||
|
ln -sf /openstack/log $(dirname ${0})/../logs
|
||||||
|
|
||||||
|
# Create ansible logging directory and add in a log file entry into ansible.cfg
|
||||||
|
mkdir -p /openstack/log/ansible-logging
|
||||||
|
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' $(dirname ${0})/../playbooks/ansible.cfg
|
||||||
|
|
||||||
# Bootstrap an AIO setup if required
|
# Bootstrap an AIO setup if required
|
||||||
if [ "${BOOTSTRAP_AIO}" == "yes" ]; then
|
if [ "${BOOTSTRAP_AIO}" == "yes" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user