diff --git a/manifests/init.pp b/manifests/init.pp index 8316cf7e..a7ebb135 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -61,7 +61,8 @@ class swift( ensure => directory, } file { '/var/run/swift': - ensure => directory, + ensure => directory, + selinux_ignore_defaults => true, } file { '/etc/swift/swift.conf': diff --git a/manifests/proxy/authtoken.pp b/manifests/proxy/authtoken.pp index 23ec71a1..7e6cdb31 100644 --- a/manifests/proxy/authtoken.pp +++ b/manifests/proxy/authtoken.pp @@ -111,10 +111,11 @@ class swift::proxy::authtoken( } file { $signing_dir: - ensure => directory, - mode => '0700', - owner => 'swift', - group => 'swift', + ensure => directory, + mode => '0700', + owner => 'swift', + group => 'swift', + selinux_ignore_defaults => true, } concat::fragment { 'swift_authtoken': diff --git a/manifests/storage/container.pp b/manifests/storage/container.pp index f5137f0a..f6dc76ab 100644 --- a/manifests/storage/container.pp +++ b/manifests/storage/container.pp @@ -67,15 +67,11 @@ 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 => $service_ensure, enable => $enabled, provider => $::swift::params::service_provider, - require => File['/etc/init/swift-container-sync.conf', '/etc/init.d/swift-container-sync'], + require => File['/etc/init/swift-container-sync.conf'], } Swift_config<| |> ~> Service['swift-container-sync'] } diff --git a/manifests/storage/generic.pp b/manifests/storage/generic.pp index df36d42e..763dcc67 100644 --- a/manifests/storage/generic.pp +++ b/manifests/storage/generic.pp @@ -53,8 +53,6 @@ define swift::storage::generic( file { "/etc/swift/${name}-server/": ensure => directory, - owner => 'swift', - group => 'swift', } if $manage_service { diff --git a/spec/classes/swift_proxy_authtoken_spec.rb b/spec/classes/swift_proxy_authtoken_spec.rb index 2ab821e4..a5feb3c7 100644 --- a/spec/classes/swift_proxy_authtoken_spec.rb +++ b/spec/classes/swift_proxy_authtoken_spec.rb @@ -22,7 +22,8 @@ describe 'swift::proxy::authtoken' do } end it {is_expected.to contain_file('/var/cache/swift').with( - {:ensure => 'directory'}.merge(file_defaults) + {:ensure => 'directory', + :selinux_ignore_defaults => true}.merge(file_defaults) )} end diff --git a/spec/classes/swift_spec.rb b/spec/classes/swift_spec.rb index c0f7960c..3a7f5ded 100644 --- a/spec/classes/swift_spec.rb +++ b/spec/classes/swift_spec.rb @@ -39,7 +39,8 @@ describe 'swift' do {:ensure => 'directory'}.merge(file_defaults) )} it {is_expected.to contain_file('/var/run/swift').with( - {:ensure => 'directory'}.merge(file_defaults) + {:ensure => 'directory', + :selinux_ignore_defaults => true}.merge(file_defaults) )} it {is_expected.to contain_file('/var/lib/swift').with( {:ensure => 'directory'}.merge(file_defaults) diff --git a/spec/classes/swift_storage_all_spec.rb b/spec/classes/swift_storage_all_spec.rb index 34a64cca..4139ee2b 100644 --- a/spec/classes/swift_storage_all_spec.rb +++ b/spec/classes/swift_storage_all_spec.rb @@ -74,9 +74,7 @@ describe 'swift::storage::all' do } )} it { is_expected.to contain_file("/etc/swift/#{type}-server/").with( - {:ensure => 'directory', - :owner => 'swift', - :group => 'swift'} + {:ensure => 'directory'} )} end diff --git a/spec/classes/swift_storage_container_spec.rb b/spec/classes/swift_storage_container_spec.rb index da1a6bcd..429e1db6 100644 --- a/spec/classes/swift_storage_container_spec.rb +++ b/spec/classes/swift_storage_container_spec.rb @@ -91,16 +91,12 @@ describe 'swift::storage::container' do :ensure => 'running', :enable => true, :provider => 'upstart', - :require => ['File[/etc/init/swift-container-sync.conf]', 'File[/etc/init.d/swift-container-sync]'] + :require => 'File[/etc/init/swift-container-sync.conf]', ) is_expected.to contain_file('/etc/init/swift-container-sync.conf').with( :source => 'puppet:///modules/swift/swift-container-sync.conf.upstart', :require => 'Package[swift-container]' ) - is_expected.to contain_file('/etc/init.d/swift-container-sync').with( - :ensure => 'link', - :target => '/lib/init/upstart-job' - ) end end end diff --git a/spec/defines/swift_storage_generic_spec.rb b/spec/defines/swift_storage_generic_spec.rb index fe94b8a7..3b1ef167 100644 --- a/spec/defines/swift_storage_generic_spec.rb +++ b/spec/defines/swift_storage_generic_spec.rb @@ -65,8 +65,6 @@ describe 'swift::storage::generic' do )} it { is_expected.to contain_file("/etc/swift/#{t}-server/").with( :ensure => 'directory', - :owner => 'swift', - :group => 'swift' )} end # TODO - I do not want to add tests for the upstart stuff