Skip to content

Commit

Permalink
Merge "Only add ceilometer user to nova group if using compute agent"…
Browse files Browse the repository at this point in the history
… into stable/havana
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 15, 2014
2 parents 9590d78 + 7901dff commit dc47463
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion manifests/agent/compute.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

if $::ceilometer::params::libvirt_group {
User['ceilometer'] {
groups +> [$::ceilometer::params::libvirt_group]
groups => ['nova', $::ceilometer::params::libvirt_group]
}
} else {
User['ceilometer'] {
groups => ['nova']
}
}

Expand Down
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
user { 'ceilometer':
name => 'ceilometer',
gid => 'ceilometer',
groups => ['nova'],
system => true,
require => Package['ceilometer-common'],
}
Expand Down
6 changes: 4 additions & 2 deletions spec/classes/ceilometer_agent_compute_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
)
end

it 'adds ceilometer user to libvirt group if required' do
it 'adds ceilometer user to nova group and, if required, to libvirt group' do
if platform_params[:libvirt_group]
should contain_user('ceilometer').with_groups(/#{platform_params[:libvirt_group]}/)
should contain_user('ceilometer').with_groups(['nova', "#{platform_params[:libvirt_group]}"])
else
should contain_user('ceilometer').with_groups('nova')
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/classes/ceilometer_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
should contain_user('ceilometer').with(
:name => 'ceilometer',
:gid => 'ceilometer',
:groups => ['nova'],
:system => true,
:require => 'Package[ceilometer-common]'
)
Expand Down

0 comments on commit dc47463

Please sign in to comment.