Network cleanup fails when router has external gateway set
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Rally |
In Progress
|
Undecided
|
Unassigned | ||
Bug Description
Hi,
I ran into an issue where Rally's cleanup fails to delete external networks after running scenarios that use routers with external gateways.
Here's what happens:
I have a scenario that creates an external provider network, sets up a router with that network as its external gateway, and connects it to a tenant network. When the scenario finishes and Rally tries to clean up, I get this error:
"Unable to complete operation on network <uuid>. There are one or more ports still in use on the network"
After some digging, I found the problem is the cleanup order. Currently it follows this deletion order: ports, subnets, networks and router.
So Rally tries to delete the network while the router still exists. The router has a gateway port on that external network, which blocks the deletion. Eventually the router does get deleted (which removes the gateway port), but by then the network deletion has already failed after exhausting its retries.
The fix is to delete routers first and then networks.
Let me know if you need any more details or logs.
Thanks!

Fix proposed to branch: master /review. opendev. org/c/openstack /rally- openstack/ +/981106
Review: https:/