]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: catch instance creation failure.
authorRobin H. Johnson <robin.johnson@dreamhost.com>
Thu, 10 Dec 2015 19:55:53 +0000 (11:55 -0800)
committerLoic Dachary <ldachary@redhat.com>
Sat, 12 Dec 2015 13:53:01 +0000 (14:53 +0100)
Split the sleep from the server creation, so we catch 'server create'
failures (eg due to quota):
> Quota exceeded for cores: Requested 16, but already used 10 of 20 cores
> (HTTP 403) (Request-ID: req-6467934e-db50-4479-995c-4d44dedf553a)

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit 3c6954642a3d25db5f5814261c0a4c21a0178607)

tasks/buildpackages/Makefile

index 6c1ad010bde23852487153f413160f51c3af86dd..054558938473a770726787558d043746c91675b8 100644 (file)
@@ -26,7 +26,8 @@ ${HOME}/.ssh_agent:
        grep -q ssh_agent ~/.bashrc_teuthology || echo 'source ${HOME}/.ssh_agent' >> ~/.bashrc_teuthology
 
 flock-packages-repository:
-       openstack server create --image 'teuthology-ubuntu-14.04' --flavor ${HTTP_FLAVOR} --key-name teuthology --security-group teuthology --property ownedby=${MY_IP} --wait packages-repository ; sleep 30
+       openstack server create --image 'teuthology-ubuntu-14.04' --flavor ${HTTP_FLAVOR} --key-name teuthology --security-group teuthology --property ownedby=${MY_IP} --wait packages-repository
+       sleep 30
        ip=$(call get_ip,packages-repository) ; \
        ssh $$ip sudo apt-get update ; \
        ssh $$ip sudo apt-get install -y nginx ; \
@@ -40,7 +41,8 @@ packages-repository:
        touch ${D}/$@
 
 ceph-${CEPH_PKG_TYPE}-${CEPH_DIST}-${CEPH_ARCH}-${CEPH_FLAVOR}-${CEPH_SHA1}: packages-repository
-       openstack server create --image 'teuthology-${CEPH_OS_TYPE}-${CEPH_OS_VERSION}' --flavor ${BUILD_FLAVOR} --key-name teuthology --security-group teuthology --property ownedby=${MY_IP} --user-data ${CEPH_OS_TYPE}-${CEPH_OS_VERSION}-user-data.txt --wait $@ ; sleep 30
+       openstack server create --image 'teuthology-${CEPH_OS_TYPE}-${CEPH_OS_VERSION}' --flavor ${BUILD_FLAVOR} --key-name teuthology --security-group teuthology --property ownedby=${MY_IP} --user-data ${CEPH_OS_TYPE}-${CEPH_OS_VERSION}-user-data.txt --wait $@
+       sleep 30
        set -ex ; \
        trap "openstack server delete $@" EXIT ; \
        ip=$(call get_ip,$@) ; \