Remove default apache port

The default apache port overlaps with horizon, but
uses a different address syntax, *:80  vs 0.0.0.0:80.
This causes apache2 to sometimes fail on startup with
Address already in use: AH00072: make_sock: could not bind to address [::]:80

Change-Id: I7aa178878a6d283c4e5e0334a8bdcba30c8f242a
This commit is contained in:
Mark Vanderwiel 2016-04-08 10:48:02 -05:00
parent 5285aed416
commit 654533a79d
2 changed files with 5 additions and 2 deletions

View File

@ -49,8 +49,11 @@ https_bind_address = bind_address https_bind
# This allows the apache2/templates/default/ports.conf.erb to setup the correct listeners.
# Need to convert from Chef::Node::ImmutableArray in order to be able to modify
apache2_listen = Array(node['apache']['listen'])
apache2_listen += ["#{http_bind.host}:#{http_bind.port}"]
# Remove the default apache2 cookbook port, as that is also the default for horizon, but with
# a different address syntax. *:80 vs 0.0.0.0:80
apache2_listen -= ['*:80']
apache2_listen += ["#{http_bind.host}:#{http_bind.port}"]
if node['openstack']['dashboard']['use_ssl']
apache2_listen += ["#{https_bind.host}:#{https_bind.port}"]
end

View File

@ -54,7 +54,7 @@ describe 'openstack-dashboard::apache2-server' do
end
it 'set apache addresses and ports' do
expect(chef_run.node['apache']['listen']).to eq %w(*:80 0.0.0.0:80 0.0.0.0:443)
expect(chef_run.node['apache']['listen']).to eq %w(0.0.0.0:80 0.0.0.0:443)
end
it 'includes apache packages' do