问题描述
操作步骤如下:1、创建两个子网neutronnet-createprivateneutronnet-createprivate1neutronsubnet-createprivate192.168.10.0/24--nameprivate--dns-nameserver219.141.136.10--gateway192.168.10.1neutronsubnet-createprivate1192.168.11.0/24--nameprivate1--dns-nameserver219.141.136.10--gateway192.168.11.12、创建虚拟路由器,并将创建的子网关联上去neutronrouter-createrouterneutronrouter-interface-addrouterprivateneutronrouter-interface-addrouterprivate13、查看路由器端口neutronrouter-port-listrouter结果如下:|id|name|mac_address|fixed_ips|+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------+|06f2f8c7-3961-4b29-a1a2-847cce3730ed||fa:16:3e:c2:5f:14|{"subnet_id":"cf65aa8c-23ef-4f2f-b808-7f5abd43525e","ip_address":"192.168.11.1"}||921916c2-c611-45ed-af10-49af992a8192||fa:16:3e:aa:1b:80|{"subnet_id":"adf442b9-482d-48d7-9cd5-de2b23397e99","ip_address":"192.168.10.1"}|4、查看端口状态neutronport-show921916c2-c611-45ed-af10-49af992a8192|Field|Value|+-----------------------+--------------------------------------------------------------------------------------------------------------+|admin_state_up|True||allowed_address_pairs|||binding:host_id|controller||binding:profile|{}||binding:vif_details|{"port_filter":true}||binding:vif_type|bridge||binding:vnic_type|normal||device_id|c1e51583-ae17-4ad8-8e28-aec7328f4114||device_owner|network:router_interface||dns_assignment|{"hostname":"host-192-168-10-1","ip_address":"192.168.10.1","fqdn":"host-192-168-10-1.openstacklocal."}||dns_name|||extra_dhcp_opts|||fixed_ips|{"subnet_id":"adf442b9-482d-48d7-9cd5-de2b23397e99","ip_address":"192.168.10.1"}||id|921916c2-c611-45ed-af10-49af992a8192||mac_address|fa:16:3e:aa:1b:80||name|||network_id|1dc51bc4-547b-4363-b99d-adc6246e0bf3||port_security_enabled|False||security_groups|||status|ACTIVE||tenant_id|e33b7c74167443099c26b287c604ed1f|neutronport-show06f2f8c7-3961-4b29-a1a2-847cce3730ed|Field|Value|+-----------------------+--------------------------------------------------------------------------------------------------------------+|admin_state_up|True||allowed_address_pairs|||binding:host_id|controller||binding:profile|{}||binding:vif_details|{"port_filter":true}||binding:vif_type|bridge||binding:vnic_type|normal||device_id|c1e51583-ae17-4ad8-8e28-aec7328f4114||device_owner|network:router_interface||dns_assignment|{"hostname":"host-192-168-11-1","ip_address":"192.168.11.1","fqdn":"host-192-168-11-1.openstacklocal."}||dns_name|||extra_dhcp_opts|||fixed_ips|{"subnet_id":"cf65aa8c-23ef-4f2f-b808-7f5abd43525e","ip_address":"192.168.11.1"}||id|06f2f8c7-3961-4b29-a1a2-847cce3730ed||mac_address|fa:16:3e:c2:5f:14||name|||network_id|313f0bbf-1be3-42f9-a41f-caba06861f73||port_security_enabled|False||security_groups|||status|DOWN||tenant_id|e33b7c74167443099c26b287c604ed1f|第一个端口状态是ACTIVE,第二个端口状态是DOWN,请问如何查找端口DOWN的原因呢?
解决方案
解决方案二:
问题解决:修改模块文件/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py相应内容如下:......@classmethoddefget_namespaces(cls):output=cls._execute([],'netns',('list',))return[l.split()[0]forlinoutput.splitlines()]......defexists(self,name):output=self._parent._execute(['o'],'netns',['list'],run_as_root=cfg.CONF.AGENT.use_helper_for_ns_read)forlinein[l.split()[0]forlinoutput.splitlines()]:ifname==line:returnTruereturnFalse......目前官网已经修复此BUG,你也可以直接通过yumupgrade升级系统包解决。原文链接: