String basicErrMsg = "Failed to create volume from " + snapshot.getName() + " on pool " + pool;
try {
if (snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0) {
_snapshotMgr.downloadSnapshotsFromSwift(snapshot);
}
CreateVolumeFromSnapshotCommand createVolumeFromSnapshotCommand = new CreateVolumeFromSnapshotCommand(primaryStoragePoolNameLabel, secondaryStoragePoolUrl, dcId, accountId, volumeId,
backedUpSnapshotUuid, snapshot.getName(), _createVolumeFromSnapshotWait);
CreateVolumeFromSnapshotAnswer answer;
if (!_snapshotDao.lockInLockTable(snapshotId.toString(), 10)) {
throw new CloudRuntimeException("failed to create volume from " + snapshotId + " due to this snapshot is being used, try it later ");
}