GitHub user BartJM created a discussion: Maintenance mode caused stopped vms
### problem We had a vm that was migrated from host A to host B after putting host A into maintenance mode. The first attempt at maintenance mode had a Errorinmaintenance so maintenance was canceled and started again. After maintenance was done and maintenance mode canceled on host A, host B was set in maintenance. This caused the vm to be migrated to host A again. Right after the migration to host A was finished Cloudstack attempted to migrate the vm to host B for maintenance. But due to host B being in maintenance the `com.cloud.agent.api.PrepareForMigrationCommand` failed with `com.cloud.exception.AgentUnavailableException`. This caused Cloudstack to stop the vm. The time between maintenance cancel on Host A and the migrations of the vm was around 2 hours. ### versions Cloudstack 4.19.3 ### The steps to reproduce the bug Currently trying to reproduce on our testing environment but the steps would be 1. Host A: Put in maintenance 2. Host A: Cancel maintenance 3. Host A: Put in maintenance 4. Host A: Wait for host to be in maintenance 5. Host A: Cancel maintenance 6. Host B: Put in maintenance ### What to do about it? We do not expect Cloudstack to stop the vm due to a failed prepare for migration. GitHub link: https://github.com/apache/cloudstack/discussions/12370 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
