diff --git a/lib/ceilometer b/lib/ceilometer index c31fcb920c..749e785c66 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -33,6 +33,7 @@ CEILOMETERCLIENT_DIR=$DEST/python-ceilometerclient CEILOMETER_CONF_DIR=/etc/ceilometer CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api +CEILOMETER_AUTH_CACHE_DIR=${CEILOMETER_AUTH_CACHE_DIR:-/var/cache/ceilometer} # Support potential entry-points console scripts if [ -d $CEILOMETER_DIR/bin ] ; then @@ -84,10 +85,19 @@ function configure_ceilometer() { iniset $CEILOMETER_CONF keystone_authtoken admin_user ceilometer iniset $CEILOMETER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD iniset $CEILOMETER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME + iniset $CEILOMETER_CONF keystone_authtoken signing_dir $CEILOMETER_AUTH_CACHE_DIR cleanup_ceilometer } +# init_ceilometer() - Initialize etc. +function init_ceilometer() { + # Create cache dir + sudo mkdir -p $CEILOMETER_AUTH_CACHE_DIR + sudo chown `whoami` $CEILOMETER_AUTH_CACHE_DIR + rm -f $CEILOMETER_AUTH_CACHE_DIR/* +} + # install_ceilometer() - Collect source and prepare function install_ceilometer() { git_clone $CEILOMETER_REPO $CEILOMETER_DIR $CEILOMETER_BRANCH diff --git a/stack.sh b/stack.sh index 86f8559a59..4122103971 100755 --- a/stack.sh +++ b/stack.sh @@ -1221,6 +1221,7 @@ if is_service_enabled ceilometer; then configure_ceilometer configure_ceilometerclient echo_summary "Starting Ceilometer" + init_ceilometer start_ceilometer fi