← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2117700] [NEW] Speed up for Ironic driver get_num_instances

 

Public bug reported:

The Ironic virt driver does not implement get_num_instances and
therefore gets the default implementation from the virt base.

https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L404-L417

This in turn calls list_instances which issues a API request for every server
https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L650-L652

This is not required to get a count of the number of instances that are
held in the cache.

Instead we should implement this function to count the number of uuids
which doesn't result in any API calls.

Implementing this will result in a significant speed up to the
sync_power_states periodic task in compute/manager.py

https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L10943

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2117700

Title:
  Speed up for Ironic driver get_num_instances

Status in OpenStack Compute (nova):
  New

Bug description:
  The Ironic virt driver does not implement get_num_instances and
  therefore gets the default implementation from the virt base.

  https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L404-L417

  This in turn calls list_instances which issues a API request for every server
  https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L650-L652

  This is not required to get a count of the number of instances that
  are held in the cache.

  Instead we should implement this function to count the number of uuids
  which doesn't result in any API calls.

  Implementing this will result in a significant speed up to the
  sync_power_states periodic task in compute/manager.py

  https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L10943

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2117700/+subscriptions