KVM Host HA activity check incorrectly detects activity on CLVM_NG storage after host failure
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java, linux
- Ambito
- infrastructure
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 7g 5h
- PR unite (30g)
- 28
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/cloudstack
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Apertabug component:kubernetes
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
apache/cloudstack#14070 · 5 commenti ·
-
component:backup
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Apertabug component:ceph
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#13989 · 3 commenti ·
-
component:UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/cloudstack#13944 · 3 commenti ·
Tutte le issue di apache/cloudstack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
infinispan/infinispan#18150 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100