分享

【已解决】如何彻底删除openvswitch的一个port?

marsaber 发表于 2015-1-15 09:38:24 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 5 52175
本帖最后由 marsaber 于 2015-1-15 10:03 编辑

之前配置失误,导致br-tun的一个Port是错误的,想删除掉,使用:
ovs-vsctl del-port br-tun gre-c0a8190c
分别在网络节点和计算节点执行,再次查看,没有了。
但是网络节点重启openvswitch服务之后,又再次出现,这个该如何彻底删除啊?

/etc/openvswitch/conf.db:{"_date":1421257057687,"Port":{"60be3cf0-8819-469c-a1bf-898e2c20b4d7":{"name":"gre-c0a8190c","interfaces":["uuid","f81dd3c2-81f9-433d-8d7a-eda190dd7b28"]}},"Interface":{"f81dd3c2-81f9-433d-8d7a-eda190dd7b28":{"options":["map",[["in_key","flow"],["local_ip","172.16.10.21"],["out_key","flow"],["remote_ip","192.168.25.12"]]],"name":"gre-c0a8190c","type":"gre"}},"Bridge":{"ca2e47aa-2652-4446-84e1-7045d82d33ea":{"ports":["set",[["uuid","5548b29f-f4fc-452f-a5ff-981a30b8ea57"],["uuid","591b7fa4-bfeb-4323-b00f-d521ecbb3348"],["uuid","60be3cf0-8819-469c-a1bf-898e2c20b4d7"],["uuid","ef881dd7-53fa-429b-8fd8-c5714432b6a6"]]]}},"_comment":"ovs-vsctl: /usr/bin/ovs-vsctl --timeout=10 -- --may-exist add-port br-tun gre-c0a8190c -- set Interface gre-c0a8190c type=gre options:remote_ip=192.168.25.12 options:local_ip=172.16.10.21 options:in_key=flow options:out_key=flow","Open_vSwitch":{"f2380b5c-7221-41cd-8c38-3aaea0f4f636":{"next_cfg":12}}}


2015-01-15_093335.jpg

已有(5)人评论

跳转到指定楼层
marsaber 发表于 2015-1-15 10:04:23
[root@controller ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 145
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cinder             |
| glance             |
| heat               |
| keystone           |
| mysql              |
| neutron            |
| nova               |
+--------------------+
8 rows in set (0.00 sec)

mysql> use neutron;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------------+
| Tables_in_neutron            |
+------------------------------+
| agents                       |
| alembic_version              |
| allowedaddresspairs          |
| arista_provisioned_nets      |
| arista_provisioned_tenants   |
| arista_provisioned_vms       |
| cisco_ml2_credentials        |
| cisco_ml2_nexusport_bindings |
| consistencyhashes            |
| dnsnameservers               |
| externalnetworks             |
| extradhcpopts                |
| floatingips                  |
| ipallocationpools            |
| ipallocations                |
| ipavailabilityranges         |
| ml2_brocadenetworks          |
| ml2_brocadeports             |
| ml2_flat_allocations         |
| ml2_gre_allocations          |
| ml2_gre_endpoints            |
| ml2_network_segments         |
| ml2_port_bindings            |
| ml2_vlan_allocations         |
| ml2_vxlan_allocations        |
| ml2_vxlan_endpoints          |
| networkdhcpagentbindings     |
| networks                     |
| ports                        |
| quotas                       |
| routerl3agentbindings        |
| routerroutes                 |
| routers                      |
| securitygroupportbindings    |
| securitygrouprules           |
| securitygroups               |
| servicedefinitions           |
| servicetypes                 |
| subnetroutes                 |
| subnets                      |
+------------------------------+
40 rows in set (0.00 sec)

mysql> select * from ml2_gre_endpoints;
+---------------+
| ip_address    |
+---------------+
| 172.16.10.21  |
| 172.16.10.31  |
| 192.168.25.12 |
+---------------+
3 rows in set (0.00 sec)

mysql> delete from ml2_gre_endpoints where ip_address = '192.168.25.12';
Query OK, 1 row affected (0.03 sec)

mysql> select * from ml2_gre_endpoints;
+--------------+
| ip_address   |
+--------------+
| 172.16.10.21 |
| 172.16.10.31 |
+--------------+
2 rows in set (0.00 sec)

mysql>

网络节点重启openvswitch等服务之后,没有再次出现。
回复

使用道具 举报

langke93 发表于 2015-1-15 10:16:05
marsaber 发表于 2015-1-15 10:04
[root@controller ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end w ...
openstack还是有些bug的,有的是并不是真正的删除,当然这个可能是为了误操作,或则黑客之类的,可是也会造成些麻烦。
所以想真正删除,需要使用命令删除后,产生问题,还需要看看数据库

回复

使用道具 举报

marsaber 发表于 2015-1-15 10:19:04
langke93 发表于 2015-1-15 10:16
openstack还是有些bug的,有的是并不是真正的删除,当然这个可能是为了误操作,或则黑客之类的,可是也会 ...

嗯,是的,非常感谢您的回复。
回复

使用道具 举报

wangzy208 发表于 2015-6-20 03:22:43
marsaber 发表于 2015-1-15 10:04
[root@controller ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end w ...

给力,确实是这样解决了问题,openstack自己的同步有问题,导致即使重启服务也不行,解决了,谢谢!
回复

使用道具 举报

marsaber 发表于 2015-6-20 08:55:42
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条