You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Determines whether volume size can exceed the pool capacity allocation disable threshold (pool.storage.allocated.capacity.disablethreshold) when resize a volume",
214
-
true, ConfigKey.Scope.StoragePool);
214
+
true, ConfigKey.Scope.Zone);
215
215
216
216
/**
217
217
* should we execute in sequence not involving any storages?
if (!storageMgr.storagePoolHasEnoughSpaceForResize(storagePool, currentSize, newSize)) {
1295
+
volumeMigrateRequired = true;
1296
+
if (!autoMigrateVolume) {
1297
+
thrownewCloudRuntimeException(String.format("Failed to resize volume %s since the storage pool does not have enough space to resize volume %s, automigrate is set to false but volume needs to migrated.", volume.getUuid(), volume.getName()));
if (CollectionUtils.isEmpty(poolsPair.first()) && CollectionUtils.isEmpty(poolsPair.second())) {
1315
+
thrownewServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Volume resize operation failed for volume ID: %s as no suitable pool(s) found for migrating to support new disk offering or new size", volume.getUuid()));
if (CollectionUtils.isEmpty(suitableStoragePoolsWithEnoughSpace)) {
1320
+
thrownewServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Volume resize operation failed for volume ID: %s as no suitable pool(s) with enough space found for volume migration.", volume.getUuid()));
thrownewCloudRuntimeException(String.format("Volume resize operation failed for volume ID: %s migration failed to storage pool %s", volume.getUuid(), suitableStoragePools.get(0).getId()));
1329
+
}
1330
+
} catch (Exceptione) {
1331
+
thrownewCloudRuntimeException(String.format("Volume resize operation failed for volume ID: %s migration failed to storage pool %s due to %s", volume.getUuid(), suitableStoragePools.get(0).getId(), e.getMessage()));
if (!suitableStoragePools.stream().anyMatch(p -> (p.getId() == existingStoragePool.getId()))) {
@@ -2077,10 +2122,16 @@ public Volume changeDiskOfferingForVolumeInternal(Long volumeId, Long newDiskOff
2077
2122
if (CollectionUtils.isEmpty(poolsPair.first()) && CollectionUtils.isEmpty(poolsPair.second())) {
2078
2123
thrownewServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Volume change offering operation failed for volume ID: %s as no suitable pool(s) found for migrating to support new disk offering", volume.getUuid()));
if (CollectionUtils.isEmpty(suitableStoragePoolsWithEnoughSpace)) {
2128
+
thrownewServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Volume change offering operation failed for volume ID: %s as no suitable pool(s) with enough space found for volume migration.", volume.getUuid()));
0 commit comments