mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6019:CreateVolume from snapshot in NFS is throwing Warning
"sync snapshot from cache to region wide store failed for image store test".
This commit is contained in:
parent
657d9e4789
commit
30695d7f93
|
|
@ -92,6 +92,15 @@ public class VmwareStorageSubsystemCommandHandler extends StorageSubsystemComman
|
|||
} else if (srcData.getObjectType() == DataObjectType.TEMPLATE) {
|
||||
// sync template from NFS cache to S3 in NFS migration to S3 case
|
||||
storageManager.createOvaForTemplate((TemplateObjectTO)srcData);
|
||||
} else if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType() == DataObjectType.SNAPSHOT) {
|
||||
// sync snapshot from NFS cache to S3 in NFS migration to S3 case
|
||||
String parentPath = storageResource.getRootDir(srcDataStore.getUrl());
|
||||
SnapshotObjectTO snap = (SnapshotObjectTO)srcData;
|
||||
String path = snap.getPath();
|
||||
int index = path.lastIndexOf(File.separator);
|
||||
String name = path.substring(index + 1);
|
||||
String snapDir = path.substring(0, index);
|
||||
storageManager.createOva(parentPath + File.separator + snapDir, name);
|
||||
} else if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType() == DataObjectType.TEMPLATE) {
|
||||
//create template from snapshot on src at first, then copy it to s3
|
||||
TemplateObjectTO cacheTemplate = (TemplateObjectTO)destData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue