instance_get_all_by_filters can perform unnecessary joins
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Pushkar Umaranikar |
Bug Description
When listing server details, instance_
This appears to have been introduced with the behavior in this commit:
https:/
Where the list of expected_attr here:
https:/
https:/
is further extended with the expected_attr list in the compute_api here:
https:/
Resulting in a columns_to_join list resembling:
['flavor', 'info_cache', 'metadata', 'metadata', 'system_metadata', 'info_cache', 'security_groups']
In nova.db.
Changed in nova: | |
assignee: | nobody → Pushkar Umaranikar (pushkar-umaranikar) |
tags: | added: newton-backport-potential |
Hmm, does look like _get_instances_ by_filters adds too many joins.
We could just filter out duplicates in the object layer, but maybe best to just check for duplicates and raise an exception, and fix up what we find.
I think we should look why its adding those extra joins only when you add some joins. Its a bit odd, probably need to look at why the callers are doing all that. Its very possible the object layer adds everything that is needed extra now anyways.