nova/nova/tests/unit/virt/libvirt/storage
Roman Podoliaka 3405a28688 rbd_utils: wrap blocking calls in tpool.Proxy()
librbd is a Python binding around a C library, which is not aware of
eventlet - all the calls to the functions from this library will block
the whole nova-compute process for duration of a call. To make sure
nova-compute remains responsive we need to wrap all the calls in
tpool.Proxy() eventlet helper, that switches the execution context
back to the event loop, while the call is executed in a native OS
thread from a pool.

Prefer tpool.Proxy() to tpool.execute() here as the former allows for
wrapping objects and automatically executes all the method calls in
native OS threads, while the latter needs to be applied to each
method call in the code repeatedly.

Existing calls are modified for the sake of consistency.

Closes-Bug: #1607461

Change-Id: I743ab372332eb656258a476ae91f5e8fd2cbdc99
2016-08-01 14:06:02 +03:00
..
__init__.py libvirt: move lvm/dmcrypt/rbd_utils modules under storage subdir 2015-07-27 12:47:31 -07:00
test_dmcrypt.py libvirt: Add logging for dm-crypt error conditions 2015-07-31 09:45:16 -04:00
test_lvm.py Stop using mox from virt/libvirt/storage/test_lvm.py 2016-06-01 15:46:49 +07:00
test_rbd.py rbd_utils: wrap blocking calls in tpool.Proxy() 2016-08-01 14:06:02 +03:00