diff options
author | ZhiQiang Fan <aji.zqfan@gmail.com> | 2015-10-22 08:37:14 -0600 |
---|---|---|
committer | ZhiQiang Fan <aji.zqfan@gmail.com> | 2015-10-23 02:26:13 -0600 |
commit | 9c3278c942e07cc0f94439895cffafbe6697afbc (patch) | |
tree | 2b968e6d31415c2e0149487116c95594fb6f6946 /devstack | |
parent | 6b0845fb1d28622bbae411d49210d744a473ba97 (diff) | |
download | ceilometer-9c3278c942e07cc0f94439895cffafbe6697afbc.tar.gz |
configure Apache only when ceilometer-api is enabled
Currently, even though ceilometer-api service is disabled by user,
we still try to configure ceilometer-api in Apache if CEILOMETER_USE_MOD_WSGI
is not set to false. This patch adds a constraint to ensure we only
configure when ceilometer-api is enabled.
Change-Id: I3f2bab3f646f7df57c32db3251f811cb801d93de
Partial-Bug: #1508518
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/plugin.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c1c456a3..72c012f1 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -202,7 +202,7 @@ function cleanup_ceilometer { elif [ "$CEILOMETER_BACKEND" = 'es' ] ; then curl -XDELETE "localhost:9200/events_*" fi - if [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then + if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then _ceilometer_cleanup_apache_wsgi fi } @@ -293,7 +293,7 @@ function configure_ceilometer { # NOTE: This must come after database configurate as those can # call cleanup_ceilometer which will wipe the WSGI config. - if [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then + if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then iniset $CEILOMETER_CONF api pecan_debug "False" _ceilometer_config_apache_wsgi fi @@ -331,7 +331,10 @@ function install_ceilometer { _ceilometer_prepare_virt_drivers install_ceilometerclient setup_develop $CEILOMETER_DIR - sudo install -d -o $STACK_USER -m 755 $CEILOMETER_CONF_DIR $CEILOMETER_API_LOG_DIR + sudo install -d -o $STACK_USER -m 755 $CEILOMETER_CONF_DIR + if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "False" ]; then + sudo install -d -o $STACK_USER -m 755 $CEILOMETER_API_LOG_DIR + fi } # install_ceilometerclient() - Collect source and prepare @@ -353,7 +356,7 @@ function start_ceilometer { if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF" - else + elif is_service_enabled ceilometer-api; then enable_apache_site ceilometer restart_apache_server tail_log ceilometer /var/log/$APACHE_NAME/ceilometer.log |