Bug 1815026 - No error in CLI while trying to remove port/network from router with floating IP
Summary: No error in CLI while trying to remove port/network from router with floating IP
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstacksdk
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 16.1 (Train on RHEL 8.2)
Assignee: Bernard Cafarelli
QA Contact: Alex Katz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-19 10:47 UTC by Alex Katz
Modified: 2020-07-29 07:51 UTC (History)
7 users (show)

Fixed In Version: python-openstacksdk-0.36.2-0.20200317053430.211bdc6.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-29 07:51:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack Storyboard 2006473 0 None None None 2020-03-25 08:58:09 UTC
Red Hat Product Errata RHBA-2020:3148 0 None None None 2020-07-29 07:51:16 UTC

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


Note You need to log in before you can comment on or make changes to this bug.