Notify services if swift.conf is modified
swift.conf contains the hash_suffix. With the current module, we have a race condition where services can start *before* having the right hash in swift.conf, so some objects mays be put in quarantine. When usint swift_config (which affect swift.conf), we should restart all services to ensure our ring is running correctly. Change-Id: I1087ba4ec079ca9c43bea9ff0511347632871ec2 Closes-bug: #1442329
This commit is contained in:
parent
06addb7b3b
commit
6dc85b0f79
manifests
@ -135,6 +135,8 @@ class swift::proxy(
|
||||
include ::swift::params
|
||||
include ::concat::setup
|
||||
|
||||
Swift_config<| |> ~> Service['swift-proxy']
|
||||
|
||||
validate_bool($account_autocreate)
|
||||
validate_bool($allow_account_management)
|
||||
validate_array($pipeline)
|
||||
|
@ -18,6 +18,10 @@ class swift::storage::account(
|
||||
$enabled = true,
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
|
||||
Swift_config<| |> ~> Service['swift-account-reaper']
|
||||
Swift_config<| |> ~> Service['swift-account-auditor']
|
||||
|
||||
swift::storage::generic { 'account':
|
||||
manage_service => $manage_service,
|
||||
enabled => $enabled,
|
||||
|
@ -23,6 +23,10 @@ class swift::storage::container(
|
||||
$package_ensure = 'present',
|
||||
$allowed_sync_hosts = ['127.0.0.1'],
|
||||
) {
|
||||
|
||||
Swift_config<| |> ~> Service['swift-container-updater']
|
||||
Swift_config<| |> ~> Service['swift-container-auditor']
|
||||
|
||||
swift::storage::generic { 'container':
|
||||
manage_service => $manage_service,
|
||||
enabled => $enabled,
|
||||
@ -71,5 +75,6 @@ class swift::storage::container(
|
||||
provider => $::swift::params::service_provider,
|
||||
require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync'],
|
||||
}
|
||||
Swift_config<| |> ~> Service['swift-container-sync']
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ define swift::storage::generic(
|
||||
include ::swift::params
|
||||
|
||||
Class['swift::storage'] -> Swift::Storage::Generic[$name]
|
||||
Swift_config<| |> ~> Service["swift-${name}"]
|
||||
|
||||
validate_re($name, '^object|container|account$')
|
||||
|
||||
|
@ -18,6 +18,10 @@ class swift::storage::object(
|
||||
$enabled = true,
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
|
||||
Swift_config<| |> ~> Service['swift-object-updater']
|
||||
Swift_config<| |> ~> Service['swift-object-auditor']
|
||||
|
||||
swift::storage::generic { 'object':
|
||||
manage_service => $manage_service,
|
||||
enabled => $enabled,
|
||||
|
Loading…
x
Reference in New Issue
Block a user