Allow deletion of erroneous checkpoints
In a case where checkpoint creation has failed, allow deletion of the stale checkpoint. Change-Id: Ia81c1ef08d5a21b534fa6123cbb4dea1abda4a2c
This commit is contained in:
parent
e846299064
commit
4b0b5af7d2
@ -174,9 +174,9 @@ class ProtectionManager(manager.Manager):
|
|||||||
raise exception.InvalidInput(
|
raise exception.InvalidInput(
|
||||||
reason=_("Invalid checkpoint_id or provider_id"))
|
reason=_("Invalid checkpoint_id or provider_id"))
|
||||||
|
|
||||||
if checkpoint.status in [
|
if checkpoint.status not in [
|
||||||
|
constants.CHECKPOINT_STATUS_AVAILABLE,
|
||||||
constants.CHECKPOINT_STATUS_ERROR,
|
constants.CHECKPOINT_STATUS_ERROR,
|
||||||
constants.CHECKPOINT_STATUS_PROTECTING
|
|
||||||
]:
|
]:
|
||||||
raise exception.CheckpointNotBeDeleted(
|
raise exception.CheckpointNotBeDeleted(
|
||||||
checkpoint_id=checkpoint_id)
|
checkpoint_id=checkpoint_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user