Redundant instance group lookup during scheduling of move operations
Bug #1788527 reported by
Matt Riedemann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Balazs Gibizer | ||
Rocky |
Won't Fix
|
Low
|
Balazs Gibizer | ||
Stein |
Fix Committed
|
Low
|
Balazs Gibizer |
Bug Description
This change:
https:/
Added code to the setup_instance_
Then change:
Was added to not persist group hosts/members in the RequestSpec since they could be stale after the initial server create. This means when we move a server (evacuate, resize, unshelve, live migrate), we get the request spec with the group plus the current hosts/members of the group. So if the request spec has the group hosts set by the time it gets to setup_instance_
Changed in nova: | |
assignee: | nobody → Guo Jingyu (pandatt) |
Changed in nova: | |
assignee: | pandatt (pandatt) → nobody |
To post a comment you must log in.
Looking at this again, this statement in the description is not accurate:
> we get the request spec with the group plus the current hosts/members of the group.
The RequestSpec will load the InstanceGroup by uuid but the InstanceGroup.hosts field is not loaded:
https:/ /github. com/openstack/ nova/blob/ c7e9e667426a6d8 8d396a59cb40d30 763a3265f9/ nova/objects/ instance_ group.py# L177
That's why we have this check in setup_instance_ group so we load the InstanceGroup.hosts from the correct cell(s) based on where the member instances are:
https:/ /github. com/openstack/ nova/blob/ c7e9e667426a6d8 8d396a59cb40d30 763a3265f9/ nova/scheduler/ utils.py# L989
I still think it likely means, however, that this code is redundant:
https:/ /github. com/openstack/ nova/blob/ c7e9e667426a6d8 8d396a59cb40d30 763a3265f9/ nova/scheduler/ utils.py# L944-L950
I'm not sure in what case user_group_hosts would be different from group_hosts.