Starting the swift replicator with /usr/bin/swift-init on RedHat
Should be changed back to init script when one becomes part of the package. Includes test to ensure original functionality hasn't changed on Ubuntu
This commit is contained in:
parent
3fd9ac9b9d
commit
88c4954f0b
@ -51,13 +51,24 @@ define swift::storage::generic(
|
||||
subscribe => Package["swift-${name}"],
|
||||
}
|
||||
|
||||
service { "swift-${name}-replicator":
|
||||
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_replicator_service_name') %>"),
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
provider => $service_provider,
|
||||
subscribe => Package["swift-${name}"],
|
||||
if $::osfamily == "RedHat" {
|
||||
service { "swift-${name}-replicator":
|
||||
start => "/usr/bin/swift-init ${name}-replicator start",
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
provider => base,
|
||||
subscribe => Package["swift-${name}"],
|
||||
}
|
||||
}else{
|
||||
service { "swift-${name}-replicator":
|
||||
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_replicator_service_name') %>"),
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
provider => $service_provider,
|
||||
subscribe => Package["swift-${name}"],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -55,6 +55,12 @@ describe 'swift::storage::generic' do
|
||||
:hasstatus => true,
|
||||
:provider => param_hash[:service_provider]
|
||||
)}
|
||||
it { should contain_service("swift-#{t}-replicator").with(
|
||||
:ensure => 'running',
|
||||
:enable => true,
|
||||
:hasstatus => true,
|
||||
:provider => param_hash[:service_provider]
|
||||
)}
|
||||
it { should contain_file("/etc/swift/#{t}-server/").with(
|
||||
:ensure => 'directory',
|
||||
:owner => 'swift',
|
||||
|
Loading…
Reference in New Issue
Block a user