← All changes
Longhorn UI · Developed by us

Schedule snapshot groups with a recurring job

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.

Draft · waiting on backend PR 1099 ↗ Issue 14272 ↗ Backend PR 5332 ↗ Detailed review ↗
What changes for the user
Needs a decision

The flow

1

A new task in Create Recurring Job

"Snapshot Group" now appears in the Task list, right after Snapshot.

Task list before and after: Snapshot Group added
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.

Snapshot Group selected: Retain disabled at 0 with a warning, no Concurrency
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.

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

Label key RecurringJob is reserved for recurring jobs
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.

Recurring Jobs list before and after: 1 and 1 become - and -
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.

Snapshot Groups page with several groups from the test job
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