cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pedro-martins <>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-9182: Some running VMs turned ...
Date Mon, 22 Feb 2016 01:52:23 GMT
Github user pedro-martins commented on a diff in the pull request:
    --- Diff: engine/orchestration/src/com/cloud/vm/ ---
    @@ -1472,6 +1473,12 @@ private void advanceStop(final VMInstanceVO vm, final boolean cleanUpEvenIfUnabl
                     _workDao.update(work.getId(), work);
    +        } else {
    +            HostVO host = _hostDao.findById(hostId);
    +            if (!cleanUpEvenIfUnableToStop && vm.getState() == State.Running
&& host.getResourceState() == ResourceState.PrepareForMaintenance) {
    +                s_logger.debug("Host in PrepareForMaintenance state - Failed to stop
VM with id: " + vm.getId());
    --- End diff --
    hello @sureshanaparti.
    How about you extract the content in the 'if' at line 1478 to an "isHostPreparingForMaintenance"
method or something like that? it will explain better the if content, and you can do a test
case to this method too

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

View raw message