cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9182) Some running VMs turned off on manual migration when auto migration failed while host preparing for maintenance
Date Mon, 22 Feb 2016 01:53:18 GMT


ASF GitHub Bot commented on CLOUDSTACK-9182:

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

> Some running VMs turned off on manual migration when auto migration failed while host
preparing for maintenance
> ---------------------------------------------------------------------------------------------------------------
>                 Key: CLOUDSTACK-9182
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server, VMware
>    Affects Versions: 4.5.2
>         Environment: vCenter 5.0
>            Reporter: Suresh Kumar Anaparti
>            Assignee: Suresh Kumar Anaparti
> When a host is put into maintenance, CloudStack schedules migration for all the running
VMs present on the host. This scheduling is managed by High Availability worker thread. And
every time a migration fails, CloudStack re-schedules the migration to be executed after 10
> In this case, CloudStack fails to migrate some VMs automatically while host is preparing
for maintenance and admin tried to migrate them manually. All these VMs are turned off after
manual migration.
> Steps:
> - Put a host into maintenance
> - Scheduled migration failed for a VM and CloudStack re-scheduled it.
> - Before the next scheduled migration, manually migrate the VM to a different host.
> When the next scheduled migration was started by the HA work, it failed because there
was a mismatch between the source host saved in the HA work job and the actual source host.
If VM migration fails due to mismatch then the VM is stopped on the host it resides on.

This message was sent by Atlassian JIRA

View raw message