mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
fix(backups): a verification marks each damaged backup of the chain; an error told once
Verifying an incremental backup put what it found only on that backup: a base whose file was changed or missing stayed unmarked, so restoring it gave no warning and no badge showed it. Each backup of the chain is now verified with it and holds the damage of its files and of those it builds on. Verifications of backups of one chain run one at a time, so an older read never writes over a newer finding; the rows and the job's own result are written together, and recovery reads that result, also when a cancel came after the reads. A job whose recovery found the error it had raised stored it twice (the verify job's damage, in its page and its alert).
This commit is contained in:
parent
2c8493ba8c
commit
fc6ad4e8ca
5 changed files with 87 additions and 23 deletions
|
|
@ -478,8 +478,10 @@ class Scheduler:
|
|||
self._done(op.pk)
|
||||
|
||||
def _error(self, op_id, finding):
|
||||
"""What an unproven end stores: the error the job raised, then what libvirt shows."""
|
||||
return [*self.errors.get(op_id, ()), *finding]
|
||||
"""What an unproven end stores: the error the job raised, then what libvirt shows (a message the
|
||||
raised error has already, once)."""
|
||||
raised = list(self.errors.get(op_id, ()))
|
||||
return [*raised, *(message for message in finding if message not in raised)]
|
||||
|
||||
def _phase(self, op_id, text, progress=None):
|
||||
fields = {"phase": utils.safe_text(text)[:255]} if text else {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue