Make group on /var/log/nova OS specific
On Ubuntu the group defaults to adm on /var/log/nova, on RH systems it should be nova. Make it OS specific so it doesn't get re-assigned. Change-Id: I989fd7888b7d509ac766afdb1bac6d3876f69542 Closes-Bug: #1267573
This commit is contained in:
@@ -565,7 +565,7 @@ class nova(
|
||||
ensure => directory,
|
||||
mode => '0750',
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
group => $::nova::params::nova_log_group,
|
||||
require => Package['nova-common'],
|
||||
}
|
||||
nova_config { 'DEFAULT/log_dir': value => $log_dir;}
|
||||
|
@@ -42,6 +42,7 @@ class nova::params {
|
||||
# redhat specific config defaults
|
||||
$root_helper = 'sudo nova-rootwrap'
|
||||
$lock_path = '/var/lib/nova/tmp'
|
||||
$nova_log_group = 'nova'
|
||||
case $::operatingsystem {
|
||||
'Fedora': {
|
||||
$special_service_provider = undef
|
||||
@@ -99,6 +100,7 @@ class nova::params {
|
||||
$vncproxy_package_name = 'nova-consoleproxy'
|
||||
# Use default provider on Debian
|
||||
$special_service_provider = undef
|
||||
$nova_log_group = 'nova'
|
||||
}
|
||||
default: {
|
||||
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
||||
@@ -106,6 +108,7 @@ class nova::params {
|
||||
$vncproxy_package_name = 'nova-novncproxy'
|
||||
# some of the services need to be started form the special upstart provider
|
||||
$special_service_provider = 'upstart'
|
||||
$nova_log_group = 'adm'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ describe 'nova' do
|
||||
:ensure => 'directory',
|
||||
:mode => '0750',
|
||||
:owner => 'nova',
|
||||
:group => 'nova',
|
||||
:require => 'Package[nova-common]'
|
||||
)
|
||||
should contain_file('/etc/nova/nova.conf').with(
|
||||
@@ -568,7 +567,8 @@ describe 'nova' do
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
{ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian' }
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
@@ -577,6 +577,26 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it_behaves_like 'nova'
|
||||
it 'creates the log folder with the right group for Debian' do
|
||||
should contain_file('/var/log/nova').with(:group => 'nova')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Ubuntu platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Ubuntu' }
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :nova_common_package => 'nova-common',
|
||||
:lock_path => '/var/lock/nova' }
|
||||
end
|
||||
|
||||
it_behaves_like 'nova'
|
||||
it 'creates the log folder with the right group for Ubuntu' do
|
||||
should contain_file('/var/log/nova').with(:group => 'adm')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
@@ -590,5 +610,9 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it_behaves_like 'nova'
|
||||
|
||||
it 'creates the log folder with the right group for RedHat' do
|
||||
should contain_file('/var/log/nova').with(:group => 'nova')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user