From 64018439d762ac2c30552d55263693a4b5aa1352 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 29 Sep 2014 14:10:09 +0000 Subject: [PATCH] nsupdate.info: Don't repeat failed updates As requested by Thomas Waldmann from nsupdate.info (#10603) --- src/ddns/providers.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 16a6e7b..1e88995 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -223,6 +223,14 @@ class DDNSProvider(object): if not last_status == "failure": return False + # If there is no holdoff time, we won't update ever again. + if self.holdoff_failure_days is None: + logger.warning(_("An update has not been performed because earlier updates failed for %s") \ + % self.hostname) + logger.warning(_("There will be no retries")) + + return True + # Determine when the holdoff time ends last_update = self.db.last_update(self.hostname, status=last_status) holdoff_end = last_update + datetime.timedelta(days=self.holdoff_failure_days) @@ -1051,6 +1059,10 @@ class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider): # has not been implemented here, yet. can_remove_records = False + # After a failed update, there will be no retries + # https://bugzilla.ipfire.org/show_bug.cgi?id=10603 + holdoff_failure_days = None + # Nsupdate.info uses the hostname as user part for the HTTP basic auth, # and for the password a so called secret. @property -- 2.39.2