KVM Host HA activity check incorrectly detects activity on CLVM_NG storage after host failure
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java, linux
- Área
- infrastructure
Línea de trabajo
Start at the KVMHAProvider activity-check implementation and compare the CLVM_NG path with the NFS activity-check path. Reproduce the powered-off-host scenario using the listed HA settings and logs; done means CLVM_NG reports no VM activity and Host HA proceeds to fencing while preserving VM restart behavior after fencing.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
problem
During Host HA testing on a KVM cluster using CLVM_NG Primary Storage, we observed that the VM activity check performed against CLVM_NG may incorrectly report activity for a host that has been completely powered off.
When the failed host only runs HA-enabled VMs whose volumes reside on CLVM_NG, CloudStack continues reporting that the host has VM activity. As a result, Host HA may enter Degraded and repeat the activity-check cycle instead of progressing to fencing.
The other KVM hosts correctly detect that the failed host is unreachable.
As a comparison, when the same failed host also runs an HA-enabled VM whose volume resides on NFS Primary Storage, CloudStack checks both storage types and we observe:
CLVM_NG activity check -> host has activity
NFS activity check -> host does not have activity
In this case, Host HA is able to progress to fencing.
Once the host reaches Fenced, the HA-enabled VMs stored on CLVM_NG are successfully restarted on other KVM hosts.
This indicates that CLVM_NG itself works correctly as shared storage for VM HA once fencing has occurred. The problem appears to be specifically related to the Host HA VM activity detection performed against CLVM_NG storage.
As a workaround, we currently use a small shared NFS Primary Storage with one small HA-enabled NFS-backed VM per KVM host. These VMs belong to a host anti-affinity group so that one VM is normally present on each host.
With this workaround, Host HA correctly detects the absence of activity through NFS, reaches fencing, and the CLVM_NG-backed HA VMs are successfully restarted on the remaining hosts.
versions
Apache CloudStack: 4.23.0.0
Hypervisor: KVM
Operating System: Ubuntu 24.04
Cluster: 4 KVM hosts
Primary Storage:
- CLVM_NG backed by shared Fibre Channel SAN
- sanlock + lvmlockd
- Additional shared NFS Primary Storage
Host HA provider: KVMHAProvider
OOBM: IPMI
VM HA: enabled on the test VMs
Host HA activity-check configuration:
kvm.ha.activity.check.failure.ratio = 0.7
kvm.ha.activity.check.interval = 60
kvm.ha.activity.check.max.attempts = 10
kvm.ha.activity.check.timeout = 60
kvm.ha.degraded.max.period = 300
The activity-check parameters above use their default values.
The following parameter is changed from its default value:
kvm.ha.recover.failure.threshold = 0
The default value is 1.
We use 0 to skip host recovery attempts and proceed to fencing once Host HA determines that the host must be recovered.
The steps to reproduce the bug
-
Create a KVM cluster with multiple hosts.
-
Configure Host HA using KVMHAProvider and configure OOBM/IPMI for the KVM hosts.
-
Configure shared CLVM_NG Primary Storage backed by Fibre Channel SAN using sanlock and lvmlockd.
-
Deploy one or more HA-enabled VMs with their volumes on CLVM_NG.
-
Ensure that the test host only runs HA-enabled VMs whose volumes reside on CLVM_NG.
-
Completely power off the KVM host to simulate an unexpected host failure.
-
Monitor the Host HA activity checks in the CloudStack Management Server log.
-
CloudStack detects that the host is unreachable, but the CLVM_NG VM activity check reports that the host still has activity.
-
Host HA may enter Degraded and repeat the activity-check process instead of progressing to fencing.
-
Power the host back on and deploy an additional HA-enabled VM whose volume resides on shared NFS Primary Storage.
-
Repeat the hard power-off test.
-
CloudStack now performs activity checks against both CLVM_NG and NFS. The observed result is:
CLVM_NG -> host has activity
NFS -> host does not have activity
-
Host HA is now able to progress from Checking to Recovering, Fencing and finally Fenced.
-
After fencing, the HA-enabled VMs stored on CLVM_NG are successfully restarted on the remaining KVM hosts.
-
When the failed host becomes available again, CloudStack also automatically starts the pending NFS-backed auxiliary VM on that host because the host anti-affinity constraint can be satisfied again.
CLVM_NG-backed VMs can also be live migrated normally between healthy hosts. Therefore, the problem does not appear to be related to CLVM_NG volume activation, locking, or general access to the shared storage.
What to do about it?
The Host HA VM activity-check mechanism should correctly determine that a completely powered-off KVM host no longer has VM activity when the affected VM volumes reside on CLVM_NG.
Expected behavior:
Host powered off
|
v
CLVM_NG activity check
|
v
No VM activity
|
v
Fencing
|
v
Fenced
|
v
VM HA
The CLVM_NG activity-check implementation should be reviewed to determine why it reports activity for a host that has been completely powered off.
The issue appears to be limited to activity detection. Once fencing is reached, CloudStack successfully restarts the CLVM_NG-backed HA VMs on other hosts.
For comparison, an NFS-backed VM on the same failed host correctly reports no activity and allows Host HA to proceed to fencing.
It may therefore be useful to compare how VM activity is determined for CLVM_NG storage with the NFS activity-check path.
Management Server and KVM agent logs from both scenarios can be provided if required.
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.4k
- Merge medio
- 6 d 20 h
- PR fusionados (30 d)
- 27
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/cloudstack
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/cloudstack#14222 ·
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Abiertobug component:kubernetes
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14070 · 5 comentarios ·
-
component:backup
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Abiertobug component:ceph
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/cloudstack#13989 · 3 comentarios ·
Todos los issues de apache/cloudstack
Issues similares
-
bug untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
emitter:client:csharp feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Abiertobug frontend maui-pilot
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100