cleanup noauth path

- we don't need to set keystone_authtoken values
- setting OS_AUTH_TYPE breaks all other clients since it's global
  so just leave it and let user set to client specifically. this
  will not make integration gate work with noauth as there are other
  commands which require gnocchi to be registered in catalog

Change-Id: I3f451a40cdda12072daa69744467403236f633a7
This commit is contained in:
gord chung 2017-01-06 19:41:44 +00:00
parent 6f66b3fb87
commit 60ae8fa95c
1 changed files with 2 additions and 11 deletions

View File

@ -242,9 +242,6 @@ function configure_gnocchi {
iniset $GNOCCHI_CONF storage coordination_url "$GNOCCHI_COORDINATOR_URL"
fi
# Configure auth token middleware
configure_auth_token_middleware $GNOCCHI_CONF gnocchi $GNOCCHI_AUTH_CACHE_DIR
if is_service_enabled gnocchi-statsd ; then
iniset $GNOCCHI_CONF statsd resource_id $GNOCCHI_STATSD_RESOURCE_ID
iniset $GNOCCHI_CONF statsd project_id $GNOCCHI_STATSD_PROJECT_ID
@ -272,6 +269,8 @@ function configure_gnocchi {
fi
if [ "$GNOCCHI_USE_KEYSTONE" == "True" ] ; then
# Configure auth token middleware
configure_auth_token_middleware $GNOCCHI_CONF gnocchi $GNOCCHI_AUTH_CACHE_DIR
iniset $GNOCCHI_CONF api auth_mode keystone
if is_service_enabled gnocchi-grafana; then
iniset $GNOCCHI_CONF cors allowed_origin ${GRAFANA_URL}
@ -433,14 +432,6 @@ function start_gnocchi {
fi
fi
# Create a default policy
if [ "$GNOCCHI_USE_KEYSTONE" == "False" ]; then
export OS_AUTH_TYPE=gnocchi-noauth
export GNOCCHI_USER_ID=`uuidgen`
export GNOCCHI_PROJECT_ID=`uuidgen`
export GNOCCHI_ENDPOINT="$(gnocchi_service_url)"
fi
# run metricd last so we are properly waiting for swift and friends
run_process gnocchi-metricd "$GNOCCHI_BIN_DIR/gnocchi-metricd -d -v --config-file $GNOCCHI_CONF"
run_process gnocchi-statsd "$GNOCCHI_BIN_DIR/gnocchi-statsd -d -v --config-file $GNOCCHI_CONF"