From bb96fbbb3c459fa0920208fa61b8fcf616de9084 Mon Sep 17 00:00:00 2001 From: jochens Date: Thu, 12 Nov 2026 23:07:55 +0100 Subject: [PATCH] zfs: the scheduled run names its minutes, so its timer starts (issue 1979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- modules/zfs/cmd/zfs-tools/manifest_test.go | 8 +++++++- modules/zfs/module.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/zfs/cmd/zfs-tools/manifest_test.go b/modules/zfs/cmd/zfs-tools/manifest_test.go index ca82669c4..b917c57a1 100644 --- a/modules/zfs/cmd/zfs-tools/manifest_test.go +++ b/modules/zfs/cmd/zfs-tools/manifest_test.go @@ -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"]) } diff --git a/modules/zfs/module.json b/modules/zfs/module.json index c109320a6..195263374 100644 --- a/modules/zfs/module.json +++ b/modules/zfs/module.json @@ -195,7 +195,7 @@ "./zfs-tools", "scrub-run" ], - "schedule": "*/15 * * * *" + "schedule": "0,15,30,45 * * * *" }, { "id": "distribution-weekly",