nova-scheduler also loads deleted instances at startup

Bug #1524114 reported by Belmiro Moreira on 2015-12-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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.

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) on 2015-12-09
Changed in nova:
status: New → In Progress

Change abandoned by Tardis Xu (<email address hidden>) on branch: master
Reason: wrong code

Change abandoned by Sean Dague (<email address hidden>) on branch: master
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  Edit
Everyone can see this information.

Other bug subscribers