if concurrent snapshot happening on the same vm, throw invalid parameter

exception to user.
Reviewed-by: Frank
This commit is contained in:
Edison Su 2014-12-09 15:38:58 -08:00
parent 8f2bd45660
commit 1eb20ee095

View File

@ -938,7 +938,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
List<SnapshotVO> activeSnapshots =
_snapshotDao.listByInstanceId(volume.getInstanceId(), Snapshot.State.Creating, Snapshot.State.CreatedOnPrimary, Snapshot.State.BackingUp);
if (activeSnapshots.size() > 0) {
throw new CloudRuntimeException("There is other active snapshot tasks on the instance to which the volume is attached, please try again later");
throw new InvalidParameterValueException("There is other active snapshot tasks on the instance to which the volume is attached, please try again later");
}
}