Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1815026

Summary: No error in CLI while trying to remove port/network from router with floating IP
Product: Red Hat OpenStack Reporter: Alex Katz <akatz>
Component: python-openstacksdkAssignee: Bernard Cafarelli <bcafarel>
Status: CLOSED ERRATA QA Contact: Alex Katz <akatz>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.0 (Train)CC: apevec, bcafarel, ccamposr, jjoyce, jpichon, jschluet, lhh
Target Milestone: gaKeywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-openstacksdk-0.36.2-0.20200317053430.211bdc6.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-29 07:51:01 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 Alex Katz 2020-03-19 10:47:40 UTC
Description of problem:
Openstackclient returns no error in case it failed to remove subnet/port from router.
Remove_interface_from_router method [1] returns the error message back [2] but no action is taken there.


Steps to Reproduce:

openstack network create net_1
openstack router create the_only_router
openstack subnet create --subnet-range 10.100.0.0/24 --network net_1 subnet_1
openstack router add subnet the_only_router subnet_1
openstack router set --external-gateway nova the_only_router
openstack port create --network net_1 port_1
openstack floating ip create --floating-ip-address 10.0.0.201 --port port_1 nova
openstack router remove subnet the_only_router subnet_1


Actual results:
No error message


Expected results:
Router interface for subnet <subnet_id> on router <router_id> cannot be deleted, as it is required by one or more floating IPs.


[1] https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/network/v2/_proxy.py#L2623
[2] https://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/network/v2/router.py#L485

Comment 4 Bernard Cafarelli 2020-07-17 13:48:20 UTC
I now remember why it looked really familiar, this is the 16 version of bug 1570786 (for 13). I think 14 did not get that backport, but here is the result on 16.1 beta, and on upstream master:
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet the_only_router subnet_1
ConflictException: 409: Client Error for url: http://10.0.0.131:9696/v2.0/routers/0d099810-dfee-45b8-90ff-f96dbf077b77/remove_router_interface, Router interface for subnet 70eb8b61-0221-48b6-99d5-64986349dbbd on router 0d099810-dfee-45b8-90ff-f96dbf077b77 cannot be deleted, as it is required by one or more floating IPs.

I will update with matching 16 package and close storyboard

Comment 12 errata-xmlrpc 2020-07-29 07:51:01 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, 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/RHBA-2020:3148