diff --git a/etc/lbaas_agent.ini b/etc/lbaas_agent.ini index e3ea75c3d3..2242cdc459 100644 --- a/etc/lbaas_agent.ini +++ b/etc/lbaas_agent.ini @@ -22,3 +22,6 @@ device_driver = quantum.plugins.services.agent_loadbalancer.drivers.haproxy.name # Allow overlapping IP (Must have kernel build with CONFIG_NET_NS=y and # iproute2 package that supports namespaces). # use_namespaces = True + +# The user group +# user_group = nogroup diff --git a/quantum/plugins/services/agent_loadbalancer/agent/manager.py b/quantum/plugins/services/agent_loadbalancer/agent/manager.py index 9dd2a70d36..f8c002c847 100644 --- a/quantum/plugins/services/agent_loadbalancer/agent/manager.py +++ b/quantum/plugins/services/agent_loadbalancer/agent/manager.py @@ -44,7 +44,12 @@ OPTS = [ cfg.StrOpt( 'interface_driver', help=_('The driver used to manage the virtual interface') - ) + ), + cfg.StrOpt( + 'user_group', + default='nogroup', + help=_('The user group'), + ), ] diff --git a/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/cfg.py b/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/cfg.py index 9ea59756ed..6f22a4d4ea 100644 --- a/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/cfg.py +++ b/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/cfg.py @@ -18,6 +18,8 @@ import itertools +from oslo.config import cfg + from quantum.agent.linux import utils from quantum.plugins.common import constants as qconstants from quantum.plugins.services.agent_loadbalancer import constants @@ -64,7 +66,7 @@ def _build_global(config, socket_path=None): opts = [ 'daemon', 'user nobody', - 'group nogroup', + 'group %s' % cfg.CONF.user_group, 'log /dev/log local0', 'log /dev/log local1 notice' ]