From 11ce6c74227bcb7ed6bc6e971bf540b4186acf14 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 9 Sep 2015 15:53:39 -0500 Subject: [PATCH] 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 Closes-Bug: #1498009 Change-Id: If159c75428f07e7f92c6c1807a054feca6292ad5 --- scripts/gate-check-commit.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 59ed7477f0..b25d3b3f43 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -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