← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1290487] Re: Libvirt native thread used for "forbidden" purposes

 

** Changed in: nova
       Status: Fix Committed => Fix Released

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

Title:
  Libvirt native thread used for "forbidden" purposes

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  In the nova.virt.libvirt.driver.LibvirtDriver. _get_new_connection
  method  two different libvirt event handlers are registered, one for
  lifecycle events (_event_lifecycle_callback) and one for connection
  events (_close_callback).  These callbacks are called by a native
  thread that is continually calling libvirt.virEventRunDefaultImpl() in
  the _native_thread method; the latter method's Docstring contains the
  following note:

          This is a native thread which runs the default
          libvirt event loop implementation. This processes
          any incoming async events from libvirtd and queues
          them for later dispatch. This thread is only
          permitted to use libvirt python APIs, and the
          driver.queue_event method. In particular any use
          of logging is forbidden, since it will confuse
          eventlet's greenthread integration

  while this rule is adhered to by the _event_lifecycle_callback method,
  it is violated by _close_callback (the other callback) because it
  calls the _set_host_enabled method which, among other things, writes
  to the log.

  The _close_callback method needs to be altered so that it does not
  execute any logic that may interfere with eventlet's greenthread
  integration.

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


References