Bug 1531112 - Remove router interface should remove the port from the switch
Summary: Remove router interface should remove the port from the switch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.2
: ---
Assignee: Dominik Holler
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-04 15:40 UTC by Mor
Modified: 2018-03-29 10:58 UTC (History)
6 users (show)

Fixed In Version: ovirt-provider-ovn-1.2.7-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-29 10:58:42 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: exception+


Attachments (Terms of Use)
ovirt-provider-ovn.log (8.04 KB, text/plain)
2018-01-04 15:48 UTC, Mor
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86470 0 master MERGED Delete port on remove interface from router 2018-02-01 13:51:36 UTC

Description Mor 2018-01-04 15:40:28 UTC
Description of problem:
When you connect a router to a network (switch in OVS terms) using add router interface by subnet, and then remove the router interface, it should remove the port assigned for the network. 

If you try to delete the network, you will get an error about a port already attached to it, but this port is detached by the remove interface operation: 
HTTP code 400 "Unable to delete network <NETWORK_ID>. Ports exist for the network".

Version-Release number of selected component (if applicable):
ovirt-provider-ovn-1.2.2-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create OVN network, create and attach subnet to it.
2. Create OVN router.
3. Add router interface by subnet and attach the subnet ID from step 1.
4. Remove interface from router using the subnet ID from step 1.
5. Try to remove the network from the provider.

Actual results:
See description for error message.

Expected results:
Should work.

Additional info:
https://developer.openstack.org/api-ref/network/v2/#remove-interface-from-router
Remove router interface states:
- This operation deletes an internal router interface, which detaches a subnet from the router. If this subnet ID is the last subnet on the port, this operation deletes the port itself.

Workaround: 
Look for the unassigned port and delete it, then remove the network.

Comment 1 Mor 2018-01-04 15:48:30 UTC
Created attachment 1377001 [details]
ovirt-provider-ovn.log

Comment 2 Mor 2018-02-22 12:08:33 UTC
Verified on: RHV 4.2.2.1-0.1.el7

Comment 3 Sandro Bonazzola 2018-03-29 10:58:42 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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


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