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
This commit is contained in:
rabi 2017-02-09 09:04:51 +05:30
parent 45ae709e75
commit a47dfea24b
3 changed files with 18 additions and 4 deletions

View File

@ -25,12 +25,15 @@ set -o xtrace
HEAT_USER=heat_grenade HEAT_USER=heat_grenade
HEAT_PROJECT=heat_grenade HEAT_PROJECT=heat_grenade
HEAT_PASS=pass HEAT_PASS=pass
DEFAULT_DOMAIN=default
function _heat_set_user { function _heat_set_user {
OS_TENANT_NAME=$HEAT_PROJECT OS_TENANT_NAME=$HEAT_PROJECT
OS_PROJECT_NAME=$HEAT_PROJECT OS_PROJECT_NAME=$HEAT_PROJECT
OS_USERNAME=$HEAT_USER OS_USERNAME=$HEAT_USER
OS_PASSWORD=$HEAT_PASS OS_PASSWORD=$HEAT_PASS
OS_USER_DOMAIN_ID=$DEFAULT_DOMAIN
OS_PROJECT_DOMAIN_ID=$DEFAULT_DOMAIN
} }
function create { function create {
@ -42,6 +45,8 @@ function create {
iniset $conf_file heat_plugin password $OS_PASSWORD iniset $conf_file heat_plugin password $OS_PASSWORD
iniset $conf_file heat_plugin tenant_name $OS_PROJECT_NAME 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 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 user_domain_name $OS_USER_DOMAIN_NAME
iniset $conf_file heat_plugin project_domain_name $OS_PROJECT_DOMAIN_NAME iniset $conf_file heat_plugin project_domain_name $OS_PROJECT_DOMAIN_NAME
iniset $conf_file heat_plugin region $OS_REGION_NAME iniset $conf_file heat_plugin region $OS_REGION_NAME
@ -54,6 +59,7 @@ function create {
die $LINENO "Didn't create $HEAT_PROJECT project" die $LINENO "Didn't create $HEAT_PROJECT project"
fi fi
resource_save heat project_id $id resource_save heat project_id $id
local project_id=$id
# creates the user, and sets $id locally # creates the user, and sets $id locally
eval $(openstack user create $HEAT_USER \ eval $(openstack user create $HEAT_USER \
@ -64,6 +70,10 @@ function create {
die $LINENO "Didn't create $HEAT_USER user" die $LINENO "Didn't create $HEAT_USER user"
fi fi
resource_save heat user_id $id 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 _heat_set_user
local stack_name='grenadine' local stack_name='grenadine'

View File

@ -20,12 +20,15 @@ source $GRENADE_DIR/functions
# We need base DevStack functions for this # We need base DevStack functions for this
source $BASE_DEVSTACK_DIR/functions source $BASE_DEVSTACK_DIR/functions
source $BASE_DEVSTACK_DIR/stackrc # needed for status directory 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 set -o xtrace
for serv in h-eng h-api h-api-cfn h-api-cw; do stop_heat
stop_process $serv
done
SERVICES_DOWN="heat-api heat-engine heat-api-cfn heat-api-cloudwatch" SERVICES_DOWN="heat-api heat-engine heat-api-cfn heat-api-cloudwatch"

View File

@ -85,7 +85,8 @@ $HEAT_BIN_DIR/heat-manage --config-file $HEAT_CONF db_sync || die $LINENO "DB sy
start_heat start_heat
# Don't succeed unless the services come up # 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 set +o xtrace
echo "*********************************************************************" echo "*********************************************************************"