nova-scheduler also loads deleted instances at startup

Bug #1524114 reported by Belmiro Moreira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Low
Tardis Xu

Bug Description

nova-scheduler is loading all instances (including deleted) at startup.

Experienced problems when each node has >6000 deleted instances, even when using batches of 10 nodes.
Each query can take several minutes and transfer several GB of data.
This prevented nova-scheduler connect to rabbitmq.

###
When nova-scheduler starts it calls "_async_init_instance_info()" and it does an "InstanceList.get_by_filters" that uses batches of 10 nodes. This uses "instance_get_all_by_filters_sort", however "Deleted instances will be returned by default, unless there's a filter that says otherwise".
Adding the filter: {"deleted": False} fixes the problem.

Tags: scheduler
Revision history for this message
Tardis Xu (xiaoxubeii) wrote :

Hi Belmiro Moreira,

I can reproduce your bug, and the nova-scheduler filters all the instances indeed.

Changed in nova:
importance: Undecided → Low
assignee: nobody → Tardis Xu (xiaoxubeii)
Tardis Xu (xiaoxubeii)
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/255178

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Tardis Xu (<email address hidden>) on branch: master
Review: https://review.openstack.org/255178
Reason: wrong code

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/255178
Reason: Abandoning this, because the other fix is the one we want to go with.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.