Created attachment 1376235 [details] ovirt-provider-ovn.log Description of problem: When creating OVN router, OVN network, OVN subnet attached to the OVN network, and adding router interface by subnet, if the router is deleted, it is impossible remove the subnet using the provider. Provider error is logged: "Unable to delete subnet <SUBNET_ID> because it is connected to router <ROUTER_ID>. Please disconnect the subnet from the router first." 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: { "network": { "name": "test_network", "admin_state_up": true } } NOTE network_id in response. 2. Create OVN subnet and attach it to the OVN network: { "subnet": { "name": "test_subnet", "network_id": "<OVN_NET_ID>", "ip_version": 4, "cidr": "<CIDR>/24", "gateway_ip": "<CIDR_GW>" } } NOTE subnet_id in response. 3. Create OVN router: { "router": { "name": "test_router", "admin_state_up": true } } NOTE router_id in response. 4. Create interface router by subnet: { "subnet_id": "<OVN_SUBNET_ID>" } 5. Delete the router: DELETE on https://<SERVER>:9696/v2.0/routers/<OVN_ROUTER_ID> 6. Try to delete the subnet: DELETE on https://<SERVER>:9696/v2.0/subnets/<OVN_SUBNET_ID> { "error": { "message": "Unable to delete subnet <SUBNET_ID> because it is connected to router <ROUTER_ID. Please disconnect the subnet from the router first.", "code": 400, "title": "Bad Request" } } Actual results: You cannot remove the subnet from the provider using API requests, only by using OVN commands. Expected results: All interfaces of a router should be removed once the router is deleted. Additional info:
Verified on: ovirt-provider-ovn-1.2.7-2.el7ev.noarch I used the following flow to verify the bug: 1. Create network. 2. Create subnet and attach it to network. 3. Create router. 4. Add interface to router by subnet from step 2. 5. Remove interface by subnet from step 2. --> Step needed to remove the subnet. 6. Remove the router.
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.