Small fixes for running Nova services under Apache2
Following fixed were done: 1. Cleanup fixed. 2. API_WORKERS config option was added to nova config templates. 3. Nova API screen tabs were named as nova-api and nova-ec2-api. Change-Id: I68dc6fd6c8aeffcec7f9039afd63bd1599c65682
This commit is contained in:
parent
aadcde06a2
commit
13f655720d
@ -1,7 +1,7 @@
|
||||
Listen %PUBLICPORT%
|
||||
|
||||
<VirtualHost *:%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%
|
||||
</VirtualHost>
|
||||
</VirtualHost>
|
||||
|
@ -1,7 +1,7 @@
|
||||
Listen %PUBLICPORT%
|
||||
|
||||
<VirtualHost *:%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%
|
||||
</VirtualHost>
|
||||
</VirtualHost>
|
||||
|
10
lib/nova
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user