Github user ustcweizhou commented on the pull request:

    https://github.com/apache/cloudstack/pull/1177#issuecomment-162067636
  
    The diff between this PR and last commit (before 4.6)
    ```
    # git diff 2e26e97fe87cfc68a1748d6d5e539cd60cff22b2 
plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
    diff --git 
a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
 b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/
    index 6ec7741..4d222bb 100755
    --- 
a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
    +++ 
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
    @@ -96,18 +96,16 @@ public class Ovm3HypervisorGuru extends 
HypervisorGuruBase implements Hypervisor
                 DataTO srcData = cpyCommand.getSrcTO();
                 DataTO destData = cpyCommand.getDestTO();
    
    -            if (srcData.getObjectType() == DataObjectType.SNAPSHOT && 
destData.getObjectType() == DataObjectType.TEMPLATE) {
    +            if (HypervisorType.Ovm3.equals(srcData.getHypervisorType()) && 
srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType() 
== DataObjectType.TEMPLATE) {
                     LOGGER.debug("Snapshot to Template: " + cmd);
                     DataStoreTO srcStore = srcData.getDataStore();
                     DataStoreTO destStore = destData.getDataStore();
                     if (srcStore instanceof NfsTO && destStore instanceof 
NfsTO) {
                         HostVO host = hostDao.findById(hostId);
                         EndPoint ep = 
endPointSelector.selectHypervisorHost(new ZoneScope(host.getDataCenterId()));
    -                    host = hostDao.findById(ep.getId());
    -                    hostDao.loadDetails(host);
    -                    // String snapshotHotFixVersion = 
host.getDetail(XenserverConfigs.XS620HotFix);
    -                    // if (snapshotHotFixVersion != null && 
snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004)) {
    -                    return new Pair<Boolean, Long>(Boolean.TRUE,  
Long.valueOf(ep.getId()));
    +                    if (ep != null) {
    +                        return new Pair<Boolean, Long>(Boolean.TRUE,  
Long.valueOf(ep.getId()));
    +                    }
                     }
                 }
             }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to