XenAPI should implement list_instance_uuids()

Bug #1097980 reported by Chris Behrens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Behrens

Bug Description

compute manager init_host() does a check to see if instances have been moved to other hosts and nukes them locally, if so. It makes use of driver.list_instance_uuids() but this doesn't exist in XenAPI. It attempts to fallback to another method that is somewhat kludgy and won't work every time. So... we should try to implement this method. We've been storing nova-uuid in other-data (or whatever) with VM records, so this shouldn't be too difficult to do.

Chris Behrens (cbehrens)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Chris Behrens (cbehrens)
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
status: Triaged → 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/24704

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24704
Committed: http://github.com/openstack/nova/commit/f9a89b7065ff4a15bf7ce14a983e8934cd4710f4
Submitter: Jenkins
Branch: master

commit f9a89b7065ff4a15bf7ce14a983e8934cd4710f4
Author: Chris Behrens <email address hidden>
Date: Mon Mar 18 20:26:02 2013 +0000

    Fix XenAPI performance issue

    This patch implements 'list_instance_uuids' in the xenapi virt driver so
    that compute manager's '_get_instances_on_driver' can operate more
    efficiently.

    Fixes bug 1097980

    The cleanup_running_deleted_instances periodic task uses the above call
    while context has been modified to be read_deleted='yes'. Without
    list_instance_uuids being implemented in xenapi, there's a fallback to
    querying all instances on the host. Because of read_deleted='yes', this
    queries all instances that have ever lived on the host. In a very busy
    environment where instances are repeatedly built and destroyed, one can
    end up with thousands of deleted instances. Now that we are storing
    instance_type data in system_metadata and system_metadata is joined with
    every instance_get, this results in 10x the number of rows being
    returned with sqlalchemy... the fallback doesn't perform well enough.

    Change-Id: I4bbfd69c9769807cec813af757665f03d9643460

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.