summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/0009-randomize-timers.patch
blob: dc129f24851a34ee500412d48534be7e76fef9ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Author: Dimitri John Ledkov <xnox@ubuntu.com>
Description: Randomize md array check timers (LP: #1815201).

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.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