Comment 6 for bug 1759597

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : Re: Change tooz coordination service backend from memcached to zookeeper

Even better, we could simply use Designate worker and Producer, which do not require the leadership methods mentioned in #5, instead of zone manager and pool manager which are deprecated for removal in Rocky .

https://bugs.launchpad.net/charm-designate/+bug/1773190

From the source code perspective, the pool manager which is deprecated for removal uses LeaderElection:

designate/pool_manager/service.py|27| from designate import coordination
designate/pool_manager/service.py|82| class Service(service.RPCService, coordination.CoordinationMixin,
designate/pool_manager/service.py|191| self._pool_election = coordination.LeaderElection(

While Producer code does not - it relies on the partitioner code from coordination.py

designate/producer/service.py|21| from designate import coordination
designate/producer/service.py|35| class Service(service.RPCService, coordination.CoordinationMixin,
designate/producer/service.py|69| self._partitioner = coordination.Partitioner(
designate/producer/service.py|70| self._coordinator, self.service_name, self._coordination_id,

I can find only Group references there.

https://github.com/openstack/designate/blob/stable/queens/designate/coordination.py#L147-L246
    def _get_members(self, group_id):
        get_members_req = self._coordinator.get_members(group_id)
...
        if self._coordinator:
            self._coordinator.watch_join_group(
                self._group_id, self._on_group_change)
            self._coordinator.watch_leave_group(
                self._group_id, self._on_group_change)

Worker code does not even import coordination module and hence does not rely on tooz.

This would allow us to simply switch to etcd.