OpenStack LBaaS 创建vip错误
- OpenStack 版本: Juno
- OpenStack Server OS: CentOS 7
/var/log/neutron/lbaas-agent.log
错误日志:
2016-07-13 09:15:46.709 19452 ERROR neutron.agent.linux.utils [req-5db6370a-e18c-43d6-8c4b-1028bf5be371 None]
Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qlbaas-3c7d7366-543a-4bec-be26-65b76a5452ba', 'haproxy', '-f', '/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf', '-p', '/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/pid']
Exit code: 1
Stdout: ''
Stderr: "[ALERT] 194/091546 (11139) : parsing [/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf:4] : cannot find group id for 'nogroup' (0:Success)\n[ALERT] 194/091546 (11139) : Error(s) found in configuration file : /var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf\n[ALERT] 194/091546 (11139) : Fatal errors found in configuration.\n"
2016-07-13 09:15:46.710 19452 ERROR neutron.services.loadbalancer.agent.agent_manager [req-5db6370a-e18c-43d6-8c4b-1028bf5be371 None] Create vip 17aef59c-206c-44cb-a4dd-f10a0d6323fb failed on device driver haproxy_ns
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager Traceback (most recent call last):
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/agent/agent_manager.py", line 214, in create_vip
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager driver.create_vip(vip)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 318, in create_vip
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager self._refresh_device(vip['pool_id'])
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 315, in _refresh_device
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager self.deploy_instance(logical_config)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/openstack/common/lockutils.py", line 249, in inner
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager return f(*args, **kwargs)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 311, in deploy_instance
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager self.create(logical_config)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 92, in create
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager self._spawn(logical_config)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 115, in _spawn
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager ns.netns.execute(cmd)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 550, in execute
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager check_exit_code=check_exit_code, extra_ok_codes=extra_ok_codes)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 84, in execute
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager raise RuntimeError(m)
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager RuntimeError:
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qlbaas-3c7d7366-543a-4bec-be26-65b76a5452ba', 'haproxy', '-f', '/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf', '-p', '/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/pid']
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager Exit code: 1
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager Stdout: ''
2016-07-13 09:15:46.710 19452 TRACE neutron.services.loadbalancer.agent.agent_manager Stderr: "[ALERT] 194/091546 (11139) : parsing [/var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf:4] : cannot find group id for 'nogroup' (0:Success)\n[ALERT] 194/091546 (11139) : Error(s) found in configuration file : /var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf\n[ALERT] 194/091546 (11139) : Fatal errors found in configuration.\n"
查看配置文件 /var/lib/neutron/lbaas/3c7d7366-543a-4bec-be26-65b76a5452ba/conf
global
daemon
user nobody
group nogroup
log /dev/log local0
log /dev/log local1 notice
stats socket /var/lib/neutron/lbaas/aaa4edf6-0b32-45cd-b5b0-ce86be022a24/sock mode 0666 level user
defaults
log global
retries 3
option redispatch
timeout connect 5000
timeout client 50000
timeout server 50000
frontend 0b1eb7a2-3525-4fa6-83d3-25637c38edc2
option tcplog
bind 172.18.192.191:22
mode tcp
default_backend aaa4edf6-0b32-45cd-b5b0-ce86be022a24
maxconn 10000
backend aaa4edf6-0b32-45cd-b5b0-ce86be022a24
mode tcp
balance roundrobin
server bc24da93-66fd-4c45-a149-bb7bd3c0cb05 172.18.192.56:22 weight 1
server 5de106a7-4399-425e-92bf-24158c9105a8 172.18.192.57:22 weight 1
看到haproxy
是以nogroup
这个组运行的。查看/etc/group
没有nogroup
这个组。
修改配置文件/etc/neutron/lbaas_agent.ini
[haproxy]
user_group = haproxy
重启LBaaS服务:
systemctl restart neutron-lbaas-agent