From a5867abbc6343fe4cf1bc5305fe3034b628a691a Mon Sep 17 00:00:00 2001 From: zhaoxinyu Date: Thu, 17 Apr 2014 02:04:16 +0000 Subject: [PATCH] Don't start tempest before nova-compute is ready If nova-compute and nova-conductor are on different nodes and n-compute is up before n-conductor, n-compute will retry to register health but there will be increasing wait time between retries, so make sure n-conduct sees available compute nodes before starting tempest. also added a parent http proxy to speed up installation and a dependency for tempest. Change-Id: Ica46c66bc8b7589915490555d86674eb49c0db1c --- install/dependency.sh | 2 +- misc/ci/prepare_node_compass.sh | 1 + misc/ci/tempest_run.sh | 5 ++++- misc/ci/test-install.sh | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/install/dependency.sh b/install/dependency.sh index 7daafc1b..b015ae2d 100755 --- a/install/dependency.sh +++ b/install/dependency.sh @@ -4,7 +4,7 @@ echo 'Installing Required packages for Compass...' sudo yum clean all sudo yum update -y --skip-broken if [ "$tempest" == "true" ]; then - sudo yum install -y virt-install libvirt qemu-kvm libxml2-devel libxslt-devel python-devel sshpass openssl-devel + sudo yum install -y virt-install libvirt qemu-kvm libxml2-devel libffi-devel libxslt-devel python-devel sshpass openssl-devel fi sudo yum install -y rsyslog logrotate ntp iproute openssh-clients python python-devel git wget python-setuptools syslinux python-netaddr python-flask python-flask-sqlalchemy python-amqplib amqp python-paramiko python-mock mod_wsgi httpd squid dhcp bind rsync yum-utils xinetd tftp-server gcc net-snmp-utils net-snmp net-snmp-python python-daemon unzip openssl openssl098e ca-certificates redis python-redis --skip-broken if [[ "$?" != "0" ]]; then diff --git a/misc/ci/prepare_node_compass.sh b/misc/ci/prepare_node_compass.sh index 95afed41..4c5a5ec2 100755 --- a/misc/ci/prepare_node_compass.sh +++ b/misc/ci/prepare_node_compass.sh @@ -5,6 +5,7 @@ sed -i "s/Defaults requiretty/#Defaults requiretty/" /etc/sudoers git clone http://git.openstack.org/stackforge/compass-core cd compass-core source install/install.conf.template +source install/install.conf export tempest=true source install/dependency.sh source install/prepare.sh diff --git a/misc/ci/tempest_run.sh b/misc/ci/tempest_run.sh index b402d7cf..e68bec67 100755 --- a/misc/ci/tempest_run.sh +++ b/misc/ci/tempest_run.sh @@ -96,7 +96,10 @@ iniset /etc/tempest/tempest.conf network public_network_id $public_net_id iniset /etc/tempest/tempest.conf network public_router_id '' iniset /etc/tempest/tempest.conf network quantum_available true iniset /etc/tempest/tempest.conf network tenant_network_cidr '172.16.2.128/25' - +# wait for nova-compute to report health to nova-conductor +# In some scenarios, nova-compute is up before conductor and has to retry +# to register to conductor and there is some wait time between retries. +timeout 180s sh -c "while ! nova service-list |grep nova-compute; do sleep 3; done" #Start a smoke test against cloud without object storage and aws related tests #as they are unavailable for now if [[ $tempest_full == true ]]; then diff --git a/misc/ci/test-install.sh b/misc/ci/test-install.sh index ef6ca2ab..143ab004 100755 --- a/misc/ci/test-install.sh +++ b/misc/ci/test-install.sh @@ -14,4 +14,6 @@ else fi source compass-core/install/install.conf.template /bin/bash -x compass-core/install/install.sh +echo "cache_peer 10.145.81.137 parent 3128 3130 default" >> /etc/squid/squid.conf +service squid restart sleep 5