← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1484578] [NEW] eventlet.tpool.execute() causes creation of unnecessary OS native threads when running unit tests

 

Public bug reported:

To cooperate with blocking calls, which can't be monkey-patched,  eventlet provides support for wrapping those into native OS threads by the means of eventlet.tpool module. E.g. nova-compute uses it extensively to make sure calls to libvirt does not block the whole process.
    
When used in unit tests, eventlet.tpool creates a pool of 20 native OS threads per test running process (assuming there was at least one unit test to actually execute this part of the code in this process).
    
In unit tests all blocking calls (like calls to libvirt) are monkey-patched anyway, so there is little sense to wrap those by the means of tpool.execute() (as we don't want to test eventlet either).

** Affects: nova
     Importance: Undecided
     Assignee: Roman Podoliaka (rpodolyaka)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Roman Podoliaka (rpodolyaka)

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

Title:
  eventlet.tpool.execute() causes creation of unnecessary OS native
  threads when running unit tests

Status in OpenStack Compute (nova):
  New

Bug description:
  To cooperate with blocking calls, which can't be monkey-patched,  eventlet provides support for wrapping those into native OS threads by the means of eventlet.tpool module. E.g. nova-compute uses it extensively to make sure calls to libvirt does not block the whole process.
      
  When used in unit tests, eventlet.tpool creates a pool of 20 native OS threads per test running process (assuming there was at least one unit test to actually execute this part of the code in this process).
      
  In unit tests all blocking calls (like calls to libvirt) are monkey-patched anyway, so there is little sense to wrap those by the means of tpool.execute() (as we don't want to test eventlet either).

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


Follow ups