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
|
|
@ -149,6 +149,13 @@ class RecoveryTestCase(TransactionTestCase):
|
|||
self.run_due()
|
||||
self.assertEqual(words(self.reload(op).error), "resource busy: X")
|
||||
|
||||
def test_a_finding_that_repeats_the_raised_error_is_stored_once(self):
|
||||
op = self.orphan({}, worker=self.worker.identity)
|
||||
self.scheduler.inspect_now(op.pk, error=say("damaged: X"))
|
||||
with patch.object(fakes.ScriptedKind, "reconcile", return_value=Outcome(Operation.FAILED, error=say("damaged: X"))):
|
||||
self.run_due()
|
||||
self.assertEqual(words(self.reload(op).error), "damaged: X")
|
||||
|
||||
def test_progress_resets_the_stall_timer(self):
|
||||
op = self.orphan({})
|
||||
self.run_at(1000, Outcome(Operation.RUNNING, stalled=True))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue