@@ -1526,7 +1526,7 @@ private boolean hasSuitablePoolsForVolume(final VolumeVO volume, final Host host
15261526 @ Override
15271527 public Pair <List <? extends StoragePool >, List <? extends StoragePool >> listStoragePoolsForMigrationOfVolume (final Long volumeId ) {
15281528
1529- Pair <List <? extends StoragePool >, List <? extends StoragePool >> allPoolsAndSuitablePoolsPair = listStoragePoolsForMigrationOfVolumeInternal (volumeId , null , null , null , null , false );
1529+ Pair <List <? extends StoragePool >, List <? extends StoragePool >> allPoolsAndSuitablePoolsPair = listStoragePoolsForMigrationOfVolumeInternal (volumeId , null , null , null , null , false , true );
15301530 List <? extends StoragePool > allPools = allPoolsAndSuitablePoolsPair .first ();
15311531 List <? extends StoragePool > suitablePools = allPoolsAndSuitablePoolsPair .second ();
15321532 List <StoragePool > avoidPools = new ArrayList <>();
@@ -1542,7 +1542,7 @@ public Pair<List<? extends StoragePool>, List<? extends StoragePool>> listStorag
15421542 return new Pair <List <? extends StoragePool >, List <? extends StoragePool >>(allPools , suitablePools );
15431543 }
15441544
1545- public Pair <List <? extends StoragePool >, List <? extends StoragePool >> listStoragePoolsForMigrationOfVolumeInternal (final Long volumeId , Long newDiskOfferingId , Long newSize , Long newMinIops , Long newMaxIops , boolean keepSourceStoragePool ) {
1545+ public Pair <List <? extends StoragePool >, List <? extends StoragePool >> listStoragePoolsForMigrationOfVolumeInternal (final Long volumeId , Long newDiskOfferingId , Long newSize , Long newMinIops , Long newMaxIops , boolean keepSourceStoragePool , boolean bypassStorageTypeCheck ) {
15461546 final Account caller = getCaller ();
15471547 if (!_accountMgr .isRootAdmin (caller .getId ())) {
15481548 if (s_logger .isDebugEnabled ()) {
@@ -1623,7 +1623,7 @@ public Pair<List<? extends StoragePool>, List<? extends StoragePool>> listStorag
16231623 }
16241624 if (vm != null ) {
16251625 suitablePools = findAllSuitableStoragePoolsForVm (volume , diskOfferingId , newSize , newMinIops , newMaxIops , vm , vmHost , avoid ,
1626- CollectionUtils .isNotEmpty (clusters ) ? clusters .get (0 ) : null , hypervisorType );
1626+ CollectionUtils .isNotEmpty (clusters ) ? clusters .get (0 ) : null , hypervisorType , bypassStorageTypeCheck );
16271627 } else {
16281628 suitablePools = findAllSuitableStoragePoolsForDetachedVolume (volume , diskOfferingId , allPools );
16291629 }
@@ -1714,7 +1714,7 @@ private List<? extends StoragePool> getAllStoragePoolCompatibleWithVolumeSourceS
17141714 *
17151715 * Side note: the idea behind this method is to provide power for administrators of manually overriding deployments defined by CloudStack.
17161716 */
1717- private List <StoragePool > findAllSuitableStoragePoolsForVm (final VolumeVO volume , Long diskOfferingId , Long newSize , Long newMinIops , Long newMaxIops , VMInstanceVO vm , Host vmHost , ExcludeList avoid , Cluster srcCluster , HypervisorType hypervisorType ) {
1717+ private List <StoragePool > findAllSuitableStoragePoolsForVm (final VolumeVO volume , Long diskOfferingId , Long newSize , Long newMinIops , Long newMaxIops , VMInstanceVO vm , Host vmHost , ExcludeList avoid , Cluster srcCluster , HypervisorType hypervisorType , boolean bypassStorageTypeCheck ) {
17181718 List <StoragePool > suitablePools = new ArrayList <>();
17191719 Long clusterId = null ;
17201720 Long podId = null ;
@@ -1736,7 +1736,7 @@ private List<StoragePool> findAllSuitableStoragePoolsForVm(final VolumeVO volume
17361736 }
17371737
17381738 for (StoragePoolAllocator allocator : _storagePoolAllocators ) {
1739- List <StoragePool > pools = allocator .allocateToPool (diskProfile , profile , plan , avoid , StoragePoolAllocator .RETURN_UPTO_ALL , true );
1739+ List <StoragePool > pools = allocator .allocateToPool (diskProfile , profile , plan , avoid , StoragePoolAllocator .RETURN_UPTO_ALL , bypassStorageTypeCheck );
17401740 if (CollectionUtils .isEmpty (pools )) {
17411741 continue ;
17421742 }
0 commit comments