hover-dns-updater
hover-dns-updater copied to clipboard
Container fails when Hover service down
Lately there have been a few planned outages on hover, which cause the docker container to repeatedly fail. Here's an extract of the log file:
[2021-10-25 09:05:34] [ INFO] --- Logging in (hover-dns-updater.py:get_auth:117)
[2021-10-25 09:05:36] [ INFO] --- Getting current IP addresses from Hover: (hover-dns-updater.py:get_current_ips:134)
[2021-10-25 09:05:37] [ INFO] --- dnsXXXXXX = XXX.XXX.XXX.XXX (hover-dns-updater.py:get_current_ips:139)
[2021-10-25 09:05:37] [ INFO] --- dnsXXXXXX = XXX.XXX.XXX.XXX (hover-dns-updater.py:get_current_ips:139)
[2021-10-25 09:05:37] [ INFO] --- dnsXXXXXX = XXX.XXX.XXX.XXX (hover-dns-updater.py:get_current_ips:139)
[2021-10-25 09:05:37] [ INFO] --- dnsXXXXXX = XXX.XXX.XXX.XXX (hover-dns-updater.py:get_current_ips:139)
[2021-10-25 09:05:37] [ INFO] --- Updating - Current external IP = <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Planned Service Degradation</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<iframe src="//www.herokucdn.com/error-pages/service-degradation.html"></iframe>
</body>
</html> (hover-dns-updater.py:update:144)
[2021-10-25 09:05:37] [ INFO] --- Updating DNS entry for dns3788196 to <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Planned Service Degradation</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<iframe src="//www.herokucdn.com/error-pages/service-degradation.html"></iframe>
</body>
</html> (hover-dns-updater.py:update:148)
Traceback (most recent call last):
File "/hover-dns-updater/hover-dns-updater.py", line 259, in <module>
main()
File "/hover-dns-updater/hover-dns-updater.py", line 254, in main
ret_code = _main(config)
File "/hover-dns-updater/hover-dns-updater.py", line 229, in _main
client.update()
File "/hover-dns-updater/hover-dns-updater.py", line 149, in update
self.call('put', 'dns/' + dns_id, {'content': current_external_ip})
File "/hover-dns-updater/hover-dns-updater.py", line 159, in call
raise HoverException(r)
__main__.HoverException: <Response [422]>
Rather than fail, it would be great if this could just perhaps issue a warning and then try again at the next attempt.