Port-Forwarding can't be set to different protocol in the same IP and Port

Bug #1841741 reported by Yuan-Ting Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

In Rocky version, Port-Forwarding can't be set to different protocol in the same IP and Port.

For example:

Floating IP(IP:140.128.100.100, Port:100) mapping to Private IP(IP: 10.0.0.1. Port: 100, Protocol: tcp and udp)

I got these error messages

{
    "NeutronError": {
        "message": "Bad port_forwarding request: A duplicate port forwarding entry with same attributes already exists, conflicting values are {'floatingip_id': u'cdbe8e24-f0dc-45c9-aec7-9609faf4234c', 'external_port': 1000}.",
        "type": "BadRequest",
        "detail": ""
    }
}

And, I found this bug has been solved and merged in Stein version.
Commit: https://github.com/openstack/neutron/commit/4b7a070b3f1c66afc48d1290ec31c840e367d8ee#diff-02580f01f1bafd7855f5f78a84ce1d5d

Yuan-Ting Wang (yttom)
summary: - Port-Forwarding can't set different protocol in the same IP and Port
+ Port-Forwarding can't be set to different protocol in the same IP and
+ Port
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hi, I marked this as duplicate of the original bug report #1799155.
Unfortunately as I see by policy it can't be backported as the fix you referenced (https://review.opendev.org/613549) contains db schema change.

Revision history for this message
Lajos Katona (lajos-katona) wrote :

If you need further questions don't hesitate to ask on #openstack-neutron irc channel or on openstack-discuss mailing list.

Revision history for this message
Yuan-Ting Wang (yttom) wrote :

Hi Lajos Katona, Thank you for the quick reply.

But I'm using Rocky in my production environment, I can't upgrade the neutron version to Stein.

I have already tested the commit(https://github.com/openstack/neutron/commit/4b7a070b3f1c66afc48d1290ec31c840e367d8ee#diff-02580f01f1bafd7855f5f78a84ce1d5d) in Rocky, and it worked successfully.

I follow these steps:
1. Upload neutron/db/migration/alembic_migrations/versions/stein/expand/d72db3e25539_modify_uniq_port_forwarding.py

2. Fix neutron/db/models/port_forwarding.py and neutron/services/portforwarding/pf_plugin.py

3. Run "neutron-db-manage upgrade heads"

4. Restart neutron-server service

Do I need to commit it to Rocky branch?
thx!

Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hi Yuan-Ting Wang,
Actually as the community policy do not allow backporting db schema changes to stable branches, you have to keep this fix in your local environment/git fork.

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.