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 b40d9c23fc
commit b036c32bfc

View File

@ -956,7 +956,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");
}
}