I'm using zookeeper in an environment where the number and addresses of zookeeper hosts don't remain static over the runtime of the application and it is possible that at the time a client is created the list of hosts will change to include none of the original hosts. It's the same cluster, but the cluster hosts may have been moved.
In Kazoo 1.0 I took advantage of the implementation detail of the ConnectionHandler and wrote a little session event handler that triggered a replacement of KazooClient.hosts whenever we ended up in a disconnected state. I'm working on upgrading to Kazoo 1.3 but the implementation of ConnectionHandler now uses itertools.cycle, which prevents me from sliding my new host list in sideways.
I'm looking for a supported (or new backdoor) way to get a new list of hosts into an existing kazoo client without having to stop() and then start() it. It doesn't look like there is a public API on the client or connectionmanager to allow this now. Would the developers be opposed to me adding one in?
Alternative suggestions for how to work around this are also welcome, but I think being able to change the list of host endpoints would be beneficial to more than just myself. FWIW, Curator (kind-of) supports this via Exhibitor, although my reading suggests that only new clients get the updated list so perhaps my use case is more unique.
Mark