bhouse-nexthop opened a new issue, #14894:
URL: https://github.com/apache/cloudstack/issues/14894

   ### Problem
   
   When a host goes into maintenance and one of its VMs can't be moved off it, 
CloudStack stops that VM. Maintenance still succeeds. Nothing in events or 
alerts says the VM was stopped, so the owner usually finds out because their 
workload went down.
   
   | Case | What happens | Event / alert today |
   |---|---|---|
   | No other Up host in the cluster, migration not allowed, or vGPU offering | 
HA `ForceStop` work stops the VM | none |
   | VM on local storage with 
`host.maintenance.local.storage.strategy=ForceStop` | HA `ForceStop` work stops 
the VM | none |
   | Migration to the chosen host fails | `orchestrateMigrateAway` force-stops 
the VM | only a generic `VM.MIGRATE` error ("Unexpected exception ... 
migration"), no `VM.STOP` |
   
   User and out-of-band stops do record a `VM.STOP` event, so this is a gap 
only for stops caused by maintenance.
   
   ### Steps to reproduce
   
   1. Run a VM on a KVM host that is the only Up host in its cluster (or put 
the VM on local storage with the `ForceStop` strategy).
   2. `prepareHostForMaintenance` on that host.
   3. The host reaches Maintenance and the VM is Stopped. `listEvents` shows no 
`VM.STOP` for the VM, and `listAlerts` shows nothing.
   
   ### Expected
   
   A `VM.STOP` event against the VM's owner saying host maintenance stopped it, 
plus an alert.
   
   ### Versions
   
   4.22 (also main). KVM.
   
   Related: #13189 stops `orchestrateMigrateAway` from force-stopping a VM when 
its migration fails, and retries the migration instead. With that change only 
the first two rows above can still stop a VM.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to