diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-28 19:12:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-28 19:45:00 +0000 |
commit | 23ca0c3b75a62f992eb4b1e053d4f3a7605cd62b (patch) | |
tree | f695886c5d133fa2dd11307d47d717ebffa2f0fe | |
parent | Removing cron jobs in favour of systemd timers. (diff) | |
download | mdadm-23ca0c3b75a62f992eb4b1e053d4f3a7605cd62b.tar.xz mdadm-23ca0c3b75a62f992eb4b1e053d4f3a7605cd62b.zip |
Adding rediffed patch from ubuntu to randomize md array check timers.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/patches/debian/0009-randomize-timers.patch | 75 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 76 insertions, 0 deletions
diff --git a/debian/patches/debian/0009-randomize-timers.patch b/debian/patches/debian/0009-randomize-timers.patch new file mode 100644 index 0000000..809522a --- /dev/null +++ b/debian/patches/debian/0009-randomize-timers.patch @@ -0,0 +1,75 @@ +Author: Dimitri John Ledkov <xnox@ubuntu.com> +Description: Randomize md array check timers (LP: #1815201). + +diff -Naurp mdadm.orig/systemd/mdcheck_continue.service mdadm/systemd/mdcheck_continue.service +--- mdadm.orig/systemd/mdcheck_continue.service ++++ mdadm/systemd/mdcheck_continue.service +@@ -13,6 +13,4 @@ Documentation=man:mdadm(8) + [Service] + Type=oneshot + Environment="MDADM_CHECK_DURATION=6 hours" +-EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh + ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION} +diff -Naurp mdadm.orig/systemd/mdcheck_continue.timer mdadm/systemd/mdcheck_continue.timer +--- mdadm.orig/systemd/mdcheck_continue.timer ++++ mdadm/systemd/mdcheck_continue.timer +@@ -9,7 +9,9 @@ + Description=MD array scrubbing - continuation + + [Timer] +-OnCalendar= 1:05:00 ++OnCalendar=daily ++RandomizedDelaySec=12h ++Persistent=true + + [Install] + WantedBy= mdmonitor.service +diff -Naurp mdadm.orig/systemd/mdcheck_start.service mdadm/systemd/mdcheck_start.service +--- mdadm.orig/systemd/mdcheck_start.service ++++ mdadm/systemd/mdcheck_start.service +@@ -13,6 +13,4 @@ Documentation=man:mdadm(8) + [Service] + Type=oneshot + Environment="MDADM_CHECK_DURATION=6 hours" +-EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh + ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION} +diff -Naurp mdadm.orig/systemd/mdcheck_start.timer mdadm/systemd/mdcheck_start.timer +--- mdadm.orig/systemd/mdcheck_start.timer ++++ mdadm/systemd/mdcheck_start.timer +@@ -10,6 +10,8 @@ Description=MD array scrubbing + + [Timer] + OnCalendar=Sun *-*-1..7 1:00:00 ++RandomizedDelaySec=24h ++Persistent=true + + [Install] + WantedBy= mdmonitor.service +diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.service mdadm/systemd/mdmonitor-oneshot.service +--- mdadm.orig/systemd/mdmonitor-oneshot.service ++++ mdadm/systemd/mdmonitor-oneshot.service +@@ -10,7 +10,4 @@ Description=Reminder for degraded MD arr + Documentation=man:mdadm(8) + + [Service] +-Environment=MDADM_MONITOR_ARGS=--scan +-EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh +-ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS ++ExecStart=BINDIR/mdadm --monitor --oneshot --scan +diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.timer mdadm/systemd/mdmonitor-oneshot.timer +--- mdadm.orig/systemd/mdmonitor-oneshot.timer ++++ mdadm/systemd/mdmonitor-oneshot.timer +@@ -9,7 +9,9 @@ + Description=Reminder for degraded MD arrays + + [Timer] +-OnCalendar= 2:00:00 ++OnCalendar=daily ++RandomizedDelaySec=24h ++Persistent=true + + [Install] + WantedBy= mdmonitor.service diff --git a/debian/patches/series b/debian/patches/series index e845110..2ca96a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ debian/0005-sha1-includes.patch debian/0006-readlink-path.patch debian/0007-no-Werror.patch debian/0008-test-installed.patch +debian/0009-randomize-timers.patch |