confusing network manager read_deleted usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
This is related to the fix for bug #939580
Reading the code:
# NOTE(francois.
# deleted before the IPs are released, so we need to get deleted
# instances too
....
try:
except exception.
then:
def fixed_ip_
result = model_query(
then:
def model_query(
...
read_deleted = kwargs.
It's obvious the read_deleted flag is ignored here. And, in any case, we only want to read deleted instances, not deleted fixed IPs.
Now, I understand what's going on - later, in _disassociate_
instance = self.db.
and it's *this* call we want to pass the read_deleted flag.
I started moving the setting of read_deleted on the context closer to where we actually needed, but it's hard to do this with confidence because there are many DB calls which the author of the fix may have intended to pass read_deleted='yes' to. This is a sign that we've seriously confused the code by setting read_deleted='yes' in a fairly arbitrary place.
Changed in nova: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Is this still valid? The code has changed a lot since this was filed