Make libguestfs API calls run in a thread pool

Bug #1132742 reported by Daniel Berrange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Daniel Berrange

Bug Description

In the following commit direct use of the libguestfs API was introduced:

  commit 74e38f1baefb020de30aa19745964bef9ad7254a
  Author: Daniel P. Berrange <email address hidden>
  Date: Tue Nov 13 11:03:26 2012 +0000

    Introduce a VFS implementation backed by the libguestfs APIs

    This implements the VFS APIs using the libguestfs Python APIs.
    This removes the need to map the virtual disk image into the
    host filesystem, and thus avoids potential symlink attacks
    from the guest filesystem. It also performs better than the
    libguestfs FUSE module

    blueprint: virt-disk-api-refactoring
    Change-Id: I3202ec9479f22aa1ae461cab24968e54be1642c1
    Signed-off-by: Daniel P. Berrange <email address hidden>

as this is a native API though and Nova uses eventlet, this has the effect of blocking all green threads. To fix this concurrency bottleneck the code must be made to use the eventlet tpool for invoking libguestfs APIs.

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/22838

Changed in nova:
assignee: nobody → Daniel Berrange (berrange)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit ea07be64a455caa19e5088639cad70ee0e4e91fb
Author: Daniel P. Berrange <email address hidden>
Date: Mon Feb 25 12:00:05 2013 +0000

    Run libguestfs API calls in a thread pool

    The libguestfs API is a binding to a native C library, and thus
    it will block greenthreads. To avoid this all libguestfs API
    calls need to be run in a threadpool. This can be done by just
    wrapping the GuestFS object in an eventlet.tpool.Proxy object

    Fixes bug #1132742
    Change-Id: I877ad9e88442e41c9ad234503d9b1ddf1fb27408
    Signed-off-by: Daniel P. Berrange <email address hidden>

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.