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 FLUSH_IPTABLES=${FLUSH_IPTABLES:-"yes"}
|
||||
export RABBITMQ_PACKAGE_URL=${RABBITMQ_PACKAGE_URL:-""}
|
||||
export SYMLINK_DIR=${SYMLINK_DIR:-"$(pwd)/logs"}
|
||||
export MONGO_HOST=172.29.236.100
|
||||
|
||||
# Default disabled fatal deprecation warnings
|
||||
@ -55,27 +54,6 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $
|
||||
|
||||
## 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_instance_info
|
||||
|
||||
|
@ -14,10 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
## Shell Opts ----------------------------------------------------------------
|
||||
set -e -u +x
|
||||
set -e -u -x
|
||||
|
||||
## Variables -----------------------------------------------------------------
|
||||
export ANSIBLE_DISABLE_COLOR=${ANSIBLE_DISABLE_COLOR:-"yes"}
|
||||
export BOOTSTRAP_ANSIBLE=${BOOTSTRAP_ANSIBLE:-"yes"}
|
||||
export BOOTSTRAP_AIO=${BOOTSTRAP_AIO:-"yes"}
|
||||
export RUN_PLAYBOOKS=${RUN_PLAYBOOKS:-"yes"}
|
||||
@ -43,12 +42,18 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $
|
||||
|
||||
## Main ----------------------------------------------------------------------
|
||||
|
||||
# Remove color options
|
||||
if [ "${ANSIBLE_DISABLE_COLOR}" == "yes" ]; then
|
||||
pushd $(dirname ${0})/../playbooks
|
||||
sed -i 's/nocolor.*/nocolor = 1/' ansible.cfg
|
||||
popd
|
||||
fi
|
||||
# Disable Ansible color output
|
||||
sed -i 's/nocolor.*/nocolor = 1/' $(dirname ${0})/../playbooks/ansible.cfg
|
||||
|
||||
# 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 $(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
|
||||
if [ "${BOOTSTRAP_AIO}" == "yes" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user