A snapshot group takes a snapshot of several volumes together, so an app's volumes stay consistent. Longhorn is adding a recurring job task for it, and we added that task to the Create Recurring Job form. The backend part is not merged yet, so the change is a draft.
Create Recurring Job has a new Snapshot Group task. Each run snapshots all the volumes in the chosen groups together.
No retention: the job never deletes the groups it creates. Retain is locked at 0, and a warning says to delete old groups on the Snapshot Groups page before the volumes reach their snapshot limit.
Concurrency is hidden, and the job lists show "-" for Retain and Concurrency on these jobs.
The Groups help explains which volumes are included. It also says that the whole run is skipped if any of them is detached, faulted or restoring.
Labels are copied onto each group. Labels that the backend would reject on every run are blocked when the job is saved.
Needs a decision
Design: confirm that we hide retention for snapshot groups (Retain locked at 0, a warning, and "-" in the lists) instead of offering "keep the newest N groups".
Backend: raise on PR 5332 that this task should not use retention. Today the backend stores Retain as 1 and accepts age-based retention.
The flow
1
A new task in Create Recurring Job
"Snapshot Group" now appears in the Task list, right after Snapshot.
Before, a snapshot-group job could only be made outside the UI. Like System Backup, the task is only in the global Recurring Jobs form, not in a single volume's form.2
No retention for snapshot groups
Retain is locked at 0, like Snapshot Cleanup, and a warning explains that groups pile up until someone deletes them.
Groups are never deleted automatically, so a Retain number would promise something that doesn't happen. In our test, a job set to keep 2 still left 5 groups. Concurrency is also gone because each run takes one group.3
The Groups help explains what is included
The volumes in these groups and the volumes the job is assigned to are snapshotted together. If one can't be included, the whole run is skipped.
A group has to be a consistent set, so a single detached volume makes the job skip that run.4
Bad labels are caught before saving
The key "RecurringJob" is reserved, and "=" is not allowed, so the form blocks them.
Without this check, the backend accepts the job, but every run fails.5
The job list shows "-" for what the job doesn't use
Retain and Concurrency show "-" on Snapshot Group jobs, also in a volume's recurring job list.
Before, the list showed the stored numbers (1 and 1), but the job ignores both of them.6
Old groups are deleted by hand
The groups the job creates stay on the Snapshot Groups page until someone deletes them.
This page did not change. A volume holds at most 250 snapshots, so an hourly job fills it in about 10 days if nobody cleans up. The warning in step 2 points here.
Video (optional)
0:00 Before · 0:13 After
Notes
This stays a draft until backend PR 5332 merges. Until then, Longhorn rejects the new task.
If Longhorn adds group retention later, turning Retain back on is a small follow-up.
We chose this option over keeping Retain editable, which only works if the backend adds group retention. The detailed review compares both.