Skip to content

Commit

Permalink
Change default LBaaS user group
Browse files Browse the repository at this point in the history
Change user_group default parameter:
* nobody for Red Hat systems
* nogroup for Debian systems

Closes-bug #1378519

Change-Id: Ic2940c2e3d6510d8c6147d09e2af67d8bee7ac9d
  • Loading branch information
Emilien Macchi committed Oct 7, 2014
1 parent cd831f7 commit cefbdc8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions manifests/agents/lbaas.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
# Defaults to true.
#
# [*user_group*]
# (optional) The user group. Defaults to nogroup.
# (optional) The user group.
# Defaults to $::neutron::params::nobody_user_group
#
# [*manage_haproxy_package*]
# (optional) Whether to manage the haproxy package.
Expand All @@ -44,7 +45,7 @@
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$device_driver = 'neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
$use_namespaces = true,
$user_group = 'nogroup',
$user_group = $::neutron::params::nobody_user_group,
$manage_haproxy_package = true,
) {

Expand Down
4 changes: 4 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
class neutron::params {

if($::osfamily == 'Redhat') {
$nobody_user_group = 'nobody'

$package_name = 'openstack-neutron'
$server_package = false
$server_service = 'neutron-server'
Expand Down Expand Up @@ -60,6 +62,8 @@

} elsif($::osfamily == 'Debian') {

$nobody_user_group = 'nogroup'

$package_name = 'neutron-common'
$server_package = 'neutron-server'
$server_service = 'neutron-server'
Expand Down
9 changes: 5 additions & 4 deletions spec/classes/neutron_agents_lbaas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:device_driver => 'neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
:use_namespaces => true,
:user_group => 'nogroup',
:manage_haproxy_package => true
}
end
Expand All @@ -38,7 +37,7 @@
should contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
should contain_neutron_lbaas_agent_config('DEFAULT/device_driver').with_value(p[:device_driver]);
should contain_neutron_lbaas_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]);
should contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(p[:user_group]);
should contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(platform_params[:nobody_user_group]);
end

it 'installs neutron lbaas agent package' do
Expand Down Expand Up @@ -110,8 +109,9 @@ class { 'neutron': rabbit_password => 'passw0rd' }"
end

let :platform_params do
{ :haproxy_package => 'haproxy',
{ :haproxy_package => 'haproxy',
:lbaas_agent_package => 'neutron-lbaas-agent',
:nobody_user_group => 'nogroup',
:lbaas_agent_service => 'neutron-lbaas-agent' }
end

Expand All @@ -126,7 +126,8 @@ class { 'neutron': rabbit_password => 'passw0rd' }"
end

let :platform_params do
{ :haproxy_package => 'haproxy',
{ :haproxy_package => 'haproxy',
:nobody_user_group => 'nobody',
:lbaas_agent_service => 'neutron-lbaas-agent' }
end

Expand Down

0 comments on commit cefbdc8

Please sign in to comment.