Check for keystone haproxy backend in horizon task

- We should do apache stop/start during apache.pp task to avoid
  apache errors like this:
  "Configuration error: The MPM cannot be changed during restart"
- We should check/wait for keystone haproxy backend in all tasks
  that work with apache service after keystone configuration.
  The only task that was missing this check is horizon.pp

Change-Id: I22216546f610a63c77fecf564d66f923ade7b836
Closes-bug: #1488847
This commit is contained in:
Aleksandr Didenko 2015-08-26 13:15:55 +03:00
parent 486f6ee569
commit 3bbd6ea988
4 changed files with 33 additions and 3 deletions

View File

@ -10,5 +10,4 @@ class { 'osnailyfacter::apache':
}
include ::osnailyfacter::apache_mpm
include ::tweaks::apache_wrappers

View File

@ -47,4 +47,23 @@ class { 'openstack::horizon':
custom_theme_path => 'static/themes/webroot'
}
$haproxy_stats_url = "http://${service_endpoint}:10000/;csv"
haproxy_backend_status { 'keystone-admin' :
name => 'keystone-2',
count => '30',
step => '3',
url => $haproxy_stats_url,
}
haproxy_backend_status { 'keystone-public' :
name => 'keystone-1',
count => '30',
step => '3',
url => $haproxy_stats_url,
}
Class['openstack::horizon'] -> Haproxy_backend_status['keystone-admin']
Class['openstack::horizon'] -> Haproxy_backend_status['keystone-public']
include ::tweaks::apache_wrappers

View File

@ -20,8 +20,8 @@ describe manifest do
it {
should contain_service('httpd').with(
'hasrestart' => true,
'restart' => 'apachectl graceful',
'hasrestart' => nil,
'restart' => nil,
)
}

View File

@ -49,6 +49,18 @@ describe manifest do
)
}
it {
should contain_class('openstack::horizon').that_comes_before(
'Haproxy_backend_status[keystone-admin]'
)
}
it {
should contain_class('openstack::horizon').that_comes_before(
'Haproxy_backend_status[keystone-public]'
)
}
end
test_ubuntu_and_centos manifest
end