zfs: the scheduled run names its minutes, so its timer starts (issue 1979)
mesh/delivery merged: source.main moved to novox/mesh-catalog@117f933dacf0
mesh/check checking bb96fbbb3c45 on 117f933dacf0

The node-engine writes a cron step (*/15) as a calendar systemd refuses, so
zfs-mesh-scrub.timer never started and the pool had no scrub schedule. A list
of minutes is written as *-*-* *:0,15,30,45:00, which systemd takes.

Builds: design 42 zfs-owns-zfs §18. Tests: 1979/AC1.
This commit is contained in:
2026-11-12 23:07:55 +01:00
parent e271757db7
commit bb96fbbb3c
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -121,10 +121,16 @@ func TestExactlyOneScrubScheduleAndNoSettingInAUnitFile(t *testing.T) {
}
run := byID["scrub-run"]
args, _ := run["run"].([]any)
if run["type"] != "process" || run["name"] != "zfs-mesh-scrub" || run["schedule"] != "*/15 * * * *" || run["user"] != nil ||
if run["type"] != "process" || run["name"] != "zfs-mesh-scrub" || run["schedule"] != "0,15,30,45 * * * *" || run["user"] != nil ||
len(args) != 2 || args[1] != "scrub-run" {
t.Errorf("the scheduled run: %v", run)
}
// The node-engine writes a cron step ("*/15") as a calendar systemd refuses ("*:*/15"), and the timer never
// starts (novox/hq issue 1979, on the home server 2026-11-12). A list of minutes is written as a calendar
// systemd takes ("*-*-* *:0,15,30,45:00"), so the schedule names its minutes and never a step.
if s, _ := run["schedule"].(string); strings.Contains(s, "/") {
t.Errorf("the scheduled run's schedule %q uses a step, which the node-engine writes as a calendar systemd refuses", s)
}
if ScrubTimer != run["name"].(string)+".timer" || ScrubService != run["name"].(string)+".service" {
t.Errorf("the tools read %s and %s; the node-engine names them after %v", ScrubTimer, ScrubService, run["name"])
}
+1 -1
View File
@@ -195,7 +195,7 @@
"./zfs-tools",
"scrub-run"
],
"schedule": "*/15 * * * *"
"schedule": "0,15,30,45 * * * *"
},
{
"id": "distribution-weekly",