Add hasrestart to some services

Hasrestart makes Puppet use restart instead of stop
and start to manage a service and many init scripts
would work better if used like this.

Change-Id: I9e8e86a1c5bf4bcac9683542e9cfb7ca3100c9e8
Closes-Bug: 1364119
This commit is contained in:
Dmitry Ilyin 2014-09-01 22:23:06 +04:00
parent 399f016bbb
commit b5d525175b
13 changed files with 26 additions and 13 deletions

View File

@ -134,7 +134,8 @@ class cinder::api (
ensure => $ensure, ensure => $ensure,
name => $::cinder::params::api_service, name => $::cinder::params::api_service,
enable => $enabled, enable => $enabled,
hasstatus => true, hasstatus => true,
hasrestart => true,
} }
cinder_config { cinder_config {

View File

@ -71,7 +71,8 @@ class cinder::backup (
ensure => $ensure, ensure => $ensure,
name => $::cinder::params::backup_service, name => $::cinder::params::backup_service,
enable => $enabled, enable => $enabled,
hasstatus => true, hasstatus => true,
hasrestart => true,
} }
cinder_config { cinder_config {

View File

@ -41,6 +41,7 @@ class cinder::scheduler (
ensure => $ensure, ensure => $ensure,
name => $::cinder::params::scheduler_service, name => $::cinder::params::scheduler_service,
enable => $enabled, enable => $enabled,
hasstatus => true, hasstatus => true,
hasrestart => true,
} }
} }

View File

@ -35,6 +35,7 @@ class cinder::volume (
ensure => $ensure, ensure => $ensure,
name => $::cinder::params::volume_service, name => $::cinder::params::volume_service,
enable => $enabled, enable => $enabled,
hasstatus => true, hasstatus => true,
hasrestart => true,
} }
} }

View File

@ -200,7 +200,7 @@ class neutron::agents::dhcp (
enable => true, enable => true,
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,
hasrestart => false, hasrestart => true,
provider => $service_provider, provider => $service_provider,
require => [Package[$dhcp_agent_package], Class['neutron'], Service['neutron-ovs-agent-service']], require => [Package[$dhcp_agent_package], Class['neutron'], Service['neutron-ovs-agent-service']],
} }

View File

@ -214,7 +214,7 @@ class neutron::agents::l3 (
enable => true, enable => true,
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,
hasrestart => false, hasrestart => true,
provider => "pacemaker", provider => "pacemaker",
} }
@ -242,4 +242,3 @@ class neutron::agents::l3 (
} }
} }

View File

@ -61,6 +61,8 @@ class neutron::agents::metadata (
name => $::neutron::params::metadata_agent_service, name => $::neutron::params::metadata_agent_service,
enable => true, enable => true,
ensure => running, ensure => running,
hasstatus => true,
hasrestart => true,
} }
Anchor['neutron-metadata-agent'] -> Anchor['neutron-metadata-agent'] ->
@ -153,4 +155,3 @@ class neutron::agents::metadata (
notify{ "Module ${module_name} cannot notify service neutron-metadata-agent on package update": } notify{ "Module ${module_name} cannot notify service neutron-metadata-agent on package update": }
} }
} }

View File

@ -222,7 +222,9 @@ class neutron::agents::ml2::ovs (
name => $service_name, name => $service_name,
enable => $enabled, enable => $enabled,
require => Class['neutron'], require => Class['neutron'],
provider => $service_provider provider => $service_provider,
hasstatus => true,
hasrestart => true,
} }
Package <| title == 'neutron-ovs-agent' |> ~> Service['neutron-ovs-agent-service'] Package <| title == 'neutron-ovs-agent' |> ~> Service['neutron-ovs-agent-service']
@ -231,6 +233,8 @@ class neutron::agents::ml2::ovs (
ensure => $service_ensure, ensure => $service_ensure,
name => $::neutron::params::ovs_cleanup_service, name => $::neutron::params::ovs_cleanup_service,
enable => $enabled, enable => $enabled,
hasstatus => true,
hasrestart => true,
} }
Package <| title == 'neutron-ovs-agent' |> ~> Service['ovs-cleanup-service'] Package <| title == 'neutron-ovs-agent' |> ~> Service['ovs-cleanup-service']
} }

View File

@ -156,7 +156,7 @@ class neutron::agents::ovs (
enable => true, enable => true,
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,
hasrestart => false, hasrestart => true,
provider => $service_provider, provider => $service_provider,
} }

View File

@ -54,7 +54,8 @@ define nova::generic_service(
ensure => $service_ensure, ensure => $service_ensure,
name => $service_name, name => $service_name,
enable => $enabled, enable => $enabled,
hasstatus => true, hasstatus => true,
hasrestart => true,
require => [Package['nova-common'], Package[$package_name]], require => [Package['nova-common'], Package[$package_name]],
} }
} }

View File

@ -67,7 +67,8 @@ class plugin_neutronnsx::install_ovs (
service { 'nicira-ovs-hypervisor-node': service { 'nicira-ovs-hypervisor-node':
ensure => running, ensure => running,
enable => true, enable => true,
hasstatus => true, hasstatus => true,
hasrestart => true,
} }
Service['nicira-ovs-hypervisor-node'] -> Service['openvswitch-service'] Service['nicira-ovs-hypervisor-node'] -> Service['openvswitch-service']

View File

@ -119,6 +119,8 @@ class swift::proxy(
name => $::swift::params::proxy_service_name, name => $::swift::params::proxy_service_name,
ensure => running, ensure => running,
enable => true, enable => true,
hasstatus => true,
hasrestart => true,
provider => $::swift::params::service_provider, provider => $::swift::params::service_provider,
require => [Concat['/etc/swift/proxy-server.conf']], require => [Concat['/etc/swift/proxy-server.conf']],
subscribe => [Concat['/etc/swift/proxy-server.conf']], subscribe => [Concat['/etc/swift/proxy-server.conf']],

View File

@ -53,7 +53,8 @@ define swift::storage::generic(
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_service_name') %>"), name => inline_template("<%= scope.lookupvar('::swift::params::${name}_service_name') %>"),
ensure => running, ensure => running,
enable => true, enable => true,
hasstatus => true, hasstatus => true,
hasrestart => true,
provider => $service_provider, provider => $service_provider,
subscribe => Package["swift-${name}"], subscribe => Package["swift-${name}"],
} }