Commit Ibaf43858d60e1320c339f2523b5c09c7f7c7f91e caused new problem with
cross thread communication. According to Python documentation, code can
lead to a deadlock if the spawned thread directly or indirectly attempts
to import a module. python-rados spawns new thread to connect to
cluster. So I removed new spawning new thread to connect to rados. All
long-running operations calls whith python-rbd are still implemented in
native Python threads to block eventlet loop.
Change-Id: Ic9971254102914080383b63cd2807e36213dd6eb
Closes-Bug: #
1401335
LOG.debug("opening connection to ceph cluster (timeout=%s).",
self.configuration.rados_connect_timeout)
- # NOTE (e0ne): rados is binding to C lbirary librados.
- # It blocks eventlet loop so we need to run it in a native
- # python thread.
- client = tpool.Proxy(
- self.rados.Rados(
- rados_id=self.configuration.rbd_user,
- clustername=self.configuration.rbd_cluster_name,
- conffile=self.configuration.rbd_ceph_conf))
+ client = self.rados.Rados(
+ rados_id=self.configuration.rbd_user,
+ clustername=self.configuration.rbd_cluster_name,
+ conffile=self.configuration.rbd_ceph_conf)
if pool is not None:
pool = utils.convert_str(pool)
else: