From d418a9449ed2aca85dbf2aeb0dc1dacc9902b441 Mon Sep 17 00:00:00 2001 From: Sharoon Thomas Date: Mon, 8 Apr 2019 06:35:15 -0400 Subject: [PATCH] scheduled_at needs a value for manual_failover (#1024) The variable scheduled_at may be undefined for a manual failover where there is an exception raised trying to switchover with REST API. --- patroni/ctl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patroni/ctl.py b/patroni/ctl.py index d1068916..e2dcc5cc 100644 --- a/patroni/ctl.py +++ b/patroni/ctl.py @@ -625,6 +625,7 @@ def _do_failover_or_switchover(obj, action, cluster_name, master, candidate, for raise PatroniCtlException('Member {0} does not exist in cluster {1}'.format(candidate, cluster_name)) scheduled_at_str = None + scheduled_at = None if action == 'switchover': if scheduled is None and not force: