Archive verified rollbacks of interrupted activation journals
ABSDEV Framework CI / framework-ci (push) Successful in 20s
ABSDEV Framework CI / framework-ci (push) Successful in 20s
This commit is contained in:
@@ -18,6 +18,7 @@ from core.compatibility import (
|
||||
validate_provenance,
|
||||
)
|
||||
from core.locking import DeploymentLock
|
||||
from core.recovery import ROLLBACK_ELIGIBLE_PHASES
|
||||
|
||||
|
||||
class RollbackArchiveReader:
|
||||
@@ -65,10 +66,10 @@ class RollbackArchiveReader:
|
||||
)
|
||||
|
||||
require(
|
||||
transaction["phase"] == "FAILED"
|
||||
transaction["phase"] in ROLLBACK_ELIGIBLE_PHASES
|
||||
and intent["status"] == "ROLLBACK_INTENT"
|
||||
and result["status"] == "ROLLED_BACK",
|
||||
"Completed failed-transaction rollback required",
|
||||
"Completed rollback of a failed or interrupted activation required",
|
||||
)
|
||||
|
||||
phases = {
|
||||
@@ -195,9 +196,9 @@ class RollbackArchive(RollbackArchiveReader):
|
||||
|
||||
require(
|
||||
transaction is not None
|
||||
and transaction["phase"] == "FAILED"
|
||||
and transaction["phase"] in ROLLBACK_ELIGIBLE_PHASES
|
||||
and transaction["site"] == self.planner.site,
|
||||
"Failed deployment transaction required",
|
||||
"Failed or interrupted deployment transaction required",
|
||||
)
|
||||
|
||||
identifier = transaction["transaction_id"]
|
||||
@@ -339,6 +340,7 @@ class RollbackArchive(RollbackArchiveReader):
|
||||
) from None
|
||||
|
||||
def _execute(self, confirmation, fingerprint):
|
||||
self.journal.require_writes_allowed()
|
||||
plan = self._plan()
|
||||
|
||||
require(
|
||||
|
||||
Reference in New Issue
Block a user