Placement service only using default HTTPd ports
The placement API configuration was binding a specific port *and* was supporting to be called by the default HTTPd ports using a Location directive. Given that the corresponding service catalog entry for the placement service type doesn't mention the specific application port but is rather using the default port 80, we can remove that specific port and just use the default config. Note that we still need to use a VirtualHost directive for the specific placement config because ErrorLog is only scoped for either server or virtualhost but can't be set for a Location (or a Directory) context. Change-Id: I9a26dcff4b879cf9e82e43a3d1aca2e4fe6aa3e6
This commit is contained in:
parent
894cbd6545
commit
70a6208464
@ -1,6 +1,8 @@
|
||||
Listen %PUBLICPORT%
|
||||
|
||||
<VirtualHost *:%PUBLICPORT%>
|
||||
# NOTE(sbauza): This virtualhost is only here because some directives can
|
||||
# only be set by a virtualhost or server context, so that's why the port is not bound.
|
||||
# TODO(sbauza): Find a better way to identify a free port that is not corresponding to an existing
|
||||
# vhost.
|
||||
<VirtualHost *:8780>
|
||||
WSGIDaemonProcess placement-api processes=%APIWORKERS% threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
|
||||
WSGIProcessGroup placement-api
|
||||
WSGIScriptAlias / %PUBLICWSGI%
|
||||
|
@ -47,7 +47,6 @@ fi
|
||||
# Public facing bits
|
||||
PLACEMENT_SERVICE_PROTOCOL=${PLACEMENT_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
PLACEMENT_SERVICE_HOST=${PLACEMENT_SERVICE_HOST:-$SERVICE_HOST}
|
||||
PLACEMENT_SERVICE_PORT=${PLACEMENT_SERVICE_PORT:-8778}
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
@ -68,7 +67,6 @@ function cleanup_placement {
|
||||
# _config_placement_apache_wsgi() - Set WSGI config files
|
||||
function _config_placement_apache_wsgi {
|
||||
local placement_api_apache_conf
|
||||
local placement_api_port=$PLACEMENT_SERVICE_PORT
|
||||
local venv_path=""
|
||||
local nova_bin_dir=""
|
||||
nova_bin_dir=$(get_python_exec_prefix)
|
||||
@ -89,7 +87,6 @@ function _config_placement_apache_wsgi {
|
||||
|
||||
sudo cp $FILES/apache-placement-api.template $placement_api_apache_conf
|
||||
sudo sed -e "
|
||||
s|%PUBLICPORT%|$placement_api_port|g;
|
||||
s|%APACHE_NAME%|$APACHE_NAME|g;
|
||||
s|%PUBLICWSGI%|$nova_bin_dir/nova-placement-api|g;
|
||||
s|%SSLENGINE%|$placement_ssl|g;
|
||||
@ -161,10 +158,6 @@ function install_placement {
|
||||
|
||||
# start_placement_api() - Start the API processes ahead of other things
|
||||
function start_placement_api {
|
||||
# Get right service port for testing
|
||||
local service_port=$PLACEMENT_SERVICE_PORT
|
||||
local placement_api_port=$PLACEMENT_SERVICE_PORT
|
||||
|
||||
enable_apache_site placement-api
|
||||
restart_apache_server
|
||||
tail_log placement-api /var/log/$APACHE_NAME/placement-api.log
|
||||
|
Loading…
Reference in New Issue
Block a user