commit afe86b6f29033a472cab1b52dd0724bb3c6dfb82
Author: Michal Dulko <email address hidden>
Date: Wed Feb 4 12:44:12 2015 +0100
Fix conductor servicegroup joining when zk driver is used
When conductor is run as multiprocess (default for multi core system) and
zk (zookeeper) is used as servicegroup_driver then conductor is unable to join
servicegroup because of shared zookeeper handle (and probably socket)
between parent and children processes.
It's found the problem lies in zookeeper c library implementation.
Proof can be seen in related bug #1389782.
This fix follows the idea used by memcache and db driver that
servicegroup_api._driver object is used in lazy manner.
This means that like connection to memcache and session to database,
zookeeper handle (zk session in driver) isn't created until required by
worker (child process).
Additional note: before fix, during Service object creation the
prefix in zookeeper was created. That was the probably reason the session was
established so early. In my opinion the eagerness of this is not necessary
and namespace can be created by child process as well.
Reviewed: https:/ /review. openstack. org/133479 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=afe86b6f290 33a472cab1b52dd 0724bb3c6dfb82
Committed: https:/
Submitter: Jenkins
Branch: master
commit afe86b6f29033a4 72cab1b52dd0724 bb3c6dfb82
Author: Michal Dulko <email address hidden>
Date: Wed Feb 4 12:44:12 2015 +0100
Fix conductor servicegroup joining when zk driver is used
When conductor is run as multiprocess (default for multi core system) and
zk (zookeeper) is used as servicegroup_driver then conductor is unable to join
servicegroup because of shared zookeeper handle (and probably socket)
between parent and children processes.
It's found the problem lies in zookeeper c library implementation.
Proof can be seen in related bug #1389782.
This fix follows the idea used by memcache and db driver that p_api._ driver object is used in lazy manner.
servicegrou
This means that like connection to memcache and session to database,
zookeeper handle (zk session in driver) isn't created until required by
worker (child process).
Additional note: before fix, during Service object creation the
prefix in zookeeper was created. That was the probably reason the session was
established so early. In my opinion the eagerness of this is not necessary
and namespace can be created by child process as well.
Closes-Bug: #1389782
Related-bug: #1390511
Related-bug: #1382153
Change-Id: I9b386ef1f9268d 19d04879ec89e56 84170f3862a