You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Suresh Kumar Anaparti (JIRA)" <ji...@apache.org> on 2015/12/16 12:44:46 UTC

[jira] [Commented] (CLOUDSTACK-9182) Some running VMs turned off on manual migration when auto migration failed while host preparing for maintenance

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059876#comment-15059876 ] 

Suresh Kumar Anaparti commented on CLOUDSTACK-9182:
---------------------------------------------------

When Maintenance mode is enabled on Host from CloudStack: [Checked with VMware hypervisor]

- Host resource state is changed to 'PrepareForMaintenance' from 'Enabled'.
- All the running VMs (including System VMs) in that Host are scheduled (as HA work) for Migration when a host is available for migration order by instance id. When HA work executes the job of migration, the VM state is changed to Migrating (and then Running after done) and no VM operations are allowed. Cancelling the Maintenance mode will not move back the old running VMs in that Host.
- All the running VMs (including System VMs) in that Host are scheduled (as HA work) for Force Stop when no available hosts for migration order by instance id. When HA work executes the job of stopping VM, the VM state is changed to Stopping (and then Stopped after done) and no VM operations are allowed. Cancelling the Maintenance mode would only start the System VMs.
- Until the HA work job execution starts, no change in VM state i.e. the VM would be in Running state and all the VM operations [Stop, Reboot, Destroy, Migrate to host] are allowed even when the Host is in 'PrepareForMaintenance' state.
- Host resource state is changed to 'ErrorInMaintenance' if any error occurs during the transition to Maintenance. [Failed]
- Host resource state is changed to 'Maintenance' after all the running VMs are migrated. [Successful]

> Some running VMs turned off on manual migration when auto migration failed while host preparing for maintenance
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9182
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9182
>             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
>
> 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 minutes.
> 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
(v6.3.4#6332)