mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: warn on migration of volumes within the same storage pool (#3424)
Added an if statement that catches the destination poolid as an invalid parameter if it is similer to the current poolid. Fixes #3291
This commit is contained in:
parent
2c3c88e209
commit
f9998e418c
@ -2033,6 +2033,10 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
||||
throw new InvalidParameterValueException("Volume must be in ready state");
|
||||
}
|
||||
|
||||
if (vol.getPoolId() == storagePoolId) {
|
||||
throw new InvalidParameterValueException("Volume " + vol + " is already on the destination storage pool");
|
||||
}
|
||||
|
||||
boolean liveMigrateVolume = false;
|
||||
Long instanceId = vol.getInstanceId();
|
||||
Long srcClusterId = null;
|
||||
@ -3384,4 +3388,4 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
return new ConfigKey<?>[] {ConcurrentMigrationsThresholdPerDatastore};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user