Floating IP was not removed from the router when the port forwarding deletion was completed

Bug #1873708 reported by ZhouHeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
ZhouHeng

Bug Description

1. Create a floating IP A
2. Create port forwarding on floating IP A
3. Delete port forwarding
4. Add the same port forwarding again

After step 3, It can be found that floating IP is still in the router network namespace.
After step 4, the floating IP's status still DOWN

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi,

Thx for reporting this issue. Is it only problem with incorrect status of FIP in DB? Or something is really not working as expected in the datapath?

tags: added: l3-d
removed: api-ref
tags: added: l3-dvr-backlog
removed: l3-d
Revision history for this message
ZhouHeng (zhouhenglc) wrote :

After step 3, there is a floating IP left. If the floating IP is replaced by a router to create port forwarding, IP conflicts may occur.

After step 4, it is only problem with incorrect status of FIP in DB.

Changed in neutron:
assignee: nobody → ZhouHeng (zhouhenglc)
status: New → In Progress
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Download full text (6.9 KiB)

For me after step3 the floating ip disappeared from router namespace ,and after step4 the status of the floating ip was ACTIVE.
My environment is fresh devstack, master neutron (perhaps - few commits)
$ openstack floating ip create public
...
$ openstack floating ip list
+--------------------------------------+---------------------+------------------+------+--------------------------------------+----------------------------------+
| ID | Floating IP Address | Fixed IP Address | Port | Floating Network | Project |
+--------------------------------------+---------------------+------------------+------+--------------------------------------+----------------------------------+
| 2f2c8e7d-41ef-48d6-bde9-a687a44c92e4 | 100.109.1.207 | None | None | 2d47c856-6d60-48e5-8ff2-ef019d96fe70 | ecd07995cb454fbb849415a2bce339a3 |
+--------------------------------------+---------------------+------------------+------+--------------------------------------+----------------------------------+

$ openstack port create --network private foo
....

$ openstack floating ip port forwarding create 2f2c8e7d-41ef-48d6-bde9-a687a44c92e4 --internal-ip-address 10.0.0.4 --port foo --internal-protocol-port 191 --external-protocol-port 91 --protocol tcp
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| description | |
| external_port | 91 |
| id | 84643adc-6ec6-43b9-ba03-71db78a2c39f |
| internal_ip_address | 10.0.0.4 |
| internal_port | 191 |
| internal_port_id | 386e4794-43e2-460a-949f-e9d3746f51a8 ...

Read more...

LIU Yulong (dragon889)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/721129
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3a6a8c334a65acd658072c2f681b35dac9ca3fcd
Submitter: Zuul
Branch: master

commit 3a6a8c334a65acd658072c2f681b35dac9ca3fcd
Author: zhouhenglc <email address hidden>
Date: Mon Apr 20 08:34:25 2020 +0800

    Provide correct fip cidr when deleting port forwarding

    The second parameter of fip_id_cidrs requires a cidr, but now is address. this
    causes function `_sync_and_remove_fip` fail to remove vip as expected.

    if current is ha router, in function _sync_and_remove_fip will call
    `ri._remove_vip(fip_id_cidr[1])`. the final parameter is passed to
    KeepalivedInstance.remove_vip_by_ip_address and compare with attribute vips.
    the values of vips are of type CIDR.

    if not ha, the following process processing use netaddr.IPNetwork and can be
    performed as expected.

    Closes-bug: #1873708

    Change-Id: I2ae2ade29700a56dc340256389bf8b0efd697ba4

Changed in neutron:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.