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,
name => $::cinder::params::api_service,
enable => $enabled,
hasstatus => true,
hasstatus => true,
hasrestart => true,
}
cinder_config {

View File

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

View File

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

View File

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

View File

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

View File

@ -214,7 +214,7 @@ class neutron::agents::l3 (
enable => true,
ensure => running,
hasstatus => true,
hasrestart => false,
hasrestart => true,
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,
enable => true,
ensure => running,
hasstatus => true,
hasrestart => true,
}
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": }
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -119,6 +119,8 @@ class swift::proxy(
name => $::swift::params::proxy_service_name,
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
provider => $::swift::params::service_provider,
require => [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') %>"),
ensure => running,
enable => true,
hasstatus => true,
hasstatus => true,
hasrestart => true,
provider => $service_provider,
subscribe => Package["swift-${name}"],
}