neutron创建虚拟路由器,端口状态为down

lawn212 2016-02-26 09:53:13
操作步骤如下:
1、创建两个子网
neutron net-create private
neutron net-create private1
neutron subnet-create private 192.168.10.0/24 --name private --dns-nameserver 219.141.136.10 --gateway 192.168.10.1
neutron subnet-create private1 192.168.11.0/24 --name private1 --dns-nameserver 219.141.136.10 --gateway 192.168.11.1
2、创建虚拟路由器,并将创建的子网关联上去
neutron router-create router
neutron router-interface-add router private
neutron router-interface-add router private1
3、查看路由器端口
neutron router-port-list router
结果如下:
| 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、查看端口状态
neutron port-show 921916c2-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 |

neutron port-show 06f2f8c7-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的原因呢?
...全文
2452 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_15468935 2016-10-20
  • 打赏
  • 举报
回复
我的版本的修改过的了,但是,创建的接口还是down啊
jim_hwg 2016-04-05
  • 打赏
  • 举报
回复
问题解决: 修改模块文件/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py相应内容如下: ...... @classmethod def get_namespaces(cls): output = cls._execute([], 'netns', ('list',)) return [l.split()[0] for l in output.splitlines()] ...... def exists(self, name): output = self._parent._execute( ['o'], 'netns', ['list'], run_as_root=cfg.CONF.AGENT.use_helper_for_ns_read) for line in [l.split()[0] for l in output.splitlines()]: if name == line: return True return False ...... 目前官网已经修复此BUG,你也可以直接通过yum upgrade升级系统包解决。 原文链接:https://review.openstack.org/#/c/258493

999

社区成员

发帖
与我相关
我的任务
社区描述
OpenStack
社区管理员
  • OpenStack社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