Set affinity to 1 for OpenStack-CI gate checks

This change sets the affinity for the RabbitMQ, Galera, Repo, Keystone and
Horizon containers to 1 when running on OpenStack-CI. The intention here is
to reduce the number of failures we see within the gate due to resource
starvation.

This patch is specifically only going into the master (Liberty) branch as
this is the only place where resource starvation has become critical. This
patch is a holdover until the current gate check design is revised after the
Liberty release. The redesign will split the current monolithic gate check
into multiple use-cases which each use less resources. This is described in
https://review.openstack.org/221009

Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Closes-Bug: #1498009
Change-Id: If159c75428f07e7f92c6c1807a054feca6292ad5
This commit is contained in:
kevin 2015-09-09 15:53:39 -05:00 committed by Jesse Pretorius
parent 922b995391
commit 11ce6c7422
1 changed files with 16 additions and 1 deletions

View File

@ -55,16 +55,31 @@ ln -sf /openstack/log $(dirname ${0})/../logs
mkdir -p /openstack/log/ansible-logging
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' $(dirname ${0})/../playbooks/ansible.cfg
# Ubuntu Repository Determination (based on provider information in OpenStack-CI)
# Adjust settings based on the Cloud Provider info in OpenStack-CI
if [ -fs /etc/nodepool/provider ]; then
source /etc/nodepool/provider
if [[ ${NODEPOOL_PROVIDER} == "rax"* ]]; then
# Set the Ubuntu Repository to the RAX Mirror
export UBUNTU_REPO="http://mirror.rackspace.com/ubuntu"
export UBUNTU_SEC_REPO="${UBUNTU_REPO}"
elif [[ ${NODEPOOL_PROVIDER} == "hpcloud"* ]]; then
# Set the Ubuntu Repository to the HP Cloud Mirror
export UBUNTU_REPO="http://${NODEPOOL_AZ}.clouds.archive.ubuntu.com/ubuntu"
export UBUNTU_SEC_REPO="${UBUNTU_REPO}"
fi
# Reduce container affinities as Liberty appears to consume
# a greater volume of resources, causing greater numbers
# of failures with the default affinities.
for container_type in rabbit_mq repo galera horizon keystone; do
export "NUM_${container_type}_CONTAINER=1"
done
fi
# Enable detailed task profiling