Skip to content

Commit cbd6250

Browse files
committed
Removed check about the storage provider
We don't need this check, we'll get if the snapshot is on StorPool be its name from path
1 parent f6a62fa commit cbd6250

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/snapshot/StorPoolSnapshotStrategy.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,11 @@ public StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op) {
132132
return StrategyPriority.CANT_HANDLE;
133133
}
134134

135-
VolumeVO volume = _volumeDao.findByIdIncludingRemoved(snapshot.getVolumeId());
136-
StoragePoolVO storage = _primaryDataStoreDao.findById(volume.getPoolId());
137135
String name = StorPoolHelper.getSnapshotName(snapshot.getId(), snapshot.getUuid(), _snapshotStoreDao, _snapshotDetailsDao);
138-
if (storage.getStorageProviderName().equals(StorPoolUtil.SP_PROVIDER_NAME)) {
139-
if (name != null) {
140-
StorPoolUtil.spLog("StorpoolSnapshotStrategy.canHandle: globalId=%s", name);
136+
if (name != null) {
137+
StorPoolUtil.spLog("StorpoolSnapshotStrategy.canHandle: globalId=%s", name);
141138

142-
return StrategyPriority.HIGHEST;
143-
}
139+
return StrategyPriority.HIGHEST;
144140
}
145141
SnapshotDetailsVO snapshotDetails = _snapshotDetailsDao.findDetail(snapshot.getId(), snapshot.getUuid());
146142
if (snapshotDetails != null) {

0 commit comments

Comments
 (0)