Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1454#discussion_r58952716
  
    --- Diff: server/src/com/cloud/resource/ResourceManagerImpl.java ---
    @@ -2112,11 +2112,13 @@ private boolean doCancelMaintenance(final long 
hostId) {
     
             /* TODO: move to listener */
             _haMgr.cancelScheduledMigrations(host);
    +
    +        boolean vms_migrating = false;
             final List<VMInstanceVO> vms = _haMgr.findTakenMigrationWork();
             for (final VMInstanceVO vm : vms) {
    -            if (vm != null && vm.getHostId() != null && vm.getHostId() == 
hostId) {
    -                s_logger.info("Unable to cancel migration because the vm 
is being migrated: " + vm);
    -                return false;
    +            if (vm.getHostId() != null && vm.getHostId() == hostId) {
    --- End diff --
    
    Is this conditional right?
    `vm.getHostId() != null && vm.getHostId() == hostId`
    
    It is looking a little weird to me.


---
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