Skip to content

Maintenance mode caused stopped vms #11286

@BartJM

Description

@BartJM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions