diff --git a/files/apache-nova-api.template b/files/apache-nova-api.template
index 70ccedddc8..301a3bdbdd 100644
--- a/files/apache-nova-api.template
+++ b/files/apache-nova-api.template
@@ -1,7 +1,7 @@
Listen %PUBLICPORT%
- WSGIDaemonProcess nova-api processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
+ WSGIDaemonProcess nova-api processes=%APIWORKERS% threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
WSGIProcessGroup nova-api
WSGIScriptAlias / %PUBLICWSGI%
WSGIApplicationGroup %{GLOBAL}
@@ -13,4 +13,4 @@ Listen %PUBLICPORT%
%SSLENGINE%
%SSLCERTFILE%
%SSLKEYFILE%
-
\ No newline at end of file
+
diff --git a/files/apache-nova-ec2-api.template b/files/apache-nova-ec2-api.template
index ae4cf94a38..235d958d1a 100644
--- a/files/apache-nova-ec2-api.template
+++ b/files/apache-nova-ec2-api.template
@@ -1,7 +1,7 @@
Listen %PUBLICPORT%
- WSGIDaemonProcess nova-ec2-api processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
+ WSGIDaemonProcess nova-ec2-api processes=%APIWORKERS% threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
WSGIProcessGroup nova-ec2-api
WSGIScriptAlias / %PUBLICWSGI%
WSGIApplicationGroup %{GLOBAL}
@@ -13,4 +13,4 @@ Listen %PUBLICPORT%
%SSLENGINE%
%SSLCERTFILE%
%SSLKEYFILE%
-
\ No newline at end of file
+
diff --git a/lib/nova b/lib/nova
index a9f335115d..88b336a1be 100644
--- a/lib/nova
+++ b/lib/nova
@@ -232,6 +232,10 @@ function cleanup_nova {
#if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
# cleanup_nova_hypervisor
#fi
+
+ if [ "$NOVA_USE_MOD_WSGI" == "True" ]; then
+ _cleanup_nova_apache_wsgi
+ fi
}
# _cleanup_nova_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file
@@ -277,6 +281,7 @@ function _config_nova_apache_wsgi {
s|%SSLKEYFILE%|$nova_keyfile|g;
s|%USER%|$STACK_USER|g;
s|%VIRTUALENV%|$venv_path|g
+ s|%APIWORKERS%|$API_WORKERS|g
" -i $nova_apache_conf
sudo cp $FILES/apache-nova-ec2-api.template $nova_ec2_apache_conf
@@ -289,6 +294,7 @@ function _config_nova_apache_wsgi {
s|%SSLKEYFILE%|$nova_keyfile|g;
s|%USER%|$STACK_USER|g;
s|%VIRTUALENV%|$venv_path|g
+ s|%APIWORKERS%|$API_WORKERS|g
" -i $nova_ec2_apache_conf
}
@@ -761,8 +767,8 @@ function start_nova_api {
enable_apache_site nova-api
enable_apache_site nova-ec2-api
restart_apache_server
- tail_log nova /var/log/$APACHE_NAME/nova-api.log
- tail_log nova /var/log/$APACHE_NAME/nova-ec2-api.log
+ tail_log nova-api /var/log/$APACHE_NAME/nova-api.log
+ tail_log nova-ec2-api /var/log/$APACHE_NAME/nova-ec2-api.log
else
run_process n-api "$NOVA_BIN_DIR/nova-api"
fi