From 1e2d89fa5874b0c27bdd45ff80add6c070749f99 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Mon, 14 Jan 2019 14:55:56 +0100 Subject: [PATCH] Apply 5 second backoff when loading global config up on start (#922) It doesn't make much sense to hammer DCS when we just starting up. Fixes https://github.com/zalando/patroni/issues/919 --- patroni/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patroni/__init__.py b/patroni/__init__.py index b032c79b..ec5b1fb5 100644 --- a/patroni/__init__.py +++ b/patroni/__init__.py @@ -50,6 +50,7 @@ class Patroni(object): break except DCSError: logger.warning('Can not get cluster from dcs') + time.sleep(5) def get_tags(self): return {tag: value for tag, value in self.config.get('tags', {}).items()