From a47dfea24bf0c998d7d6d039cd72df78190258e3 Mon Sep 17 00:00:00 2001 From: rabi Date: Thu, 9 Feb 2017 09:04:51 +0530 Subject: [PATCH] Fix number of issues with grenade job - Use domain ids along with domain names It's possible that either the domain_id or domain_name is set in the env. - Adds an workaround for bug #1662911 - Fix shutdown script for apache Change-Id: Ib9d3c14327d73d8cb0e0cddcc9d16191797ffffa Closes-Bug: #1663105 --- devstack/upgrade/resources.sh | 10 ++++++++++ devstack/upgrade/shutdown.sh | 9 ++++++--- devstack/upgrade/upgrade.sh | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index f45abaf7ca..c8f00c1e07 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -25,12 +25,15 @@ set -o xtrace HEAT_USER=heat_grenade HEAT_PROJECT=heat_grenade HEAT_PASS=pass +DEFAULT_DOMAIN=default function _heat_set_user { OS_TENANT_NAME=$HEAT_PROJECT OS_PROJECT_NAME=$HEAT_PROJECT OS_USERNAME=$HEAT_USER OS_PASSWORD=$HEAT_PASS + OS_USER_DOMAIN_ID=$DEFAULT_DOMAIN + OS_PROJECT_DOMAIN_ID=$DEFAULT_DOMAIN } function create { @@ -42,6 +45,8 @@ function create { iniset $conf_file heat_plugin password $OS_PASSWORD iniset $conf_file heat_plugin tenant_name $OS_PROJECT_NAME iniset $conf_file heat_plugin auth_url $OS_AUTH_URL + iniset $conf_file heat_plugin user_domain_id $OS_USER_DOMAIN_ID + iniset $conf_file heat_plugin project_domain_id $OS_PROJECT_DOMAIN_ID iniset $conf_file heat_plugin user_domain_name $OS_USER_DOMAIN_NAME iniset $conf_file heat_plugin project_domain_name $OS_PROJECT_DOMAIN_NAME iniset $conf_file heat_plugin region $OS_REGION_NAME @@ -54,6 +59,7 @@ function create { die $LINENO "Didn't create $HEAT_PROJECT project" fi resource_save heat project_id $id + local project_id=$id # creates the user, and sets $id locally eval $(openstack user create $HEAT_USER \ @@ -64,6 +70,10 @@ function create { die $LINENO "Didn't create $HEAT_USER user" fi resource_save heat user_id $id + # with keystone v3 user created in a project is not assigned a role + # https://bugs.launchpad.net/keystone/+bug/1662911 + openstack role add Member --user $id --project $project_id + _heat_set_user local stack_name='grenadine' diff --git a/devstack/upgrade/shutdown.sh b/devstack/upgrade/shutdown.sh index 55ceed338c..2e429a3f51 100755 --- a/devstack/upgrade/shutdown.sh +++ b/devstack/upgrade/shutdown.sh @@ -20,12 +20,15 @@ source $GRENADE_DIR/functions # We need base DevStack functions for this source $BASE_DEVSTACK_DIR/functions source $BASE_DEVSTACK_DIR/stackrc # needed for status directory +source $BASE_DEVSTACK_DIR/lib/tls +source $BASE_DEVSTACK_DIR/lib/apache + +HEAT_DEVSTACK_DIR=$(dirname $(dirname $0)) +source $HEAT_DEVSTACK_DIR/lib/heat set -o xtrace -for serv in h-eng h-api h-api-cfn h-api-cw; do - stop_process $serv -done +stop_heat SERVICES_DOWN="heat-api heat-engine heat-api-cfn heat-api-cloudwatch" diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 594f95f81e..905d48a5f1 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -85,7 +85,8 @@ $HEAT_BIN_DIR/heat-manage --config-file $HEAT_CONF db_sync || die $LINENO "DB sy start_heat # Don't succeed unless the services come up -ensure_services_started heat-api heat-engine heat-api-cloudwatch heat-api-cfn +# Truncating some service names to 11 characters +ensure_services_started heat-api heat-engine heat-api-cl heat-api-cf set +o xtrace echo "*********************************************************************"