Remaining ports are not unbound if one port is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Stephen Finucane | ||
Train |
New
|
Undecided
|
Unassigned | ||
Ussuri |
New
|
Undecided
|
Unassigned | ||
Victoria |
New
|
Undecided
|
Unassigned | ||
Wallaby |
New
|
Undecided
|
Unassigned | ||
Xena |
Fix Released
|
Undecided
|
Unassigned | ||
Yoga |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
As part of the instance deletion process, we must unbind ports associated with said instance. To do this, we loop over all ports currently attached to an instance. However, if neutron returns HTTP 404 (Not Found) for any of these ports, we will return early and fail to unbind the remaining ports. We've seen the problem in the context of Kubernetes on OpenStack. Our deinstaller is brute-force, so it deletes ports and servers at the same time, so a race means the port can get deleted early. This normally wouldn't be an issue as we'd just "untrunk" it and proceed to delete it. But that won't work for SR-IOV ports as in that case you cannot "untrunk" bound ports.
The solution here is obvious: if we fail to find a port, we should simply skip that and continue unbinding everything else.
tags: | added: neutron |
Changed in nova: | |
assignee: | nobody → Stephen Finucane (stephenfinucane) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in nova: | |
status: | Confirmed → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /842528 /opendev. org/openstack/ nova/commit/ 9e0dcb52ab308a6 3c6a18e47d1850c c3ade4d807
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 9e0dcb52ab308a6 3c6a18e47d1850c c3ade4d807
Author: Stephen Finucane <email address hidden>
Date: Thu May 19 12:04:08 2022 +0100
neutron: Unbind remaining ports after PortNotFound
Just because we encountered a PortNotFound error when unbinding a port
doesn't mean we should stop unbinding the remaining ports. If this error
is encountered, simply continue with the other ports.
While we're here, we clean up some other tests related to '_unbind_port'
since they're clearly duplicates.
Change-Id: Id04e0df12829df 4d8929e03a8b76b 5cbe0549059
Signed-off-by: Stephen Finucane <email address hidden>
Closes-Bug: #1974173