add upstart symlink
the service upstart provider does not work unless the init script is a symlink to /lib/init/upstart-job for at least older versions of Puppet. This commit adds this symlink to avoid run time apply failures.
This commit is contained in:
@@ -24,11 +24,15 @@ class swift::storage::container(
|
||||
source => 'puppet:///modules/swift/swift-container-sync.conf.upstart',
|
||||
require => Package['swift-container'],
|
||||
}
|
||||
file { '/etc/init.d/swift-container-sync':
|
||||
ensure => link,
|
||||
target => '/lib/init/upstart-job',
|
||||
}
|
||||
service { 'swift-container-sync':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
provider => $::swift::params::service_provider,
|
||||
require => File['/etc/init/swift-container-sync.conf']
|
||||
require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,30 @@ describe 'swift::storage::container' do
|
||||
param_set
|
||||
end
|
||||
it { should contain_swift__storage__generic('container').with_package_ensure(param_hash[:package_ensure]) }
|
||||
it 'should have some other services' do
|
||||
['swift-container-updater', 'swift-container-auditor'].each do |service|
|
||||
should contain_service(service).with(
|
||||
:ensure => 'running',
|
||||
:enable => true,
|
||||
:provider => 'upstart',
|
||||
:require => 'Package[swift-container]'
|
||||
)
|
||||
end
|
||||
should contain_service('swift-container-sync').with(
|
||||
:ensure => 'running',
|
||||
:enable => true,
|
||||
:provider => 'upstart',
|
||||
:require => ['File[/etc/init/swift-container-sync.conf]', 'File[/etc/init.d/swift-container-sync]']
|
||||
)
|
||||
should contain_file('/etc/init/swift-container-sync.conf').with(
|
||||
:source => 'puppet:///modules/swift/swift-container-sync.conf.upstart',
|
||||
:require => 'Package[swift-container]'
|
||||
)
|
||||
should contain_file('/etc/init.d/swift-container-sync').with(
|
||||
:ensure => 'link',
|
||||
:target => '/lib/init/upstart-job'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user