Rolling maintenance fails with ErrorInMaintenance because the cluster it disables is excluded as VM migration destination
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- backend, infrastructure
Direção de pesquisa
Start with RollingMaintenanceManagerImpl.disableClusterIfEnabled() and startRollingMaintenanceHostInCluster(), then trace how DeploymentPlanningManagerImpl filters disabled clusters for VmWorkMigrateAway. Reproduce in a two-host, single-cluster zone with migrate.vm.across.clusters=false and inspect migration tests around rolling maintenance and destination selection. Done means VMs can evacuate to the remaining host, maintenance completes, and an aborted run does not leave the cluster disabled.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
problem
startRollingMaintenance disables the cluster itself (RollingMaintenanceManagerImpl.disableClusterIfEnabled() sets the allocation state to Disabled) before putting hosts into maintenance. The VMs on the host then cannot be migrated to the other host in the same cluster, because the deployment planner excludes Disabled clusters. The host ends up in ErrorInMaintenance after the maintenance timeout, and the cluster is left in Disabled state.
Management server log:
DEBUG [c.c.d.DeploymentPlanningManagerImpl] Adding clusters [1] of pod [1] to the void set because these clusters are in the Disabled state.
WARN [c.c.d.DeploymentPlanningManagerImpl] VM last host ID: 2 belongs to zone ID: 1 for which config - migrate.vm.across.clusters is false and storage migration would be needed for inter-cluster migration, therefore, adding all other clusters except ID: 1 from this zone to avoid list
WARN [c.c.v.ClusteredVirtualMachineManagerImpl] Unable to find destination for migrating the vm VM instance {"id":786,"instanceName":"i-2-786-VM","type":"User",...}
ERROR [c.c.v.VmWorkJobDispatcher] Unable to complete AsyncJob {"cmd":"com.cloud.vm.VmWorkMigrateAway",...}
InsufficientServerCapacityException: Unable to find a server to migrate to.Scope=interface com.cloud.dc.DataCenter; id=1
...
ERROR [c.c.r.RollingMaintenanceManagerImpl] Timeout: waited 1800000ms for host <uuid>(<host>) to be in Maintenance state, but after timeout it is in ErrorInMaintenance
at RollingMaintenanceManagerImpl.waitForHostInMaintenance(RollingMaintenanceManagerImpl.java:775)
at RollingMaintenanceManagerImpl.putHostIntoMaintenance(RollingMaintenanceManagerImpl.java:411)
at RollingMaintenanceManagerImpl.startRollingMaintenanceHostInCluster(RollingMaintenanceManagerImpl.java:327)
at RollingMaintenanceManagerImpl.startRollingMaintenance(RollingMaintenanceManagerImpl.java:210)
The same migrate-away failure occurs for the system VMs, the virtual router and the user VMs on the host.
Root cause (from code and logs):
startRollingMaintenancecallsdisableClusterIfEnabled()beforestartRollingMaintenanceHostInCluster().DeploymentPlanningManagerImplvoids Disabled clusters, so withmigrate.vm.across.clusters=false(or a single-cluster zone) no destination is left.attemptMaintain()then finds running VMs and no pending migration retries, and callssetHostIntoErrorInMaintenance().
versions
- CloudStack: main branch (4.22.1.0-SNAPSHOT)
- Hypervisor: KVM (Ubuntu 26.04)
- Zone with a single cluster of 2 hosts,
migrate.vm.across.clusters=false
The steps to reproduce the bug
- Have an Enabled cluster with 2 KVM hosts, with system VMs, a VR and user VMs running on the second host.
- Run
startRollingMaintenanceon the cluster (cmk:start rollingmaintenance clusterids=<cluster id>). - Wait for the first host to enter maintenance.
What to do about it?
Expected: VMs are migrated to the other host, the host reaches Maintenance, rolling maintenance continues, and the cluster is re-enabled at the end.
Actual: the host goes to ErrorInMaintenance after the timeout and the cluster stays Disabled.
Possible fixes:
- Allow migrations triggered by host maintenance (
VmWorkMigrateAway) to target hosts in a cluster disabled by rolling maintenance, or do not use theDisabledallocation state to block new deployments. - Always re-enable the clusters that rolling maintenance disabled when it aborts.
- Fail fast instead of waiting for the full timeout when all migrations have failed.
- Linguagem predominante
- Java
- Estrelas
- 3.1k
- Forks
- 1.4k
- Merge médio
- 7d 16h
- PRs com merge (30d)
- 15
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeTalvez já em andamento @bhouse-nexthop assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
apache/cloudstack#14645 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedTalvez já em andamento @bhouse-nexthop assumiu há 4 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/cloudstack#14633 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Talvez já em andamento @bhouse-nexthop assumiu há 4 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/cloudstack#14631 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
apache/cloudstack#14625 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Talvez já em andamento @willbennett-devops assumiu há 12 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
apache/cloudstack#14545 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/cloudstack
Issues semelhantes
-
[FEATURE] Expose external refresh, node-level translog and warmer statsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertauntriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 2 dias
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
-
Good First Issue
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
hiero-ledger/hiero-sdk-java#3059 ·
Mantenedores costumam responder em até 1 dia