Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,10 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
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;
Expand Down Expand Up @@ -3384,4 +3388,4 @@ public String getConfigComponentName() {
public ConfigKey<?>[] getConfigKeys() {
return new ConfigKey<?>[] {ConcurrentMigrationsThresholdPerDatastore};
}
}
}