yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76030
[Bug 1799155] Re: [L3][port_forwarding] two different protocols can not have the same internal/external port number at the same time
Reviewed: https://review.openstack.org/613549
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e17dac3ae9f64d726db7cee20c492b3507350349
Submitter: Zuul
Branch: master
commit e17dac3ae9f64d726db7cee20c492b3507350349
Author: lizheng <lizheng_1@xxxxxxxxxxxxxxx>
Date: Thu Oct 11 14:17:30 2018 +0800
Add protocol to port_forwarding uniq constraint
Floating IP port forwardings with different protocols can not have
the same internal or external port number to the same VM port. But
we can have different application servers, for instance TCP server
and UDP server, listen to the same port at same time.
This patch adds the protocol attribute to the DB uniq constraint
to allow creating different protocol port forwardings with same
internal or external port number.
Co-Authored-By: LIU Yulong <i@xxxxxxxxxxxx>
Closes-Bug: #1799155
Change-Id: Ifbb5f3ee2473aac98982bff0d2e6bb9b3e5ab5d6
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1799155
Title:
[L3][port_forwarding] two different protocols can not have the same
internal/external port number at the same time
Status in neutron:
Fix Released
Bug description:
ENV: devstack master
Floating IP port_forwardings with different protocols can not have the same internal or external port number to the same vm_port. But we can have different application server, for instance TCP server and UDP server, listen to the same port at same time.
For instance, if you create a port_forwarding to a floating IP with the following input:
{"port_forwarding":
{
"internal_port_id": "3145b56c-949d-45d4-9e35-614117b5f69c",
"internal_port": 22,
"protocol": "tcp",
"external_port": 22,
"internal_ip_address": "192.168.188.3"
}
}
And then add another port_forwarding with protocol to udp and internal port number 22 again:
{"port_forwarding":
{
"internal_port_id": "3145b56c-949d-45d4-9e35-614117b5f69c",
"internal_port": 22,
"protocol": "udp",
"external_port": 2222,
"internal_ip_address": "192.168.188.3"
}
}
The neutron will return 40x error.
This is the key point, these unique constraints do not consider the protocol:
https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/rocky/expand/867d39095bf4_port_forwarding.py#L53-L58
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1799155/+subscriptions
References