Bug 1849691

Summary: [floatingip port_forwarding] changing external port to used value hangs with retriable exception
Product: Red Hat OpenStack Reporter: ffernand <ffernand>
Component: openstack-neutronAssignee: ffernand <ffernand>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.0 (Train)CC: amuller, chrisw, ekuris, scohen, slawek
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-15.1.1-1.20200819183457.8f0e56b.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:38:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ffernand 2020-06-22 14:12:48 UTC
Description of problem:

When trying to change external-protocol-port to a value that is already used by another pf row, there is no error checking and we end up 'stuck' until the api times out. The neutron db is catching
the improper config, but the validation should likely not allow it to get that far.


Version-Release number of selected component (if applicable):


How reproducible:



Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Should fail right away, as it does during reaction of the pf with invalid param

Additional info:

Reference script:



openstack server create --nic net-id=private,v4-fixed-ip=10.0.0.10 --flavor m1.nano --image $IMAGE_ID \
    --key-name demo d --wait && openstack port set --name dp $(openstack port list --server d -f value -c ID) && \
openstack server create --nic net-id=private,v4-fixed-ip=10.0.0.11 --flavor m1.nano --image $IMAGE_ID \
    --key-name demo e --wait && openstack port set --name ep $(openstack port list --server e -f value -c ID) && echo ok

FIP=172.24.4.8 ; \
openstack floating ip create --floating-ip-address ${FIP} public
FIP_UUID=$(openstack floating ip show ${FIP} -f value -c id) ; echo ${FIP_UUID}

openstack floating ip port forwarding create --internal-ip-address 10.0.0.10 --internal-protocol-port 22  \
   --port dp --external-protocol-port 2020 --protocol tcp $FIP_UUID
   
# this fails right away, as it should
openstack floating ip port forwarding create --internal-ip-address 10.0.0.11 --internal-protocol-port 22  \
   --port ep --external-protocol-port 2020 --protocol tcp $FIP_UUID

openstack floating ip port forwarding create --internal-ip-address 10.0.0.11 --internal-protocol-port 22  \
   --port ep --external-protocol-port 2021 --protocol tcp $FIP_UUID

openstack floating ip port forwarding list ${FIP_UUID}

PF_ID=$(openstack floating ip port forwarding list ${FIP_UUID} -f value -c 'Internal IP Address' -c ID | \
   grep 10.0.0.11 | cut -d' ' -f1) ; echo $PF_ID

# Issue: this should fail sooner than it does
time openstack floating ip port forwarding set --external-protocol-port 2020 ${FIP_UUID} ${PF_ID}

Comment 8 errata-xmlrpc 2020-10-28 15:38:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4284