cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafaelweingartner <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CID-1338387: handle unknown storage endpo...
Date Wed, 11 Nov 2015 16:35:45 GMT
Github user rafaelweingartner commented on the pull request:

    https://github.com/apache/cloudstack/pull/1056#issuecomment-155837263
  
    Well, 
    I would remover the method: “com.cloud.hypervisor.XenServerGuru.getCommandHostDelegation(long,
Command)”, because it is already coded into its super class. However, I would worry about
the following code: 
    ```
    hostDao.loadDetails(host);
    boolean snapshotHotFix = Boolean.parseBoolean(host.getDetail(HostInfo.XS620_SNAPSHOT_HOTFIX));
    if (snapshotHotFix) {
        return new Pair<Boolean, Long>(Boolean.TRUE, new Long(ep.getId()));
    }
    ```
    It is pretty subtle, if the server has that hotfix, we set the first value of the pair
as true.
    
    Therefore, I would change the code from “com.cloud.hypervisor.HypervisorGuruBase.getCommandHostDelegation(long,
Command)”
    To something like this:
    ```
            HostVO host = hostDao.findById(hostId);
            hostDao.loadDetails(host);
            boolean snapshotHotFix = Boolean.parseBoolean(host.getDetail(HostInfo.XS620_SNAPSHOT_HOTFIX));
            if(snapshotHotFix){
                return new Pair<Boolean, Long>(Boolean.TRUE, new Long(hostId));
            }
            return new Pair<Boolean, Long>(Boolean.FALSE, new Long(hostId));
    
    ```
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message