From 1e955530d68c370719b81bea9707bb3704c08c77 Mon Sep 17 00:00:00 2001 From: blsaws Date: Mon, 8 Aug 2016 15:05:03 -0700 Subject: Add extension to Centos image reference; minor fixes to cleanup script JIRA: MODELS-23 Change-Id: I3a7e930f9487a7738507081a4031052a7dd5fdd1 Signed-off-by: blsaws --- tests/utils/cloudify-clean.sh | 13 +++++++------ tests/utils/cloudify-setup.sh | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/utils/cloudify-clean.sh b/tests/utils/cloudify-clean.sh index f5bd487..d7e6aa9 100644 --- a/tests/utils/cloudify-clean.sh +++ b/tests/utils/cloudify-clean.sh @@ -31,12 +31,12 @@ # flip=($(neutron floatingip-list|grep -v "+"|grep -v id|awk '{print $2}')); for id in ${flip[@]}; do neutron floatingip-delete ${id}; done function setenv () { -mkdir /tmp/cloudify +mkdir -p /tmp/cloudify if [ "$dist" == "Ubuntu" ]; then echo "cloudify-clean.sh: Ubuntu-based install" echo "cloudify-clean.sh: Create the environment file" KEYSTONE_HOST=$(juju status --format=short | awk "/keystone\/0/ { print \$3 }") - cat </tmp/cloudify/admin-openrc + cat </tmp/cloudify/admin-openrc.sh export CONGRESS_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export HORIZON_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export KEYSTONE_HOST=$KEYSTONE_HOST @@ -59,7 +59,7 @@ else echo "cloudify-clean.sh: Get address of Controller node" export CONTROLLER_HOST1=$(openstack server list | awk "/overcloud-controller-0/ { print \$8 }" | sed 's/ctlplane=//g') echo "cloudify-clean.sh: Create the environment file" - cat </tmp/cloudify/admin-openrc + cat </tmp/cloudify/admin-openrc.sh export CONGRESS_HOST=$CONTROLLER_HOST1 export KEYSTONE_HOST=$CONTROLLER_HOST1 export CEILOMETER_HOST=$CONTROLLER_HOST1 @@ -68,15 +68,16 @@ export GLANCE_HOST=$CONTROLLER_HOST1 export NEUTRON_HOST=$CONTROLLER_HOST1 export NOVA_HOST=$CONTROLLER_HOST1 EOF - cat ~/overcloudrc >>/tmp/cloudify/admin-openrc + cat ~/overcloudrc >>/tmp/cloudify/admin-openrc.sh source ~/overcloudrc export OS_REGION_NAME=$(openstack endpoint list | awk "/ nova / { print \$4 }") # sed command below is a workaound for a bug - region shows up twice for some reason - cat <>/tmp/cloudify/admin-openrc + cat <>/tmp/cloudify/admin-openrc.sh export OS_REGION_NAME=$OS_REGION_NAME EOF fi -source /tmp/cloudify/admin-openrc + +source /tmp/cloudify/admin-openrc.sh } dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` diff --git a/tests/utils/cloudify-setup.sh b/tests/utils/cloudify-setup.sh index 45cea3b..28a25a9 100644 --- a/tests/utils/cloudify-setup.sh +++ b/tests/utils/cloudify-setup.sh @@ -191,7 +191,7 @@ if [ "$1" == "cloudify-manager" ]; then # CentOS-7-x86_64-GenericCloud.qcow2 failed to be routable (?), so changed to 1607 version image=$(openstack image list | awk "/ CentOS-7-x86_64-GenericCloud-1607 / { print \$2 }") if [ -z $image ]; then - glance --os-image-api-version 1 image-create --name CentOS-7-x86_64-GenericCloud-1607 --disk-format qcow2 --location http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2-1607 --container-format bare + glance --os-image-api-version 1 image-create --name CentOS-7-x86_64-GenericCloud-1607 --disk-format qcow2 --location http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1607.qcow2 --container-format bare fi image=$(openstack image list | awk "/ CentOS-7-x86_64-GenericCloud-1607 / { print \$2 }") sed -i -- "s/image_id: ''/image_id: '$image'/g" openstack-manager-blueprint-inputs.yaml @@ -209,7 +209,7 @@ if [ "$1" == "cloudify-manager" ]; then sed -i -- "s/#management_subnet_dns_nameservers: \[\]/management_subnet_dns_nameservers: \[8.8.8.8\]/g" openstack-manager-blueprint-inputs.yaml echo "cloudify-setup.sh: Bootstrap the manager" - cfy bootstrap --install-plugins --keep-up-on-failure -p openstack-manager-blueprint.yaml -i openstack-manager-blueprint-inputs.yaml + cfy bootstrap --install-plugins --keep-up-on-failure --task-retries=10 -p openstack-manager-blueprint.yaml -i openstack-manager-blueprint-inputs.yaml echo "cloudify-setup.sh: install needed packages to support blueprints 'not using managed plugins'" # See https://cloudifysource.atlassian.net/browse/CFY-5050 -- cgit 1.2.3-korg