情况:服务器重启后,创建云主机失败·,查看日志,我们发现是neutron导致nova创建云主机失败,我们查看neutron服务状态,发现neutron中的openvswitch和metadate服务宕机,重启多次无法使用,
[root@controller ~]# neutron agent-list
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| 03c6972f-e184-4c63-a55f- | Loadbalancer agent | controller | | :-) | True | neutron-lbaas-agent |
| 2fb701088b27 | | | | | | |
| 17faed57-ef6f-4040-9308-a | Open vSwitch agent | controller | | :-) | True | neutron-openvswitch-agent |
| 7bb319598f3 | | | | | | |
| 513df743-9a0f- | Open vSwitch agent | compute | | xxx | True | neutron-openvswitch-agent |
| 40c7-a987-7fb0b9219032 | | | | | | |
| 52dfcfcd-7c45-4c12-9e1a- | Metadata agent | controller | | :-) | True | neutron-metadata-agent |
| 3a22489f0cc0 | | | | | | |
| 7c6af944-1c1c-4bd7-8b1d- | DHCP agent | controller | nova | :-) | True | neutron-dhcp-agent |
| 9a381b8a2b5a | | | | | | |
| 8389bd3f-b71c-48ca- | Metadata agent | compute | | xxx | True | neutron-metadata-agent |
| 8ce2-046b3187d996 | | | | | | |
| a4c48089-b1da-47bb-be6b- | L3 agent | controller | nova | :-) | True | neutron-l3-agent |
| 2a965ddbb6de | | | | | | |
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
我们发现是compute节点的服务死掉了,所以我们到compute节点查看服务情况
但是在compute节点中,这两个服务却是运行着的,我们由此想到是两主机的连接问题
排查步骤:1、互ping主机,看是否通讯正常 通
2、查看消息队列是否运行正常
3、查看ntp服务,是否正常 不正常,两台主机时间不匹配
解决方法:
在controller节点添加server 127.127.1.0 \ fudge 127.127.1.0 startum 10,重启服务,计算节点ntpdate同步。
最后查看neutron agent-list
成功解决问题!
[root@controller ~]# neutron agent-list
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| 03c6972f-e184-4c63-a55f- | Loadbalancer agent | controller | | :-) | True | neutron-lbaas-agent |
| 2fb701088b27 | | | | | | |
| 17faed57-ef6f-4040-9308-a | Open vSwitch agent | controller | | :-) | True | neutron-openvswitch-agent |
| 7bb319598f3 | | | | | | |
| 513df743-9a0f- | Open vSwitch agent | compute | | :-) | True | neutron-openvswitch-agent |
| 40c7-a987-7fb0b9219032 | | | | | | |
| 52dfcfcd-7c45-4c12-9e1a- | Metadata agent | controller | | :-) | True | neutron-metadata-agent |
| 3a22489f0cc0 | | | | | | |
| 7c6af944-1c1c-4bd7-8b1d- | DHCP agent | controller | nova | :-) | True | neutron-dhcp-agent |
| 9a381b8a2b5a | | | | | | |
| 8389bd3f-b71c-48ca- | Metadata agent | compute | | :-) | True | neutron-metadata-agent |
| 8ce2-046b3187d996 | | | | | | |
| a4c48089-b1da-47bb-be6b- | L3 agent | controller | nova | :-) | True | neutron-l3-agent |
| 2a965ddbb6de | | | | | | |
+---------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+