Merge "Ensure coordination IDs are encoded"
This commit is contained in:
commit
bb5b776168
|
@ -48,7 +48,7 @@ class CoordinationMixin(object):
|
||||||
backend_url = CONF.coordination.backend_url
|
backend_url = CONF.coordination.backend_url
|
||||||
|
|
||||||
self._coordinator = tooz.coordination.get_coordinator(
|
self._coordinator = tooz.coordination.get_coordinator(
|
||||||
backend_url, self._coordination_id)
|
backend_url, self._coordination_id.encode())
|
||||||
self._coordination_started = False
|
self._coordination_started = False
|
||||||
|
|
||||||
self.tg.add_timer(CONF.coordination.heartbeat_interval,
|
self.tg.add_timer(CONF.coordination.heartbeat_interval,
|
||||||
|
|
|
@ -66,8 +66,8 @@ class Service(service.RPCService, coordination.CoordinationMixin,
|
||||||
super(Service, self).start()
|
super(Service, self).start()
|
||||||
|
|
||||||
self._partitioner = coordination.Partitioner(
|
self._partitioner = coordination.Partitioner(
|
||||||
self._coordinator, self.service_name, self._coordination_id,
|
self._coordinator, self.service_name,
|
||||||
range(0, 4095))
|
self._coordination_id.encode(), range(0, 4095))
|
||||||
|
|
||||||
self._partitioner.start()
|
self._partitioner.start()
|
||||||
self._partitioner.watch_partition_change(self._rebalance)
|
self._partitioner.watch_partition_change(self._rebalance)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
While this patch fixes upgrades from patched Python 2 to patched
|
||||||
|
Python 3 designate releases, the issue will still be present on
|
||||||
|
upgrade from unpatched Python 3 to patched Python 3 designate
|
||||||
|
releases.
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
This fixes an issue when upgrading to Python 3 (where bytes and str are
|
||||||
|
different types) and _update_partitions() attempts to sort types of 'str'
|
||||||
|
and 'bytes', causing designate-producer to crash.
|
Loading…
Reference in New Issue