系统相关
首页 > 系统相关> > OpenStack启动镜像实例报错,无IP地址,linuxbridge-agent.log报错问题

OpenStack启动镜像实例报错,无IP地址,linuxbridge-agent.log报错问题

作者:互联网

OpenStack版本Queens,完全按照官方文档安装,最后启动镜像实例时发现没有分配IP地址,使用openstack server list

[root@k8s-1 ~]# openstack server list
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+
| ID                                   | Name              | Status | Networks                | Image  | Flavor  |
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+
| e8e5a9ce-2461-4e22-ab02-cf1400f590af | provider-instance | ACTIVE | provider=192.168.197.32 | cirros | m1.nano |
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+

查看/var/log/neutron/linuxbridge-agent.log时发现报错如下:

INFO neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Linux bridge agent Agent out of sync with plugin!
INFO neutron.agent.securitygroups_rpc [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Preparing filters for devices set(['tap0c0a4271-c4'])
ERROR neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Error in agent loop. Devices info: {'current': set(['tap0c0a4271-c4']), 'timestamps': {'tap0c0a4271-c4': 3}, 'removed': set([]), 'added': set(['tap0c0a4271-c4']), 'updated': set([])}: IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent Traceback (most recent call last):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 454, in daemon_loop
ERROR neutron.plugins.ml2.drivers.agent._common_agent     sync = self.process_network_devices(device_info)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper
ERROR neutron.plugins.ml2.drivers.agent._common_agent     result = f(*args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 201, in 
ERROR neutron.plugins.ml2.drivers.agent._common_agent     device_info.get('updated'))
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 258, in setup_port_filters
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.prepare_devices_filter(new_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 125, in decorated_function
ERROR neutron.plugins.ml2.drivers.agent._common_agent     *args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 133, in prepare_devices_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply_port_filter(device_ids)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 165, in _apply_port_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.firewall.process_trusted_ports(trusted_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/firewall.py", line 143, in defer_apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.filter_defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_firewall.py", line 933, in filter_defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.iptables.defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 448, in defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 464, in _apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX, True):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     return self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 216, in lock
ERROR neutron.plugins.ml2.drivers.agent._common_agent     ext_lock.acquire(delay=delay)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 151, in acquire
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._do_open()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 123, in _do_open
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.lockfile = open(self.path, 'a')
ERROR neutron.plugins.ml2.drivers.agent._common_agent IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent 
INFO neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Linux bridge agent Agent out of sync with plugin!
INFO neutron.agent.securitygroups_rpc [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Preparing filters for devices set(['tap0c0a4271-c4'])
ERROR neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Error in agent loop. Devices info: {'current': 
ERROR neutron.plugins.ml2.drivers.agent._common_agent Traceback (most recent call last):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 454, in daemon_loop
ERROR neutron.plugins.ml2.drivers.agent._common_agent     sync = self.process_network_devices(device_info)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper
ERROR neutron.plugins.ml2.drivers.agent._common_agent     result = f(*args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 201, in 
ERROR neutron.plugins.ml2.drivers.agent._common_agent     device_info.get('updated'))
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 258, in setup_port_filters
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.prepare_devices_filter(new_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 125, in decorated_function
ERROR neutron.plugins.ml2.drivers.agent._common_agent     *args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 133, in prepare_devices_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply_port_filter(device_ids)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 165, in _apply_port_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.firewall.process_trusted_ports(trusted_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/firewall.py", line 143, in defer_apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.filter_defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_firewall.py", line 933, in filter_defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.iptables.defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 448, in defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 464, in _apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX, True):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     return self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 216, in lock
ERROR neutron.plugins.ml2.drivers.agent._common_agent     ext_lock.acquire(delay=delay)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 151, in acquire
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._do_open()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 123, in _do_open
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.lockfile = open(self.path, 'a')
ERROR neutron.plugins.ml2.drivers.agent._common_agent IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent INFO neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Linux bridge agent Agent out of sync with plugin!
INFO neutron.agent.securitygroups_rpc [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Preparing filters for devices set(['tap0c0a4271-c4'])
ERROR neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Error in agent loop. Devices info: {'current': set(['tap0c0a4271-c4']), 'timestamps': {'tap0c0a4271-c4': 3}, 'removed': set([]), 'added': set(['tap0c0a4271-c4']), 'updated': set([])}: IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent Traceback (most recent call last):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 454, in daemon_loop
ERROR neutron.plugins.ml2.drivers.agent._common_agent     sync = self.process_network_devices(device_info)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper
ERROR neutron.plugins.ml2.drivers.agent._common_agent     result = f(*args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 201, in 
ERROR neutron.plugins.ml2.drivers.agent._common_agent     device_info.get('updated'))
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 258, in setup_port_filters
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.prepare_devices_filter(new_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 125, in decorated_function
ERROR neutron.plugins.ml2.drivers.agent._common_agent     *args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 133, in prepare_devices_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply_port_filter(device_ids)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 165, in _apply_port_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.firewall.process_trusted_ports(trusted_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/firewall.py", line 143, in defer_apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.filter_defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_firewall.py", line 933, in filter_defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.iptables.defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 448, in defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 464, in _apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX, True):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     return self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 216, in lock
ERROR neutron.plugins.ml2.drivers.agent._common_agent     ext_lock.acquire(delay=delay)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 151, in acquire
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._do_open()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 123, in _do_open
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.lockfile = open(self.path, 'a')
ERROR neutron.plugins.ml2.drivers.agent._common_agent IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent 
INFO neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Linux bridge agent Agent out of sync with plugin!
INFO neutron.agent.securitygroups_rpc [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Preparing filters for devices set(['tap0c0a4271-c4'])
ERROR neutron.plugins.ml2.drivers.agent._common_agent [req-aeb7feeb-9850-424c-9b6b-57c528213fea - - - - -] Error in agent loop. Devices info: {'current': 
ERROR neutron.plugins.ml2.drivers.agent._common_agent Traceback (most recent call last):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 454, in daemon_loop
ERROR neutron.plugins.ml2.drivers.agent._common_agent     sync = self.process_network_devices(device_info)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 158, in wrapper
ERROR neutron.plugins.ml2.drivers.agent._common_agent     result = f(*args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 201, in 
ERROR neutron.plugins.ml2.drivers.agent._common_agent     device_info.get('updated'))
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 258, in setup_port_filters
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.prepare_devices_filter(new_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 125, in decorated_function
ERROR neutron.plugins.ml2.drivers.agent._common_agent     *args, **kwargs)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 133, in prepare_devices_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply_port_filter(device_ids)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/securitygroups_rpc.py", line 165, in _apply_port_filter
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.firewall.process_trusted_ports(trusted_devices)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/firewall.py", line 143, in defer_apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.filter_defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_firewall.py", line 933, in filter_defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.iptables.defer_apply_off()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 448, in defer_apply_off
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._apply()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/iptables_manager.py", line 464, in _apply
ERROR neutron.plugins.ml2.drivers.agent._common_agent     with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX, True):
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
ERROR neutron.plugins.ml2.drivers.agent._common_agent     return self.gen.next()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 216, in lock
ERROR neutron.plugins.ml2.drivers.agent._common_agent     ext_lock.acquire(delay=delay)
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 151, in acquire
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self._do_open()
ERROR neutron.plugins.ml2.drivers.agent._common_agent   File "/usr/lib/python2.7/site-packages/fasteners/process_lock.py", line 123, in _do_open
ERROR neutron.plugins.ml2.drivers.agent._common_agent     self.lockfile = open(self.path, 'a')
ERROR neutron.plugins.ml2.drivers.agent._common_agent IOError: [Errno 13] Permission denied: '/var/lib/neutron/tmp/neutron-iptables'
ERROR neutron.plugins.ml2.drivers.agent._common_agent 

经过重启nova、neutron、keystone、glance以及httpd均无用,后来开始一点点检查配置文件,发现lock_path路径如下,检查文件权限时发现是root

[oslo_concurrency]

#
# From oslo.concurrency
#

# Enables or disables inter-process locks. (boolean value)
#disable_process_locking = false

# Directory to use for lock files.  For security, the specified directory
# should only be writable by the user running the processes that need locking.
# Defaults to environment variable OSLO_LOCK_PATH. If external locks are used,
# a lock path must be set. (string value)
# lock_path = $state_path/lock
lock_path = /var/lib/neutron/tmp

[oslo_messaging_amqp]

#
# From oslo.messaging

修改权限

chown -R neutron:neutron /var/lib/neutron

再次重启systemctl restart neutron-linuxbridge-agent.service之后日志正常,重启镜像实例发现可以获取ip

总结:对于服务报错检查应该先从日志入手,再检查配置,分开每个服务逐一检查。对于本次OpenStack安装错误,也警醒自己,需要真正了解每个服务,端口和配置内容,服务原理。可能就因为文件权限这种小问题,就会导致服务异常,还是要细致认真,也希望能帮助到更多的人。

标签:log,IP地址,agent,ml2,报错,common,._,plugins,neutron
来源: https://www.cnblogs.com/frank-hui/p/12970702.html