Browse Source

Ensure novajoin's log directory ownership is correct

From ocata to pike, the log ownership changed. So here we make sure that
it changes on update via puppet.

Change-Id: I767b53801bc40a22a403c3e89498c3aa099bc162
Closes-Bug: #1714991
changes/90/500690/1
Juan Antonio Osorio Robles 4 years ago
parent
commit
0a71535c4e
  1. 7
      manifests/metadata/novajoin/api.pp
  2. 7
      spec/classes/nova_metadata_novajoin_api_spec.rb

7
manifests/metadata/novajoin/api.pp

@ -173,6 +173,13 @@ class nova::metadata::novajoin::api (
tag => ['openstack', 'novajoin-package'],
}
file { '/var/log/novajoin':
ensure => directory,
owner => $service_user,
group => $service_user,
recurse => true,
}
if $ipa_domain != undef {
novajoin_config {
'DEFAULT/domain': value => $ipa_domain;

7
spec/classes/nova_metadata_novajoin_api_spec.rb

@ -136,6 +136,13 @@ describe 'nova::metadata::novajoin::api' do
)
end
it { is_expected.to contain_file("/var/log/novajoin").with(
'ensure' => 'directory',
'owner' => "#{param_hash[:service_user]}",
'group' => "#{param_hash[:service_user]}",
'recurse' => true
)}
it { is_expected.to contain_file("#{param_hash[:keytab]}").with(
'owner' => "#{param_hash[:service_user]}",
'require' => 'Exec[get-service-user-keytab]',

Loading…
Cancel
Save