2017-07-14 155 views
0

首先,在計算節點中,neutron-linuxbridge-agent.service狀態爲活動狀態,正常。socket.error:[Errno 13]權限被拒絕--- neutron agent-list

[[email protected] neutron]# systemctl status neutron-linuxbridge-agent.service -l 
● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent 
    Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled) 
    Active: active (running) since Fri 2017-07-14 13:48:38 CST; 113ms ago 
    Process: 116170 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS) 
Main PID: 116177 (neutron-linuxbr) 
    CGroup: /system.slice/neutron-linuxbridge-agent.service 
      └─116177 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-linuxbridge-agent --log-file /var/log/neutron/linuxbridge-agent.log 

Jul 14 13:48:38 compute1 systemd[1]: Starting OpenStack Neutron Linux Bridge Agent... 
Jul 14 13:48:38 compute1 neutron-enable-bridge-firewall.sh[116170]: net.bridge.bridge-nf-call-arptables = 1 
Jul 14 13:48:38 compute1 neutron-enable-bridge-firewall.sh[116170]: net.bridge.bridge-nf-call-iptables = 1 
Jul 14 13:48:38 compute1 neutron-enable-bridge-firewall.sh[116170]: net.bridge.bridge-nf-call-ip6tables = 1 
Jul 14 13:48:38 compute1 systemd[1]: Started OpenStack Neutron Linux Bridge Agent. 

但我不能列出中子劑:

[[email protected] neutron]# neutron agent-list 
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. 
An auth plugin is required to fetch a token 

而在計算節點我還可以找到/var/log/neutron/linuxbridge-agent.log的日誌:

2017-07-14 13:44:58.106 114191 CRITICAL neutron [-] Exception: Failed to spawn rootwrap process. 
stderr: 
Traceback (most recent call last): 
    File "/usr/bin/neutron-rootwrap-daemon", line 10, in <module> 
    sys.exit(daemon()) 
    File "/usr/lib/python2.7/site-packages/oslo_rootwrap/cmd.py", line 57, in daemon 
    return main(run_daemon=True) 
    File "/usr/lib/python2.7/site-packages/oslo_rootwrap/cmd.py", line 98, in main 
    daemon_mod.daemon_start(config, filters) 
    File "/usr/lib/python2.7/site-packages/oslo_rootwrap/daemon.py", line 110, in daemon_start 
    server = manager.get_server() 
    File "/usr/lib64/python2.7/multiprocessing/managers.py", line 493, in get_server 
    self._authkey, self._serializer) 
    File "/usr/lib64/python2.7/multiprocessing/managers.py", line 162, in __init__ 
    self.listener = Listener(address=address, backlog=16) 
    File "/usr/lib/python2.7/site-packages/oslo_rootwrap/jsonrpc.py", line 66, in __init__ 
    self._socket.bind(address) 
    File "/usr/lib64/python2.7/socket.py", line 224, in meth 
    return getattr(self._sock,name)(*args) 
socket.error: [Errno 13] Permission denied 

2017-07-14 13:44:58.106 114191 ERROR neutron Traceback (most recent call last): 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/bin/neutron-linuxbridge-agent", line 10, in <module> 
2017-07-14 13:44:58.106 114191 ERROR neutron  sys.exit(main()) 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site- 
packages/neutron/cmd/eventlet/plugins/linuxbridge_neutron_agent.py", line 21 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/bin/neutron-linuxbridge-agent", line 10, in <module> 
2017-07-14 13:44:58.106 114191 ERROR neutron  sys.exit(main()) 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/cmd/eventlet/plugins/linuxbridge_neutron_agent.py", line 21, in main 
2017-07-14 13:44:58.106 114191 ERROR neutron  agent_main.main() 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 921, in main 
2017-07-14 13:44:58.106 114191 ERROR neutron  manager = LinuxBridgeManager(bridge_mappings, interface_mappings) 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 81, in __init__ 
2017-07-14 13:44:58.106 114191 ERROR neutron  self.check_vxlan_support() 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 659, in check_vxlan_support 
2017-07-14 13:44:58.106 114191 ERROR neutron  if self.vxlan_ucast_supported(): 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 623, in vxlan_ucast_supported 
2017-07-14 13:44:58.106 114191 ERROR neutron  test_iface = self.ensure_vxlan(seg_id) 
2017-07-14 13:44:58.106 114191 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 300, in ensure_vxlan 

我的/etc/neutron/plugins/ml2/linuxbridge_agent.ini配置:

[securitygroup] 
enable_security_group = True 
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver 

[vxlan] 
enable_vxlan = True 
local_ip = 10.2.2.121 
l2_population = True 

在我的控制器節點,我無法看到計算的中子劑:

[[email protected] neutron]# neutron agent-list 
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. 
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+ 
| id         | agent_type   | host  | availability_zone | alive | admin_state_up | binary     | 
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+ 
| 18535c11-49ee-4e9e-a889-623a1d324c82 | L3 agent   | controller | nova    | :-) | True   | neutron-l3-agent   | 
| 1c2c3b41-a678-4645-be0d-7d885e4dce7a | DHCP agent   | controller | nova    | :-) | True   | neutron-dhcp-agent  | 
| 7e401de6-f501-447b-aa7a-11f0f74f770a | Linux bridge agent | controller |     | :-) | True   | neutron-linuxbridge-agent | 
| c9c25e82-11fd-4fce-8bef-91915615620a | Metadata agent  | controller |     | :-) | True   | neutron-metadata-agent | 
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+ 

回答

0

在我解決了這個問題的結束。

首先可言,確保計算節點安裝了openstack-selinux,如果沒有:

yum install -y openstack-selinux 

如果仍然沒有工作,禁用了SELinux:

setenforce 0