RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1048053 - How to remove un-used tunnel ports on OVS
Summary: How to remove un-used tunnel ports on OVS
Keywords:
Status: CLOSED DUPLICATE of bug 1108790
Alias: None
Product: RDO
Classification: Community
Component: openstack-neutron
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-03 02:45 UTC by chen.li
Modified: 2016-04-26 18:08 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-29 11:02:57 UTC
Embargoed:


Attachments (Terms of Use)

Description chen.li 2014-01-03 02:45:58 UTC
Description of problem:
If edit local_ip in /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini, after neutron-openvswitch-agent restart, it will still have an old wrong remote_ip port exist !



Version-Release number of selected component (if applicable):
kernel.x86_64           2.6.32-358.123.2.openstack.el6
                                        @openstack-havana
openstack-neutron.noarch
                        2013.2-1.el6    @openstack-havana

openstack-neutron-openvswitch.noarch
                        2013.2-1.el6    @openstack-havana
python-neutron.noarch   2013.2-1.el6    @openstack-havana
python-neutronclient.noarch
                        2.3.1-2.el6     @openstack-havana
openvswitch.x86_64      1.11.0_8ce28d-1.el6ost



How reproducible:
Happens every time.

Steps to Reproduce:
1.Configure neutron-openvswitch-agent to use vxlan/gre, set local_ip = $IP1 (on both network node and compute node)
2.start neutron-openvswitch-agent, work for a while.....
3.Edit local_ip = $IP2 (on both network node and compute node), restart neutron-openvswitch-agent

Actual results:
the old remote_ip port is still exist, and its own old IP as remote_ip port appear too:

d4c41787-8313-49a1-9fa8-1e34f7fa2086
    Bridge br-tun
        Port "vxlan-30.168.11.201"
            Interface "vxlan-30.168.11.201"
                type: vxlan
                options: {dst_port="8472", in_key=flow, local_ip="192.101.11.101", out_key=flow, remote_ip="30.168.11.201"}
        Port "vxlan-192.101.11.201"
            Interface "vxlan-192.101.11.201"
                type: vxlan
                options: {dst_port="8472", in_key=flow, local_ip="192.101.11.101", out_key=flow, remote_ip="192.101.11.201"}
        Port br-tun
            Interface br-tun
                type: internal
        Port "vxlan-192.168.11.201"
            Interface "vxlan-192.168.11.201"
                type: vxlan
                options: {dst_port="8472", in_key=flow, local_ip="192.101.11.101", out_key=flow, remote_ip="192.168.11.201"}
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port "vxlan-192.168.11.101"
            Interface "vxlan-192.168.11.101"
                type: vxlan
                options: {dst_port="8472", in_key=flow, local_ip="192.101.11.101", out_key=flow, remote_ip="192.168.11.101"}
        Port "vxlan-30.168.11.101"
            Interface "vxlan-30.168.11.101"
                type: vxlan
                options: {dst_port="8472", in_key=flow, local_ip="192.101.11.101", out_key=flow, remote_ip="30.168.11.101"}
    Bridge br-int
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port "qvo27db09bb-37"
            tag: 1
            Interface "qvo27db09bb-37"
        Port "qvo26817405-03"
            tag: 2
            Interface "qvo26817405-03"
    ovs_version: "1.11.0"

Expected results:
Only the new IP port exist

Additional info:

Comment 2 Kashyap Chamarthy 2014-06-17 11:21:29 UTC
I just tried to reproduce with ML2 plugin (which uses OpenvSwitch), the
below is what I see. Chen, can you confirm step-5 below that
demonstrates what you describe?. That's my setup:

    2-node RDO setup (using Fedora 20, and IceHouse packages from Fedora
    Rawhide as of this writing 14-MAY-2014) with Nova, Keystone, Glance
    and Neutron with ML2+GRE+OVS. RabbitMQ for AMQP messaging.  This is
    a virtualized setup, i.e. Nova instances are KVM nested guests.


Versions
--------
    
    openstack-neutron-openvswitch-2014.1-11.fc21.noarch
    openvswitch-2.0.1-1.fc20.x86_64


Test
----

1. `ovs-vsctl show` before modifying the 'local_ip' value in
   /etc/neutron/plugin.ini (that's a symlink to
   /etc/neutron/plugins/ml2/ml2_conf.ini) and
   /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini


