-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate monitoring and sync unit files #973
Conversation
Errored hosts (0)Changed hosts (1)Unaffected hosts (130)Changed hostsdiff for fallingrocks.ocf.berkeley.edu*******************************************
File[/opt/mirrors/bin/healthcheck] =>
parameters =>
content =>
@@ -24,4 +24,20 @@
_
_
+def get_retry(url, count=5, timeout=10):
+ """
+ Attempt to GET from the url up to count times in
+ case of a request-related error. Returns either the result
+ of a successful GET or throws an exception.
+ """
+ assert count > 0
+ while count > 1:
+ count -= 1
+ try:
+ return requests.get(url, timeout=timeout)
+ except requests.exceptions.RequestException:
+ continue
+ return requests.get(url, timeout=timeout)
+
+
def update_func(healthcheck):
if healthcheck == 'debian':
@@ -45,5 +61,5 @@
datetime.datetime(2018, 1, 19, 20, 15, 1, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
return dateutil.parser.parse(req.text.splitlines()[0])
@@ -56,5 +72,5 @@
datetime.datetime(2018, 1, 19, 20, 3, 47)
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
return datetime.utcfromtimestamp(int(req.text.split()[0]))
@@ -67,5 +83,5 @@
datetime.datetime(2018, 1, 24, 10, 3)
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
# Ex: drwxr-xr-x 3 ftpadmin packager 3 2009-09-21 14:51 3.5.6
@@ -82,5 +98,5 @@
datetime.datetime(2018, 1, 19, 19, 26, 41, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
updated_line, = [line for line in req.text.splitlines() if line.startswith('Date: ')]
@@ -94,5 +110,5 @@
datetime.datetime(2018, 1, 25, 21, 52, 18, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
updated_line, = [line for line in req.text.splitlines() if line.startswith('date=')]
******************************************* Unaffected hosts
|
Errored hosts (0)Changed hosts (1)Unaffected hosts (130)Changed hostsdiff for fallingrocks.ocf.berkeley.edu*******************************************
File[/opt/mirrors/bin/healthcheck] =>
parameters =>
content =>
@@ -24,4 +24,20 @@
_
_
+def get_retry(url, count=5, timeout=10):
+ """
+ Attempt to GET from the url up to count times in
+ case of a request-related error. Returns either the result
+ of a successful GET or throws an exception.
+ """
+ assert count > 0
+ while count > 1:
+ count -= 1
+ try:
+ return requests.get(url, timeout=timeout)
+ except requests.exceptions.RequestException:
+ continue
+ return requests.get(url, timeout=timeout)
+
+
def update_func(healthcheck):
if healthcheck == 'debian':
@@ -45,5 +61,5 @@
datetime.datetime(2018, 1, 19, 20, 15, 1, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
return dateutil.parser.parse(req.text.splitlines()[0])
@@ -56,5 +72,5 @@
datetime.datetime(2018, 1, 19, 20, 3, 47)
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
return datetime.utcfromtimestamp(int(req.text.split()[0]))
@@ -67,5 +83,5 @@
datetime.datetime(2018, 1, 24, 10, 3)
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
# Ex: drwxr-xr-x 3 ftpadmin packager 3 2009-09-21 14:51 3.5.6
@@ -82,5 +98,5 @@
datetime.datetime(2018, 1, 19, 19, 26, 41, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
updated_line, = [line for line in req.text.splitlines() if line.startswith('Date: ')]
@@ -94,5 +110,5 @@
datetime.datetime(2018, 1, 25, 21, 52, 18, tzinfo=tzutc())
"""
- req = requests.get(mirror_url)
+ req = get_retry(mirror_url)
req.raise_for_status()
updated_line, = [line for line in req.text.splitlines() if line.startswith('date=')]
******************************************* Unaffected hosts
|
This isn't the best approach. If the script is hanging, make the timeout shorter and let it fail. The monitoring around this should be robust, and can tolerate the script failing every once in a while. The real problem is that the timeout duration is the same for the sync job and healthcheck scripts, which doesn't make any sense. It's more worthwhile to fix that instead. |
Sure, being shared is a problem, but this change will also make the healthcheck script fail after 5 retries of 10 seconds, which sounds similar to the behavior you want? i.e. it won't hang anymore, and it'll also retry a few times before failing hard. |
Sure, but this doesn't belong in the script. It's simpler and more elegant to let it fail and let systemd handle retrying. Put another way, the script should fulfill its one purpose of trying to look at mirrors, and the supervisor (systemd) should fulfill its purpose of scheduling execution, determining if it's taking too long (with systemd timeouts), and retrying if necessary. The monitoring service also fulfills its purpose by looking at the state and determining to alert if something is wrong. The systemd timer naturally does "retrying" by executing again on whatever schedule we set. I don't think additional retries are necessary, but if you really want it, systemd can handle it, see https://stackoverflow.com/a/39284869. This also means you never have to second-guess if the retry logic in the code is correct. It looks fine now, but a change in the future by someone who doesn't have this background could cause the script to hang again. It's better to be explicit. |
I'll also add that this change makes the logging less explicit, since each retry is a silent failure that never gets logged. I know the intention was to retry on timeout, but it looks like you're actually retrying on any kind of request failure and throwing away whatever the error was. You could fix this by printing the exception, but it's better to not have to worry about any of this. Instead, let exceptions propagate naturally, cause a crash, and show up in the journal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also something like https://stackoverflow.com/a/49121508 if you want to do something more idiomatic in terms of retries within requests. I don't really mind if the retries are done here or within systemd, and regardless only one URL is being fetched each time per mirror so if the retries are close together or spread further apart I don't think it'll matter either.
7a6ec4d
to
76532aa
Compare
Errored hosts (1)Changed hosts (0)Unaffected hosts (130)Errored hostserror for fallingrocks.ocf.berkeley.edu
Unaffected hosts
|
Errored hosts (0)Changed hosts (1)Unaffected hosts (130)Changed hostsdiff for fallingrocks.ocf.berkeley.edu*******************************************
- Cron[alpine-health]
*******************************************
- Cron[alpine]
*******************************************
- Cron[apache-health]
*******************************************
- Cron[apache]
*******************************************
- Cron[archlinux-health]
*******************************************
- Cron[archlinux]
*******************************************
- Cron[archlinuxcn-health]
*******************************************
- Cron[archlinuxcn]
*******************************************
- Cron[centos-altarch-health]
*******************************************
- Cron[centos-altarch]
*******************************************
- Cron[centos-debuginfo-health]
*******************************************
- Cron[centos-debuginfo]
*******************************************
- Cron[centos-health]
*******************************************
- Cron[centos]
*******************************************
- Cron[debian-health]
*******************************************
- Cron[debian-security-health]
*******************************************
- Cron[devuan]
*******************************************
- Cron[elpa]
*******************************************
- Cron[finnix]
*******************************************
- Cron[freebsd-health]
*******************************************
- Cron[freebsd]
*******************************************
- Cron[ftpsync-debian-cd]
*******************************************
- Cron[ftpsync-debian-security]
*******************************************
- Cron[ftpsync-debian]
*******************************************
- Cron[ftpsync-kali-images]
*******************************************
- Cron[ftpsync-kali]
*******************************************
- Cron[ftpsync-puppetlabs]
*******************************************
- Cron[ftpsync-trisquel-images]
*******************************************
- Cron[ftpsync-trisquel]
*******************************************
- Cron[ftpsync-ubuntu]
*******************************************
- Cron[gnu-health]
*******************************************
- Cron[gnu]
*******************************************
- Cron[kali-health]
*******************************************
- Cron[kde-applicationdata-health]
*******************************************
- Cron[kde-applicationdata]
*******************************************
- Cron[kde]
*******************************************
- Cron[manjaro-health]
*******************************************
- Cron[manjaro]
*******************************************
- Cron[melpa]
*******************************************
- Cron[openbsd-health]
*******************************************
- Cron[openbsd]
*******************************************
- Cron[parrot-health]
*******************************************
- Cron[parrot]
*******************************************
- Cron[puppetlabs-health]
*******************************************
- Cron[qt-health]
*******************************************
- Cron[qt]
*******************************************
- Cron[tails-health]
*******************************************
- Cron[tails]
*******************************************
- Cron[trisquel-health]
*******************************************
- Cron[ubuntu-health]
*******************************************
- Cron[ubuntu-releases]
*******************************************
- Exec[get-ftpsync-debian-cd]
*******************************************
- Exec[get-ftpsync-debian-security]
*******************************************
- Exec[get-ftpsync-debian]
*******************************************
- Exec[get-ftpsync-kali-images]
*******************************************
- Exec[get-ftpsync-kali]
*******************************************
- Exec[get-ftpsync-puppetlabs]
*******************************************
- Exec[get-ftpsync-trisquel-images]
*******************************************
- Exec[get-ftpsync-trisquel]
*******************************************
- Exec[get-ftpsync-ubuntu]
*******************************************
- File[/etc/systemd/system/alpine-health.service]
*******************************************
- File[/etc/systemd/system/alpine-health.timer]
*******************************************
- File[/etc/systemd/system/alpine.service]
*******************************************
- File[/etc/systemd/system/alpine.timer]
*******************************************
- File[/etc/systemd/system/apache-health.service]
*******************************************
- File[/etc/systemd/system/apache-health.timer]
*******************************************
- File[/etc/systemd/system/apache.service]
*******************************************
- File[/etc/systemd/system/apache.timer]
*******************************************
- File[/etc/systemd/system/archlinux-health.service]
*******************************************
- File[/etc/systemd/system/archlinux-health.timer]
*******************************************
- File[/etc/systemd/system/archlinux.service]
*******************************************
- File[/etc/systemd/system/archlinux.timer]
*******************************************
- File[/etc/systemd/system/archlinuxcn-health.service]
*******************************************
- File[/etc/systemd/system/archlinuxcn-health.timer]
*******************************************
- File[/etc/systemd/system/archlinuxcn.service]
*******************************************
- File[/etc/systemd/system/archlinuxcn.timer]
*******************************************
- File[/etc/systemd/system/centos-altarch-health.service]
*******************************************
- File[/etc/systemd/system/centos-altarch-health.timer]
*******************************************
- File[/etc/systemd/system/centos-altarch.service]
*******************************************
- File[/etc/systemd/system/centos-altarch.timer]
*******************************************
- File[/etc/systemd/system/centos-debuginfo-health.service]
*******************************************
- File[/etc/systemd/system/centos-debuginfo-health.timer]
*******************************************
- File[/etc/systemd/system/centos-debuginfo.service]
*******************************************
- File[/etc/systemd/system/centos-debuginfo.timer]
*******************************************
- File[/etc/systemd/system/centos-health.service]
*******************************************
- File[/etc/systemd/system/centos-health.timer]
*******************************************
- File[/etc/systemd/system/centos.service]
*******************************************
- File[/etc/systemd/system/centos.timer]
*******************************************
- File[/etc/systemd/system/debian-health.service]
*******************************************
- File[/etc/systemd/system/debian-health.timer]
*******************************************
- File[/etc/systemd/system/debian-security-health.service]
*******************************************
- File[/etc/systemd/system/debian-security-health.timer]
*******************************************
- File[/etc/systemd/system/devuan.service]
*******************************************
- File[/etc/systemd/system/devuan.timer]
*******************************************
- File[/etc/systemd/system/elpa.service]
*******************************************
- File[/etc/systemd/system/elpa.timer]
*******************************************
- File[/etc/systemd/system/finnix.service]
*******************************************
- File[/etc/systemd/system/finnix.timer]
*******************************************
- File[/etc/systemd/system/freebsd-health.service]
*******************************************
- File[/etc/systemd/system/freebsd-health.timer]
*******************************************
- File[/etc/systemd/system/freebsd.service]
*******************************************
- File[/etc/systemd/system/freebsd.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-debian-cd.service]
*******************************************
- File[/etc/systemd/system/ftpsync-debian-cd.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-debian-security.service]
*******************************************
- File[/etc/systemd/system/ftpsync-debian-security.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-debian.service]
*******************************************
- File[/etc/systemd/system/ftpsync-debian.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-kali-images.service]
*******************************************
- File[/etc/systemd/system/ftpsync-kali-images.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-kali.service]
*******************************************
- File[/etc/systemd/system/ftpsync-kali.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-puppetlabs.service]
*******************************************
- File[/etc/systemd/system/ftpsync-puppetlabs.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-trisquel-images.service]
*******************************************
- File[/etc/systemd/system/ftpsync-trisquel-images.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-trisquel.service]
*******************************************
- File[/etc/systemd/system/ftpsync-trisquel.timer]
*******************************************
- File[/etc/systemd/system/ftpsync-ubuntu.service]
*******************************************
- File[/etc/systemd/system/ftpsync-ubuntu.timer]
*******************************************
- File[/etc/systemd/system/gnu-health.service]
*******************************************
- File[/etc/systemd/system/gnu-health.timer]
*******************************************
- File[/etc/systemd/system/gnu.service]
*******************************************
- File[/etc/systemd/system/gnu.timer]
*******************************************
- File[/etc/systemd/system/kali-health.service]
*******************************************
- File[/etc/systemd/system/kali-health.timer]
*******************************************
- File[/etc/systemd/system/kde-applicationdata-health.service]
*******************************************
- File[/etc/systemd/system/kde-applicationdata-health.timer]
*******************************************
- File[/etc/systemd/system/kde-applicationdata.service]
*******************************************
- File[/etc/systemd/system/kde-applicationdata.timer]
*******************************************
- File[/etc/systemd/system/kde.service]
*******************************************
- File[/etc/systemd/system/kde.timer]
*******************************************
- File[/etc/systemd/system/manjaro-health.service]
*******************************************
- File[/etc/systemd/system/manjaro-health.timer]
*******************************************
- File[/etc/systemd/system/manjaro.service]
*******************************************
- File[/etc/systemd/system/manjaro.timer]
*******************************************
- File[/etc/systemd/system/melpa.service]
*******************************************
- File[/etc/systemd/system/melpa.timer]
*******************************************
- File[/etc/systemd/system/openbsd-health.service]
*******************************************
- File[/etc/systemd/system/openbsd-health.timer]
*******************************************
- File[/etc/systemd/system/openbsd.service]
*******************************************
- File[/etc/systemd/system/openbsd.timer]
*******************************************
- File[/etc/systemd/system/parrot-health.service]
*******************************************
- File[/etc/systemd/system/parrot-health.timer]
*******************************************
- File[/etc/systemd/system/parrot.service]
*******************************************
- File[/etc/systemd/system/parrot.timer]
*******************************************
- File[/etc/systemd/system/puppetlabs-health.service]
*******************************************
- File[/etc/systemd/system/puppetlabs-health.timer]
*******************************************
- File[/etc/systemd/system/qt-health.service]
*******************************************
- File[/etc/systemd/system/qt-health.timer]
*******************************************
- File[/etc/systemd/system/qt.service]
*******************************************
- File[/etc/systemd/system/qt.timer]
*******************************************
File[/etc/systemd/system/raspbian-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for raspbian-health
+Description=Healthcheck service for raspbian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/raspbian/health raspbian http://mirrors.ocf.berkeley.edu/raspbian/raspbian/dists/stretch/Release http://archive.raspbian.org/raspbian/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
- File[/etc/systemd/system/tails-health.service]
*******************************************
- File[/etc/systemd/system/tails-health.timer]
*******************************************
- File[/etc/systemd/system/tails.service]
*******************************************
- File[/etc/systemd/system/tails.timer]
*******************************************
- File[/etc/systemd/system/trisquel-health.service]
*******************************************
- File[/etc/systemd/system/trisquel-health.timer]
*******************************************
- File[/etc/systemd/system/ubuntu-health.service]
*******************************************
- File[/etc/systemd/system/ubuntu-health.timer]
*******************************************
- File[/etc/systemd/system/ubuntu-releases.service]
*******************************************
- File[/etc/systemd/system/ubuntu-releases.timer]
*******************************************
- File[/opt/mirrors/project/alpine/health]
*******************************************
- File[/opt/mirrors/project/alpine]
*******************************************
- File[/opt/mirrors/project/apache/health]
*******************************************
- File[/opt/mirrors/project/apache]
*******************************************
- File[/opt/mirrors/project/archlinux/health]
*******************************************
- File[/opt/mirrors/project/archlinux]
*******************************************
- File[/opt/mirrors/project/archlinuxcn/health]
*******************************************
- File[/opt/mirrors/project/archlinuxcn/sync_password]
*******************************************
- File[/opt/mirrors/project/archlinuxcn]
*******************************************
- File[/opt/mirrors/project/centos-altarch/health]
*******************************************
- File[/opt/mirrors/project/centos-altarch]
*******************************************
- File[/opt/mirrors/project/centos-debuginfo/health]
*******************************************
- File[/opt/mirrors/project/centos-debuginfo]
*******************************************
- File[/opt/mirrors/project/centos/health]
*******************************************
- File[/opt/mirrors/project/centos]
*******************************************
- File[/opt/mirrors/project/debian-cd/bin]
*******************************************
- File[/opt/mirrors/project/debian-cd/etc/common]
*******************************************
- File[/opt/mirrors/project/debian-cd/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/debian-cd/etc]
*******************************************
- File[/opt/mirrors/project/debian-cd/log]
*******************************************
- File[/opt/mirrors/project/debian-cd]
*******************************************
- File[/opt/mirrors/project/debian-security/bin]
*******************************************
- File[/opt/mirrors/project/debian-security/etc/common]
*******************************************
- File[/opt/mirrors/project/debian-security/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/debian-security/etc]
*******************************************
- File[/opt/mirrors/project/debian-security/health]
*******************************************
- File[/opt/mirrors/project/debian-security/log]
*******************************************
- File[/opt/mirrors/project/debian-security]
*******************************************
- File[/opt/mirrors/project/debian/bin]
*******************************************
- File[/opt/mirrors/project/debian/etc/common]
*******************************************
- File[/opt/mirrors/project/debian/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/debian/etc]
*******************************************
- File[/opt/mirrors/project/debian/health]
*******************************************
- File[/opt/mirrors/project/debian/log]
*******************************************
- File[/opt/mirrors/project/debian]
*******************************************
- File[/opt/mirrors/project/devuan]
*******************************************
- File[/opt/mirrors/project/elpa]
*******************************************
- File[/opt/mirrors/project/finnix/password]
*******************************************
- File[/opt/mirrors/project/finnix/sync-releases]
*******************************************
- File[/opt/mirrors/project/finnix]
*******************************************
- File[/opt/mirrors/project/freebsd/health]
*******************************************
- File[/opt/mirrors/project/freebsd]
*******************************************
- File[/opt/mirrors/project/gnu/health]
*******************************************
- File[/opt/mirrors/project/gnu]
*******************************************
- File[/opt/mirrors/project/kali-images/bin]
*******************************************
- File[/opt/mirrors/project/kali-images/etc/common]
*******************************************
- File[/opt/mirrors/project/kali-images/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/kali-images/etc]
*******************************************
- File[/opt/mirrors/project/kali-images/log]
*******************************************
- File[/opt/mirrors/project/kali-images]
*******************************************
- File[/opt/mirrors/project/kali/bin]
*******************************************
- File[/opt/mirrors/project/kali/etc/common]
*******************************************
- File[/opt/mirrors/project/kali/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/kali/etc]
*******************************************
- File[/opt/mirrors/project/kali/health]
*******************************************
- File[/opt/mirrors/project/kali/log]
*******************************************
- File[/opt/mirrors/project/kali]
*******************************************
- File[/opt/mirrors/project/kde-applicationdata/health]
*******************************************
- File[/opt/mirrors/project/kde-applicationdata]
*******************************************
- File[/opt/mirrors/project/kde]
*******************************************
- File[/opt/mirrors/project/manjaro/health]
*******************************************
- File[/opt/mirrors/project/manjaro]
*******************************************
- File[/opt/mirrors/project/melpa]
*******************************************
- File[/opt/mirrors/project/openbsd/health]
*******************************************
- File[/opt/mirrors/project/openbsd]
*******************************************
- File[/opt/mirrors/project/parrot/health]
*******************************************
- File[/opt/mirrors/project/parrot]
*******************************************
- File[/opt/mirrors/project/puppetlabs/bin]
*******************************************
- File[/opt/mirrors/project/puppetlabs/etc/common]
*******************************************
- File[/opt/mirrors/project/puppetlabs/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/puppetlabs/etc]
*******************************************
- File[/opt/mirrors/project/puppetlabs/health]
*******************************************
- File[/opt/mirrors/project/puppetlabs/log]
*******************************************
- File[/opt/mirrors/project/puppetlabs]
*******************************************
- File[/opt/mirrors/project/qt/health]
*******************************************
- File[/opt/mirrors/project/qt]
*******************************************
- File[/opt/mirrors/project/tails/health]
*******************************************
- File[/opt/mirrors/project/tails]
*******************************************
- File[/opt/mirrors/project/trisquel-images/bin]
*******************************************
- File[/opt/mirrors/project/trisquel-images/etc/common]
*******************************************
- File[/opt/mirrors/project/trisquel-images/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/trisquel-images/etc]
*******************************************
- File[/opt/mirrors/project/trisquel-images/log]
*******************************************
- File[/opt/mirrors/project/trisquel-images]
*******************************************
- File[/opt/mirrors/project/trisquel/bin]
*******************************************
- File[/opt/mirrors/project/trisquel/etc/common]
*******************************************
- File[/opt/mirrors/project/trisquel/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/trisquel/etc]
*******************************************
- File[/opt/mirrors/project/trisquel/health]
*******************************************
- File[/opt/mirrors/project/trisquel/log]
*******************************************
- File[/opt/mirrors/project/trisquel]
*******************************************
- File[/opt/mirrors/project/ubuntu/bin]
*******************************************
- File[/opt/mirrors/project/ubuntu/etc/common]
*******************************************
- File[/opt/mirrors/project/ubuntu/etc/ftpsync.conf]
*******************************************
- File[/opt/mirrors/project/ubuntu/etc]
*******************************************
- File[/opt/mirrors/project/ubuntu/health]
*******************************************
- File[/opt/mirrors/project/ubuntu/log]
*******************************************
- File[/opt/mirrors/project/ubuntu/sync-releases]
*******************************************
- File[/opt/mirrors/project/ubuntu]
*******************************************
- Ocf::Systemd::Timer[alpine-health]
*******************************************
- Ocf::Systemd::Timer[alpine]
*******************************************
- Ocf::Systemd::Timer[apache-health]
*******************************************
- Ocf::Systemd::Timer[apache]
*******************************************
- Ocf::Systemd::Timer[archlinux-health]
*******************************************
- Ocf::Systemd::Timer[archlinux]
*******************************************
- Ocf::Systemd::Timer[archlinuxcn-health]
*******************************************
- Ocf::Systemd::Timer[archlinuxcn]
*******************************************
- Ocf::Systemd::Timer[centos-altarch-health]
*******************************************
- Ocf::Systemd::Timer[centos-altarch]
*******************************************
- Ocf::Systemd::Timer[centos-debuginfo-health]
*******************************************
- Ocf::Systemd::Timer[centos-debuginfo]
*******************************************
- Ocf::Systemd::Timer[centos-health]
*******************************************
- Ocf::Systemd::Timer[centos]
*******************************************
- Ocf::Systemd::Timer[debian-health]
*******************************************
- Ocf::Systemd::Timer[debian-security-health]
*******************************************
- Ocf::Systemd::Timer[devuan]
*******************************************
- Ocf::Systemd::Timer[elpa]
*******************************************
- Ocf::Systemd::Timer[finnix]
*******************************************
- Ocf::Systemd::Timer[freebsd-health]
*******************************************
- Ocf::Systemd::Timer[freebsd]
*******************************************
- Ocf::Systemd::Timer[ftpsync-debian-cd]
*******************************************
- Ocf::Systemd::Timer[ftpsync-debian-security]
*******************************************
- Ocf::Systemd::Timer[ftpsync-debian]
*******************************************
- Ocf::Systemd::Timer[ftpsync-kali-images]
*******************************************
- Ocf::Systemd::Timer[ftpsync-kali]
*******************************************
- Ocf::Systemd::Timer[ftpsync-puppetlabs]
*******************************************
- Ocf::Systemd::Timer[ftpsync-trisquel-images]
*******************************************
- Ocf::Systemd::Timer[ftpsync-trisquel]
*******************************************
- Ocf::Systemd::Timer[ftpsync-ubuntu]
*******************************************
- Ocf::Systemd::Timer[gnu-health]
*******************************************
- Ocf::Systemd::Timer[gnu]
*******************************************
- Ocf::Systemd::Timer[kali-health]
*******************************************
- Ocf::Systemd::Timer[kde-applicationdata-health]
*******************************************
- Ocf::Systemd::Timer[kde-applicationdata]
*******************************************
- Ocf::Systemd::Timer[kde]
*******************************************
- Ocf::Systemd::Timer[manjaro-health]
*******************************************
- Ocf::Systemd::Timer[manjaro]
*******************************************
- Ocf::Systemd::Timer[melpa]
*******************************************
- Ocf::Systemd::Timer[openbsd-health]
*******************************************
- Ocf::Systemd::Timer[openbsd]
*******************************************
- Ocf::Systemd::Timer[parrot-health]
*******************************************
- Ocf::Systemd::Timer[parrot]
*******************************************
- Ocf::Systemd::Timer[puppetlabs-health]
*******************************************
- Ocf::Systemd::Timer[qt-health]
*******************************************
- Ocf::Systemd::Timer[qt]
*******************************************
Ocf::Systemd::Timer[raspbian-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for raspbian-health
+Description=Healthcheck service for raspbian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/raspbian/health raspbian http://mirrors.ocf.berkeley.edu/raspbian/raspbian/dists/stretch/Release http://archive.raspbian.org/raspbian/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
- Ocf::Systemd::Timer[tails-health]
*******************************************
- Ocf::Systemd::Timer[tails]
*******************************************
- Ocf::Systemd::Timer[trisquel-health]
*******************************************
- Ocf::Systemd::Timer[ubuntu-health]
*******************************************
- Ocf::Systemd::Timer[ubuntu-releases]
*******************************************
- Ocf_mirrors::Ftpsync[debian-cd]
*******************************************
- Ocf_mirrors::Ftpsync[debian-security]
*******************************************
- Ocf_mirrors::Ftpsync[debian]
*******************************************
- Ocf_mirrors::Ftpsync[kali-images]
*******************************************
- Ocf_mirrors::Ftpsync[kali]
*******************************************
- Ocf_mirrors::Ftpsync[puppetlabs]
*******************************************
- Ocf_mirrors::Ftpsync[trisquel-images]
*******************************************
- Ocf_mirrors::Ftpsync[trisquel]
*******************************************
- Ocf_mirrors::Ftpsync[ubuntu]
*******************************************
- Ocf_mirrors::Monitoring[alpine]
*******************************************
- Ocf_mirrors::Monitoring[apache]
*******************************************
- Ocf_mirrors::Monitoring[archlinux]
*******************************************
- Ocf_mirrors::Monitoring[archlinuxcn]
*******************************************
- Ocf_mirrors::Monitoring[centos-altarch]
*******************************************
- Ocf_mirrors::Monitoring[centos-debuginfo]
*******************************************
- Ocf_mirrors::Monitoring[centos]
*******************************************
- Ocf_mirrors::Monitoring[debian-security]
*******************************************
- Ocf_mirrors::Monitoring[debian]
*******************************************
- Ocf_mirrors::Monitoring[freebsd]
*******************************************
- Ocf_mirrors::Monitoring[gnu]
*******************************************
- Ocf_mirrors::Monitoring[kali]
*******************************************
- Ocf_mirrors::Monitoring[kde-applicationdata]
*******************************************
- Ocf_mirrors::Monitoring[manjaro]
*******************************************
- Ocf_mirrors::Monitoring[openbsd]
*******************************************
- Ocf_mirrors::Monitoring[parrot]
*******************************************
- Ocf_mirrors::Monitoring[puppetlabs]
*******************************************
- Ocf_mirrors::Monitoring[qt]
*******************************************
- Ocf_mirrors::Monitoring[tails]
*******************************************
- Ocf_mirrors::Monitoring[trisquel]
*******************************************
- Ocf_mirrors::Monitoring[ubuntu]
*******************************************
- Ocf_mirrors::Timer[alpine-health]
*******************************************
- Ocf_mirrors::Timer[alpine]
*******************************************
- Ocf_mirrors::Timer[apache-health]
*******************************************
- Ocf_mirrors::Timer[apache]
*******************************************
- Ocf_mirrors::Timer[archlinux-health]
*******************************************
- Ocf_mirrors::Timer[archlinux]
*******************************************
- Ocf_mirrors::Timer[archlinuxcn-health]
*******************************************
- Ocf_mirrors::Timer[archlinuxcn]
*******************************************
- Ocf_mirrors::Timer[centos-altarch-health]
*******************************************
- Ocf_mirrors::Timer[centos-altarch]
*******************************************
- Ocf_mirrors::Timer[centos-debuginfo-health]
*******************************************
- Ocf_mirrors::Timer[centos-debuginfo]
*******************************************
- Ocf_mirrors::Timer[centos-health]
*******************************************
- Ocf_mirrors::Timer[centos]
*******************************************
- Ocf_mirrors::Timer[debian-health]
*******************************************
- Ocf_mirrors::Timer[debian-security-health]
*******************************************
- Ocf_mirrors::Timer[devuan]
*******************************************
- Ocf_mirrors::Timer[elpa]
*******************************************
- Ocf_mirrors::Timer[finnix]
*******************************************
- Ocf_mirrors::Timer[freebsd-health]
*******************************************
- Ocf_mirrors::Timer[freebsd]
*******************************************
- Ocf_mirrors::Timer[ftpsync-debian-cd]
*******************************************
- Ocf_mirrors::Timer[ftpsync-debian-security]
*******************************************
- Ocf_mirrors::Timer[ftpsync-debian]
*******************************************
- Ocf_mirrors::Timer[ftpsync-kali-images]
*******************************************
- Ocf_mirrors::Timer[ftpsync-kali]
*******************************************
- Ocf_mirrors::Timer[ftpsync-puppetlabs]
*******************************************
- Ocf_mirrors::Timer[ftpsync-trisquel-images]
*******************************************
- Ocf_mirrors::Timer[ftpsync-trisquel]
*******************************************
- Ocf_mirrors::Timer[ftpsync-ubuntu]
*******************************************
- Ocf_mirrors::Timer[gnu-health]
*******************************************
- Ocf_mirrors::Timer[gnu]
*******************************************
- Ocf_mirrors::Timer[kali-health]
*******************************************
- Ocf_mirrors::Timer[kde-applicationdata-health]
*******************************************
- Ocf_mirrors::Timer[kde-applicationdata]
*******************************************
- Ocf_mirrors::Timer[kde]
*******************************************
- Ocf_mirrors::Timer[manjaro-health]
*******************************************
- Ocf_mirrors::Timer[manjaro]
*******************************************
- Ocf_mirrors::Timer[melpa]
*******************************************
- Ocf_mirrors::Timer[openbsd-health]
*******************************************
- Ocf_mirrors::Timer[openbsd]
*******************************************
- Ocf_mirrors::Timer[parrot-health]
*******************************************
- Ocf_mirrors::Timer[parrot]
*******************************************
- Ocf_mirrors::Timer[puppetlabs-health]
*******************************************
- Ocf_mirrors::Timer[qt-health]
*******************************************
- Ocf_mirrors::Timer[qt]
*******************************************
- Ocf_mirrors::Timer[tails-health]
*******************************************
- Ocf_mirrors::Timer[tails]
*******************************************
- Ocf_mirrors::Timer[trisquel-health]
*******************************************
- Ocf_mirrors::Timer[ubuntu-health]
*******************************************
- Ocf_mirrors::Timer[ubuntu-releases]
*******************************************
- Service[alpine-health.timer]
*******************************************
- Service[alpine.timer]
*******************************************
- Service[apache-health.timer]
*******************************************
- Service[apache.timer]
*******************************************
- Service[archlinux-health.timer]
*******************************************
- Service[archlinux.timer]
*******************************************
- Service[archlinuxcn-health.timer]
*******************************************
- Service[archlinuxcn.timer]
*******************************************
- Service[centos-altarch-health.timer]
*******************************************
- Service[centos-altarch.timer]
*******************************************
- Service[centos-debuginfo-health.timer]
*******************************************
- Service[centos-debuginfo.timer]
*******************************************
- Service[centos-health.timer]
*******************************************
- Service[centos.timer]
*******************************************
- Service[debian-health.timer]
*******************************************
- Service[debian-security-health.timer]
*******************************************
- Service[devuan.timer]
*******************************************
- Service[elpa.timer]
*******************************************
- Service[finnix.timer]
*******************************************
- Service[freebsd-health.timer]
*******************************************
- Service[freebsd.timer]
*******************************************
- Service[ftpsync-debian-cd.timer]
*******************************************
- Service[ftpsync-debian-security.timer]
*******************************************
- Service[ftpsync-debian.timer]
*******************************************
- Service[ftpsync-kali-images.timer]
*******************************************
- Service[ftpsync-kali.timer]
*******************************************
- Service[ftpsync-puppetlabs.timer]
*******************************************
- Service[ftpsync-trisquel-images.timer]
*******************************************
- Service[ftpsync-trisquel.timer]
*******************************************
- Service[ftpsync-ubuntu.timer]
*******************************************
- Service[gnu-health.timer]
*******************************************
- Service[gnu.timer]
*******************************************
- Service[kali-health.timer]
*******************************************
- Service[kde-applicationdata-health.timer]
*******************************************
- Service[kde-applicationdata.timer]
*******************************************
- Service[kde.timer]
*******************************************
- Service[manjaro-health.timer]
*******************************************
- Service[manjaro.timer]
*******************************************
- Service[melpa.timer]
*******************************************
- Service[openbsd-health.timer]
*******************************************
- Service[openbsd.timer]
*******************************************
- Service[parrot-health.timer]
*******************************************
- Service[parrot.timer]
*******************************************
- Service[puppetlabs-health.timer]
*******************************************
- Service[qt-health.timer]
*******************************************
- Service[qt.timer]
*******************************************
- Service[tails-health.timer]
*******************************************
- Service[tails.timer]
*******************************************
- Service[trisquel-health.timer]
*******************************************
- Service[ubuntu-health.timer]
*******************************************
- Service[ubuntu-releases.timer]
*******************************************
- Ssh_authorized_key[kali-push@mirrors]
******************************************* Unaffected hosts
|
Errored hosts (0)Changed hosts (2)Unaffected hosts (129)WARNING: Output is too long for a comment, posted to a gist instead: https://gist.github.com/5622ebcc1a9534b252ecd727a84e207c |
The monitor service file should retry 5 times before giving up, after which the service will go into reset-failed state.
Errored hosts (0)Changed hosts (1)Unaffected hosts (130)Changed hostsdiff for fallingrocks.ocf.berkeley.edu*******************************************
File[/etc/systemd/system/alpine-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for alpine-health
+Description=Healthcheck service for alpine-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/alpine/health alpine http://mirrors.ocf.berkeley.edu/alpine/last-updated http://dl-cdn.alpinelinux.org/alpine/last-updated --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/apache-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for apache-health
+Description=Healthcheck service for apache-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/apache/health apache http://mirrors.ocf.berkeley.edu/apache/zzz/time.txt http://archive.apache.org/dist/zzz/time.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/archlinux-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for archlinux-health
+Description=Healthcheck service for archlinux-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/archlinux/health archlinux http://mirrors.ocf.berkeley.edu/archlinux/lastsync http://mirrors.rit.edu/archlinux/lastsync --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/archlinuxcn-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for archlinuxcn-health
+Description=Healthcheck service for archlinuxcn-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/archlinuxcn/health archlinuxcn http://mirrors.ocf.berkeley.edu/archlinuxcn/lastupdate http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/lastupdate --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/centos-altarch-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-altarch-health
+Description=Healthcheck service for centos-altarch-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos-altarch/health centos-altarch http://mirrors.ocf.berkeley.edu/centos-altarch/TIME http://mirror.centos.org/altarch/TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/centos-debuginfo-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-debuginfo-health
+Description=Healthcheck service for centos-debuginfo-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos-debuginfo/health centos-debuginfo http://mirrors.ocf.berkeley.edu/centos-debuginfo/TIME http://debuginfo.centos.org//TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/centos-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-health
+Description=Healthcheck service for centos-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos/health centos http://mirrors.ocf.berkeley.edu/centos/TIME http://mirror.centos.org/centos/TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/debian-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for debian-health
+Description=Healthcheck service for debian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/debian/health debian http://mirrors.ocf.berkeley.edu/debian/dists/stable/Release http://ftp.us.debian.org/debian/dists/stable/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/debian-security-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for debian-security-health
+Description=Healthcheck service for debian-security-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/debian-security/health debian-security http://mirrors.ocf.berkeley.edu/debian-security/dists/stable/updates/Release http://security.debian.org/dists/stable/updates/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/freebsd-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for freebsd-health
+Description=Healthcheck service for freebsd-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/freebsd/health freebsd http://mirrors.ocf.berkeley.edu/freebsd/TIMESTAMP http://ftp.freebsd.org/pub/FreeBSD/TIMESTAMP --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/gnu-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for gnu-health
+Description=Healthcheck service for gnu-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/gnu/health gnu http://mirrors.ocf.berkeley.edu/gnu/mirror-updated-timestamp.txt http://ftp.gnu.org/gnu/mirror-updated-timestamp.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/kali-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for kali-health
+Description=Healthcheck service for kali-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/kali/health kali http://mirrors.ocf.berkeley.edu/kali/dists/kali-rolling/Release http://archive.kali.org/kali/dists/kali-rolling/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/kde-applicationdata-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for kde-applicationdata-health
+Description=Healthcheck service for kde-applicationdata-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/kde-applicationdata/health kde-applicationdata http://mirrors.ocf.berkeley.edu/kde-applicationdata/last-updated http://files.kde.org/last-updated --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/manjaro-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for manjaro-health
+Description=Healthcheck service for manjaro-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/manjaro/health manjaro http://mirrors.ocf.berkeley.edu/manjaro/state http://manjaro.mirrors.uk2.net/state --type=manjaro
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/openbsd-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for openbsd-health
+Description=Healthcheck service for openbsd-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/openbsd/health openbsd http://mirrors.ocf.berkeley.edu/openbsd/timestamp http://ftp.openbsd.org/pub/OpenBSD/timestamp --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/parrot-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for parrot-health
+Description=Healthcheck service for parrot-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/parrot/health parrot http://mirrors.ocf.berkeley.edu/parrot/last-sync.txt http://archive.parrotsec.org/parrot/last-sync.txt --type=datetime
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/puppetlabs-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for puppetlabs-health
+Description=Healthcheck service for puppetlabs-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/puppetlabs/health puppetlabs http://mirrors.ocf.berkeley.edu/puppetlabs/apt/dists/stretch/Release http://apt.puppetlabs.com/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/qt-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for qt-health
+Description=Healthcheck service for qt-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/qt/health qt http://mirrors.ocf.berkeley.edu/qt/timestamp.txt http://download.qt.io/timestamp.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/raspbian-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for raspbian-health
+Description=Healthcheck service for raspbian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/raspbian/health raspbian http://mirrors.ocf.berkeley.edu/raspbian/raspbian/dists/stretch/Release http://archive.raspbian.org/raspbian/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/tails-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for tails-health
+Description=Healthcheck service for tails-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/tails/health tails http://mirrors.ocf.berkeley.edu/tails/project/trace http://mirrors.edge.kernel.org/tails/project/trace --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/trisquel-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for trisquel-health
+Description=Healthcheck service for trisquel-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/trisquel/health trisquel http://mirrors.ocf.berkeley.edu/trisquel/dists/flidas/Release http://mirror.fsf.org/trisquel/dists/flidas/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
File[/etc/systemd/system/ubuntu-health.service] =>
parameters =>
content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for ubuntu-health
+Description=Healthcheck service for ubuntu-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/ubuntu/health ubuntu http://mirrors.ocf.berkeley.edu/ubuntu/dists/devel/Release http://archive.ubuntu.com/ubuntu/dists/devel/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[alpine-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for alpine-health
+Description=Healthcheck service for alpine-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/alpine/health alpine http://mirrors.ocf.berkeley.edu/alpine/last-updated http://dl-cdn.alpinelinux.org/alpine/last-updated --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[apache-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for apache-health
+Description=Healthcheck service for apache-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/apache/health apache http://mirrors.ocf.berkeley.edu/apache/zzz/time.txt http://archive.apache.org/dist/zzz/time.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[archlinux-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for archlinux-health
+Description=Healthcheck service for archlinux-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/archlinux/health archlinux http://mirrors.ocf.berkeley.edu/archlinux/lastsync http://mirrors.rit.edu/archlinux/lastsync --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[archlinuxcn-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for archlinuxcn-health
+Description=Healthcheck service for archlinuxcn-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/archlinuxcn/health archlinuxcn http://mirrors.ocf.berkeley.edu/archlinuxcn/lastupdate http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/lastupdate --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[centos-altarch-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-altarch-health
+Description=Healthcheck service for centos-altarch-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos-altarch/health centos-altarch http://mirrors.ocf.berkeley.edu/centos-altarch/TIME http://mirror.centos.org/altarch/TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[centos-debuginfo-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-debuginfo-health
+Description=Healthcheck service for centos-debuginfo-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos-debuginfo/health centos-debuginfo http://mirrors.ocf.berkeley.edu/centos-debuginfo/TIME http://debuginfo.centos.org//TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[centos-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for centos-health
+Description=Healthcheck service for centos-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/centos/health centos http://mirrors.ocf.berkeley.edu/centos/TIME http://mirror.centos.org/centos/TIME --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[debian-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for debian-health
+Description=Healthcheck service for debian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/debian/health debian http://mirrors.ocf.berkeley.edu/debian/dists/stable/Release http://ftp.us.debian.org/debian/dists/stable/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[debian-security-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for debian-security-health
+Description=Healthcheck service for debian-security-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/debian-security/health debian-security http://mirrors.ocf.berkeley.edu/debian-security/dists/stable/updates/Release http://security.debian.org/dists/stable/updates/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[freebsd-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for freebsd-health
+Description=Healthcheck service for freebsd-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/freebsd/health freebsd http://mirrors.ocf.berkeley.edu/freebsd/TIMESTAMP http://ftp.freebsd.org/pub/FreeBSD/TIMESTAMP --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[gnu-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for gnu-health
+Description=Healthcheck service for gnu-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/gnu/health gnu http://mirrors.ocf.berkeley.edu/gnu/mirror-updated-timestamp.txt http://ftp.gnu.org/gnu/mirror-updated-timestamp.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[kali-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for kali-health
+Description=Healthcheck service for kali-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/kali/health kali http://mirrors.ocf.berkeley.edu/kali/dists/kali-rolling/Release http://archive.kali.org/kali/dists/kali-rolling/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[kde-applicationdata-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for kde-applicationdata-health
+Description=Healthcheck service for kde-applicationdata-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/kde-applicationdata/health kde-applicationdata http://mirrors.ocf.berkeley.edu/kde-applicationdata/last-updated http://files.kde.org/last-updated --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[manjaro-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for manjaro-health
+Description=Healthcheck service for manjaro-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/manjaro/health manjaro http://mirrors.ocf.berkeley.edu/manjaro/state http://manjaro.mirrors.uk2.net/state --type=manjaro
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[openbsd-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for openbsd-health
+Description=Healthcheck service for openbsd-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/openbsd/health openbsd http://mirrors.ocf.berkeley.edu/openbsd/timestamp http://ftp.openbsd.org/pub/OpenBSD/timestamp --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[parrot-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for parrot-health
+Description=Healthcheck service for parrot-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/parrot/health parrot http://mirrors.ocf.berkeley.edu/parrot/last-sync.txt http://archive.parrotsec.org/parrot/last-sync.txt --type=datetime
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[puppetlabs-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for puppetlabs-health
+Description=Healthcheck service for puppetlabs-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/puppetlabs/health puppetlabs http://mirrors.ocf.berkeley.edu/puppetlabs/apt/dists/stretch/Release http://apt.puppetlabs.com/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[qt-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for qt-health
+Description=Healthcheck service for qt-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/qt/health qt http://mirrors.ocf.berkeley.edu/qt/timestamp.txt http://download.qt.io/timestamp.txt --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[raspbian-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for raspbian-health
+Description=Healthcheck service for raspbian-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/raspbian/health raspbian http://mirrors.ocf.berkeley.edu/raspbian/raspbian/dists/stretch/Release http://archive.raspbian.org/raspbian/dists/stretch/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[tails-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for tails-health
+Description=Healthcheck service for tails-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/tails/health tails http://mirrors.ocf.berkeley.edu/tails/project/trace http://mirrors.edge.kernel.org/tails/project/trace --type=unix_timestamp
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[trisquel-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for trisquel-health
+Description=Healthcheck service for trisquel-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/trisquel/health trisquel http://mirrors.ocf.berkeley.edu/trisquel/dists/flidas/Release http://mirror.fsf.org/trisquel/dists/flidas/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
*******************************************
Ocf::Systemd::Timer[ubuntu-health] =>
parameters =>
service_content =>
@@ -1,4 +1,6 @@
[Unit]
-Description=Sync service for ubuntu-health
+Description=Healthcheck service for ubuntu-health
+StartLimitInterval=70
+StartLimitBurst=5
_
[Service]
@@ -6,4 +8,5 @@
Type=simple
ExecStart=/opt/mirrors/project/ubuntu/health ubuntu http://mirrors.ocf.berkeley.edu/ubuntu/dists/devel/Release http://archive.ubuntu.com/ubuntu/dists/devel/Release --type=debian
-# one day should be good enough for anyone
-RuntimeMaxSec=86400
+RuntimeMaxSec=10
+Restart=always
+RestartSec=5
******************************************* Unaffected hosts
|
Ok, that sounds pretty convincing to me. I've updated the code to use systemd to manage the execution instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I left a comment about the if statement but you can merge without fixing if you'd like, since anyone who takes on #495 will probably end up getting to it anyways.
fail('Type parameter of ocf_mirrors:timer must be either sync or monitor') | ||
} | ||
|
||
if $type == 'sync' { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a huge deal, but if statements in Puppet are a code smell. The Puppet resource for sync jobs and monitoring jobs should be separate since they do totally different things.
Sometimes we see hung connections and this can stall the healthcheck for a long time plus fire alerts. It's probably better to retry a couple of times and then fail.