Improve restarting Apache
The previous approach could lead to restarting Apache after Anchor['nova::service::end']. The new approach is already used in other Puppet modules and guarantees restarting Apache between the service anchors. Change-Id: I54367a46ffc7f8478d77f5279940ff0d38a279d6
This commit is contained in:
@@ -370,10 +370,9 @@ class nova::api(
|
|||||||
set_code => '101',
|
set_code => '101',
|
||||||
before => Package['nova-api'],
|
before => Package['nova-api'],
|
||||||
}
|
}
|
||||||
|
Service <| title == 'httpd' |> { tag +> 'nova-service' }
|
||||||
# make sure we start apache before nova-api to avoid binding issues
|
# make sure we start apache before nova-api to avoid binding issues
|
||||||
Service[$service_name] -> Service['nova-api']
|
Service[$service_name] -> Service['nova-api']
|
||||||
# make sure apache is refreshed on config changes etc
|
|
||||||
Anchor['nova::service::begin'] ~> Service[$service_name]
|
|
||||||
} else {
|
} else {
|
||||||
fail("Invalid service_name. Either nova-api/openstack-nova-api for running \
|
fail("Invalid service_name. Either nova-api/openstack-nova-api for running \
|
||||||
as a standalone service, or httpd for being run by a httpd server")
|
as a standalone service, or httpd for being run by a httpd server")
|
||||||
|
|||||||
@@ -127,8 +127,7 @@ class nova::wsgi::apache_metadata (
|
|||||||
fail('::nova::metadata class must be declared in composition layer.')
|
fail('::nova::metadata class must be declared in composition layer.')
|
||||||
}
|
}
|
||||||
|
|
||||||
# notify apache on service refreshes
|
Service <| title == 'httpd' |> { tag +> 'nova-service' }
|
||||||
Anchor['nova::service::begin'] ~> Service['httpd']
|
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'nova_metadata_wsgi':
|
::openstacklib::wsgi::apache { 'nova_metadata_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
|||||||
@@ -150,8 +150,7 @@ class nova::wsgi::apache_placement (
|
|||||||
-> File[$::nova::params::placement_httpd_config_file]
|
-> File[$::nova::params::placement_httpd_config_file]
|
||||||
~> Service['httpd']
|
~> Service['httpd']
|
||||||
|
|
||||||
# notify apache on service refreshes
|
Service <| title == 'httpd' |> { tag +> 'nova-service' }
|
||||||
Anchor['nova::service::begin'] ~> Service['httpd']
|
|
||||||
|
|
||||||
::openstacklib::wsgi::apache { 'placement_wsgi':
|
::openstacklib::wsgi::apache { 'placement_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
|||||||
Reference in New Issue
Block a user