mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 17:06:09 +00:00
The worker's periodic pass (about once a minute) runs the schedules: - Each enabled schedule's VMs are backed up once a local day, from the schedule's time for 6 hours, as its owner. A late time's window goes on after midnight; a time a spring-forward gap skips falls an hour later, a repeated autumn time is its first. A run row per schedule, VM row and day, and a submission key made from them, keep a worker that stopped between the job and its row from backing a VM up twice. - A busy target (one copy at a time) or an unreachable host is tried again at the next pass; a host in maintenance is waited for. A VM not started within the window, a VM that cannot be backed up (TPM) and a schedule whose owner is no longer an active superuser get a run row saying why. Times passed before a schedule was made are not run. - Each compute's submissions are a task of their own: a hung host stops no other compute's schedules. - Retention: each schedule's ready backups of a VM beyond keep, oldest first, one deletion a target at a time. The deletion checks again, before it changes anything, that the backup is still beyond keep. Backups by hand and backups of removed VMs are left alone. - Each target is checked once a day by a backup.check job holding it: a ready backup with a file gone, its manifest included, becomes missing (restore refused, delete allowed); one whose files are back is ready again. A pool no compute reaches marks nothing. - A scheduled backup carries the end of its window: one that waited past it for a worker slot, or whose host went into maintenance meanwhile, ends without starting (checked after the host answered). The jobs on a target alone (delete, read back, check) hold its computes too, shared: the worker counts a job's hosts by these, so a hung host takes no more than its share of the slots. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_create.py | ||
| test_delete.py | ||
| test_import.py | ||
| test_models.py | ||
| test_policy_models.py | ||
| test_restore.py | ||
| test_schedule.py | ||
| test_targets.py | ||