Skip to content

Commit

Permalink
RBD:Move RBDVolume calls to a separate threads
Browse files Browse the repository at this point in the history
RBD is a python binding for librados which isn't patched by eventlet.

Time-consuming operations like flattening and copying volumes
blocks eventlet loop and all cinder-volume service hangs
until it finished. It makes cinder-volume services unavailable for
a while.

This patch moves all RBDVolume calls to a separate python thread which
doesn't block eventlet loop.

Change-Id: Id3f2d48428d74011ba690141cee3afad8e48c52f
Closes-Bug: #1658037
(cherry picked from commit 8f2b7f4)
  • Loading branch information
zhangsong authored and chengtcli committed May 25, 2017
1 parent 08bfc7d commit 3db5c2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cinder/volume/drivers/rbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def __init__(self, driver, name, pool=None, snapshot=None,
utils.convert_str(name),
snapshot=snapshot,
read_only=read_only)
self.volume = tpool.Proxy(self.volume)
except driver.rbd.Error:
LOG.exception(_LE("error opening rbd image %s"), name)
driver._disconnect_from_rados(client, ioctx)
Expand Down

0 comments on commit 3db5c2c

Please sign in to comment.