Little fixes in etcd3 and kubernetes (#2689)

- Always pass etcd3 key revision as a string
- Make sure the leader key isn't unconditionally overwritten. It may happen that the leader heart-beat loop didn't run properly and the session has expired. In this case the leader may create a new session and a new leader key. But, there are chances that the other node already created a leader key and we don't want to overwrite it.
- Try to sync HA loops between nodes by adding 0.5 seconds to timeout on non-leader nodes
This commit is contained in:
Alexander Kukushkin
2023-05-24 10:54:26 +02:00
committed by GitHub
parent d1fdb45179
commit b4afc6830b
4 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -315,7 +315,7 @@ class TestKubernetesConfigMaps(BaseTestKubernetes):
def test_watch(self):
self.k.set_ttl(10)
self.k.watch(None, 0)
self.k.watch(None, 0)
self.k.watch('5', 0)
def test_set_history_value(self):
self.k.set_history_value('{}')