2. Some diagnostics info (before I change the 'local_ip'):

    ---------------
    $ ip a | grep 192.169.142.97
      inet 192.169.142.97/24 brd 192.169.142.255 scope global br-ex

    $ ovs-vsctl show
    c993ff93-7d03-42e2-8566-331d10442686
        Bridge br-int
            Port "qr-f0ea1594-3f"
                tag: 1
                Interface "qr-f0ea1594-3f"
                    type: internal
            Port "tapa8818ee8-f9"
                tag: 1
                Interface "tapa8818ee8-f9"
                    type: internal
            Port patch-tun
                Interface patch-tun
                    type: patch
                    options: {peer=patch-int}
            Port br-int
                Interface br-int
                    type: internal
            Port "tapc5a1f7b4-dc"
                tag: 2
                Interface "tapc5a1f7b4-dc"
                    type: internal
        Bridge br-tun
            Port "gre-c0a98ea8"
                Interface "gre-c0a98ea8"
                    type: gre
                    options: {in_key=flow, local_ip="192.169.142.97", out_key=flow, remote_ip="192.169.142.168"}
            Port br-tun
                Interface br-tun
                    type: internal
            Port patch-int
                Interface patch-int
                    type: patch
                    options: {peer=patch-tun}
        Bridge br-ex
            Port "qg-fb9ff0ad-56"
                Interface "qg-fb9ff0ad-56"
                    type: internal
            Port "ens2"
                Interface "ens2"
            Port br-ex
                Interface br-ex
                    type: internal
        ovs_version: "2.0.1"
    ---------------


3. Check what's the current 'local_ip' (it's 192.169.142.97) on
   Controller node (which is running Neutron server, OpenvSwitch agent,
   DHCP agent, L3 agent, OpenvSwitch agent:

    $ cd /etc/neutron/plugins

    $ ls
    ml2  openvswitch

    $ grep -r 192.169.142.97  *
    ml2/ml2_conf.ini:local_ip = 192.169.142.97
    openvswitch/ovs_neutron_plugin.ini:local_ip = 192.169.142.97


4. Change the value of 'local_ip' 192.169.142.97 to the non-existent
   192.169.142.98 (in both ml2_conf.ini, and ovs_neutron_plugin.ini) on
   Controller node:

   Restart Neutron OVS agent:

       $ systemctl restart neutron-openvswitch-agent


5.  Run `ovs-vsctl` again and grep for the new IP (192.169.142.98):

    I think the below demonstrates what you're saying:
    ---------------
    $ ovs-vsctl show | grep 192.169.142.98 -A3 -B3
   
          Port "gre-c0a98e61"
           Interface "gre-c0a98e61"
               type: gre
               options: {in_key=flow, local_ip="192.169.142.98", out_key=flow, remote_ip="192.169.142.97"}
       Port "gre-c1a98e62"
           Interface "gre-c1a98e62"
               type: gre
               options: {in_key=flow, local_ip="192.169.142.98", out_key=flow, remote_ip="193.169.142.98"}
       Port "gre-c0a98ea8"
           Interface "gre-c0a98ea8"
               type: gre
               options: {in_key=flow, local_ip="192.169.142.98", out_key=flow, remote_ip="192.169.142.168"}
       Port patch-int
           Interface patch-int
               type: patch 
    ---------------


6. Change the 'local_ip' back to 192.169.142.97 on Controller node,
   restart neutron-openvswitch-agent, and grep for both IPs
   (192.169.142.97 and 192.169.142.98) in `ovs-vsctl show`:

    ---------------
    $ ovs-vsctl show | egrep -i '192.169.142.97|192.169.142.98' -A2 -B2
             Interface "gre-c0a98e62"
                 type: gre
                 options: {in_key=flow, local_ip="192.169.142.97", out_key=flow, remote_ip="192.169.142.98"}
         Port "gre-c0a98ea8"
             Interface "gre-c0a98ea8"
                 type: gre
                 options: {in_key=flow, local_ip="192.169.142.97", out_key=flow, remote_ip="192.169.142.168"}
         Port "gre-c1a98e62"
             Interface "gre-c1a98e62"
                 type: gre
                 options: {in_key=flow, local_ip="192.169.142.97", out_key=flow, remote_ip="193.169.142.98"}
     Bridge br-int
         Port "qr-f0ea1594-3f"
    ---------------

Comment 3 chen.li 2014-06-25 05:13:09 UTC
Yes, I think this is what I described!

Comment 4 Assaf Muller 2014-06-29 11:02:57 UTC

*** This bug has been marked as a duplicate of bug 1108790 ***

Comment 5 chen.li 2014-06-29 22:52:01 UTC
I can't reach bug 1108790.

     You are not authorized to access bug #1108790

Any solutions for this ????

Comment 6 Sadique Puthen 2014-06-30 05:17:24 UTC
Only option now is to remove that ip from ovs_tunnel_endpoints table of neutron/ovs_neutron database.

If need help wit the exact command for your system, please open a case with Red Hat support.


Note You need to log in before you can comment on or make changes to this bug.