OpenStack中虛擬機獲取不到IP地址的解決方法

OpenStack源碼交流羣: 538850354shell

系統環境:centos

centos6.5 + icehouse多節點部署網絡

問題描述:測試

使用測試鏡像cirros,虛擬機實例能夠正常啓動,可是不能從IP池中獲取IP地址,即DHCP功能不可用spa

 

1.首先要檢查節點各項服務,以及agent是否啓動正常日誌

shell> nova-manage service list
Binary Host Zone Status State Updated_At nova
-consoleauth controller internal enabled :-) 2014-11-18 09:23:48 nova-cert controller internal enabled :-) 2014-11-18 09:23:49 nova-conductor controller internal enabled :-) 2014-11-18 09:23:51 nova-scheduler controller internal enabled :-) 2014-11-18 09:23:49 nova-compute network nova enabled XXX 2014-11-13 02:56:41 nova-compute computer nova enabled :-) 2014-11-18 09:23:45

 

2.檢查agentcode

shell> neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+------------+-------+----------------+ | 22f6a13a-55a1-4474-a836-62fa9803fe71 | Metadata agent | controller | :-) | True | | bb982be7-1e32-4660-9c7a-d538ed4212a0 | Open vSwitch agent | network | :-) | True | | d96fa846-ff1a-44d0-8e46-2388a2b62a3a | Metadata agent | network | :-) | True | | e2fccee2-1e2e-4e15-b58e-d672da7007cc | L3 agent | network | :-) | True | | e9dd9400-9d2f-4f91-b60e-fa2704cb35b3 | DHCP agent | network | :-) | True | | fd110565-cbf6-4c6b-9984-4c6e2108fc9f | Open vSwitch agent | computer | :-) | True | +--------------------------------------+--------------------+------------+-------+----------------+

注:alive看到XXX說明服務不正常,一種可能緣由是各節點時間不一樣步blog

 

3.上述兩項服務都正常,實例仍是分配不到IP地址,查看一下dhcp-agent日誌ip

shell> tail -f dhcp-agent.log
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent raise RuntimeError(m)
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent RuntimeError: 
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent Command: ['ip', '-o', 'netns', 'list']
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent Exit code: 255
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent Stdout: ''
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent Stderr: 'Object "netns" is unknown, try "ip help".\n'
2014-11-18 11:11:47.831 1959 TRACE neutron.agent.dhcp_agent 
2014-11-18 11:11:47.833 1959 INFO neutron.agent.dhcp_agent [-] Synchronizing state complete

#錯誤提示:Stderr: 'Object "netns" is unknown

 

4.解決辦法:ci

網絡節點中yum安裝iproute軟件包

shell> yum install iproute
相關文章
相關標籤/搜索