osmith submitted this change.

View Change

Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved
obs-mirror: restart on failure

Make the obs-mirror service more robust by automatically restarting it
on failure, after 10 minutes. This fixes that the mirroring can fail for
a day with:

rsync warning: some files vanished before they could be transferred (code 24) at main.c(1861) [generator=3.4.1]

Change-Id: Ia85c2f34c58567a46ed3849777af1d08df06640f
---
M contrib/obs-mirror/systemd/obs-mirror.service
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/contrib/obs-mirror/systemd/obs-mirror.service b/contrib/obs-mirror/systemd/obs-mirror.service
index 6a2f8a0..7348ae6 100644
--- a/contrib/obs-mirror/systemd/obs-mirror.service
+++ b/contrib/obs-mirror/systemd/obs-mirror.service
@@ -5,6 +5,8 @@
Type=oneshot
User=pkgmirror
ExecStart=/home/pkgmirror/osmo-ci/contrib/obs-mirror/obs-mirror.sh
+Restart=on-failure
+RestartSec=600

[Install]
WantedBy=multi-user.target

To view, visit change 43374. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia85c2f34c58567a46ed3849777af1d08df06640f
Gerrit-Change-Number: 43374
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>