Allow restore only when checkpoint is available

Change-Id: Iab4a87f52595c203af490ba248df2164802da625
This commit is contained in:
Yuval Brik 2016-09-29 14:13:44 +03:00
parent e846299064
commit 47695ae2be
1 changed files with 1 additions and 2 deletions

View File

@ -129,8 +129,7 @@ class ProtectionManager(manager.Manager):
raise exception.InvalidInput(
reason=_("Invalid checkpoint id"))
if checkpoint.status in [constants.CHECKPOINT_STATUS_ERROR,
constants.CHECKPOINT_STATUS_PROTECTING]:
if checkpoint.status != constants.CHECKPOINT_STATUS_AVAILABLE:
raise exception.CheckpointNotAvailable(
checkpoint_id=checkpoint_id)