Browse code

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>

Doug Hellmann authored on 2012/09/22 23:52:31
Showing 2 changed files
... ...
@@ -48,10 +48,10 @@ function cleanup_ceilometer() {
48 48
 function configure_ceilometer() {
49 49
     setup_develop $CEILOMETER_DIR
50 50
 
51
-    [ -d $CEILOMETER_CONF_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
51
+    [ ! -d $CEILOMETER_CONF_DIR ] && sudo mkdir -m 755 -p $CEILOMETER_CONF_DIR
52 52
     sudo chown $USER $CEILOMETER_CONF_DIR
53 53
 
54
-    [ ! -d $CEILOMETER_API_LOG_DIR ] &&  sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR 
54
+    [ ! -d $CEILOMETER_API_LOG_DIR ] &&  sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
55 55
     sudo chown $USER $CEILOMETER_API_LOG_DIR
56 56
 
57 57
     # ceilometer confs are copy of /etc/nova/nova.conf which must exist first
... ...
@@ -2222,8 +2222,9 @@ if is_service_enabled cinder; then
2222 2222
     start_cinder
2223 2223
 fi
2224 2224
 if is_service_enabled ceilometer; then
2225
-    echo_summary "Starting Ceilometer"
2225
+    echo_summary "Configuring Ceilometer"
2226 2226
     configure_ceilometer
2227
+    echo_summary "Starting Ceilometer"
2227 2228
     start_ceilometer
2228 2229
 fi
2229 2230
 screen_it horizon "cd $HORIZON_DIR && sudo tail -f /var/log/$APACHE_NAME/horizon_error.log"