mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6046:CreateVolume from snapshot is failing with S3 as
secondary storage and zone-wide primary storage.(cherry picked from commit 900c51103a)
Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
parent
278c54a970
commit
3cd9dee1db
|
|
@ -249,7 +249,7 @@ AncientDataMotionStrategy implements DataMotionStrategy {
|
|||
if (srcData.getDataStore().getRole() == DataStoreRole.Primary) {
|
||||
ep = selector.select(volObj);
|
||||
} else {
|
||||
ep = selector.select(snapObj, volObj);
|
||||
ep = selector.select(srcData, volObj);
|
||||
}
|
||||
|
||||
CopyCommand cmd = new CopyCommand(srcData.getTO(), volObj.getTO(), _createVolumeFromSnapshotWait, VirtualMachineManager.ExecuteInSequence.value());
|
||||
|
|
|
|||
|
|
@ -167,10 +167,11 @@ public class DefaultEndPointSelector implements EndPointSelector {
|
|||
poolId = destStore.getId();
|
||||
} else {
|
||||
// if both are zone scope
|
||||
selectedScope = srcScope;
|
||||
if (srcStore.getRole() == DataStoreRole.Primary) {
|
||||
selectedScope = srcScope;
|
||||
poolId = srcStore.getId();
|
||||
} else if (destStore.getRole() == DataStoreRole.Primary) {
|
||||
selectedScope = destScope;
|
||||
poolId = destStore.getId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue