Fix test for creating ceilometer conf dir
Fix the test run before the ceilometer configuration
directory is created so that the dir is made if
it does not exist.
Change-Id: I2d6acd4fe7959f976ce99582aed69a49fc3f212e
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
diff --git a/lib/ceilometer b/lib/ceilometer
index 0208753..568a544 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -48,10 +48,10 @@
function configure_ceilometer() {
setup_develop $CEILOMETER_DIR
- [ -d $CEILOMETER_CONF_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
+ [ ! -d $CEILOMETER_CONF_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
sudo chown $USER $CEILOMETER_CONF_DIR
- [ ! -d $CEILOMETER_API_LOG_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
+ [ ! -d $CEILOMETER_API_LOG_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
sudo chown $USER $CEILOMETER_API_LOG_DIR
# ceilometer confs are copy of /etc/nova/nova.conf which must exist first
diff --git a/stack.sh b/stack.sh
index 545c071..e0df6ec 100755
--- a/stack.sh
+++ b/stack.sh
@@ -2222,8 +2222,9 @@
start_cinder
fi
if is_service_enabled ceilometer; then
- echo_summary "Starting Ceilometer"
+ echo_summary "Configuring Ceilometer"
configure_ceilometer
+ echo_summary "Starting Ceilometer"
start_ceilometer
fi
screen_it horizon "cd $HORIZON_DIR && sudo tail -f /var/log/$APACHE_NAME/horizon_error.log"