CLOUDSTACK-5017: use LocalHostEndPoint in copying from S3 to cache store

during ssvm launch.
This commit is contained in:
Min Chen 2013-11-01 18:06:25 -07:00
parent 6eecb0b3b5
commit 24af28290e
1 changed files with 10 additions and 0 deletions

View File

@ -187,6 +187,16 @@ public class DefaultEndPointSelector implements EndPointSelector {
selectedStore = destStore;
}
EndPoint ep = findEndpointForImageStorage(selectedStore);
if (ep != null) {
return ep;
}
// handle special case where it is used in deploying ssvm for S3
if (srcData instanceof TemplateInfo) {
TemplateInfo tmpl = (TemplateInfo)srcData;
if (tmpl.getTemplateType() == TemplateType.SYSTEM) {
ep = LocalHostEndpoint.getEndpoint();
}
}
return ep;
} else if (moveBetweenImages(srcStore, destStore)) {
EndPoint ep = findEndpointForImageStorage(destStore);