From 8c54849d79b8d78679898bd4fcc47b340ecc9bdb Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Wed, 9 Jan 2013 10:41:54 +0800 Subject: [PATCH] Create signing_dir for ceilometer. Create and initialize the signing_dir for ceilometer keystone authentication. This ensures the ceilometer to use its own PKI cache directory for authentication and avoids the authentication error due to the invalid cached certifications. Change-Id: I6fbc364695ae9be800245d14fd8945d531679550 --- lib/ceilometer | 10 ++++++++++ stack.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/ceilometer b/lib/ceilometer index 76ab254d5f..50b353f9ae 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -32,6 +32,7 @@ CEILOMETER_DIR=$DEST/ceilometer 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 @@ -78,10 +79,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 9f734b9ef9..8b279c19bb 100755 --- a/stack.sh +++ b/stack.sh @@ -1219,6 +1219,7 @@ if is_service_enabled ceilometer; then echo_summary "Configuring Ceilometer" configure_ceilometer echo_summary "Starting Ceilometer" + init_ceilometer start_ceilometer fi