brhellman opened a new issue, #14960: URL: https://github.com/apache/cloudstack/issues/14960
### Problem KVM with Linstor primary storage and HA-enabled instances. When a host is cut off from the network (it keeps running), CloudStack declares it Down and VM-HA restarts its instances on other hosts — but nothing stops the copies still running on the isolated host. When the host's network comes back: - the same instance runs on **two hosts**; - both agents report it Running in their VM state reports, and the management server switches the instance's `host_id`/`power_host` between the two hosts **every minute** (`VM state report is updated. Host 2 … / Host 3 …`), so the UI shows either host — a Stop or Migrate can act on the stale copy; - the stale copy is never stopped. The data is protected by LINSTOR/DRBD quorum: the isolated copy lost quorum on its disk and got I/O errors (`on-no-quorum io-error`), so the two copies never wrote to the same data. But the duplicate stays until an operator destroys it by hand, and the isolated host's DRBD replicas stay StandAlone (the stale copy keeps the device open: `I shall become SyncTarget, but I am primary!`), i.e. without redundancy. Reproduced 2 of 2 (on two different clusters). It hit the secondary storage VM as well (it ran on the isolated host). ### Steps to reproduce 1. 3 KVM hosts, Linstor primary storage (resource group with 2 replicas), Basic zone; an instance with an HA-enabled service offering on host3 (not the host running the management server). 2. Set every network link of host3 down for 8 minutes (we use `virsh domif-setlink <host3> <iface> down` on the hypervisor; the host stays powered on). 3. After ~3–4 min CloudStack declares host3 Down (`KVMHostActivityChecker`: neighbours report it down); after ~5½ min VM-HA starts the instance on another host. 4. Bring the links back. host3 reconnects; `virsh list` on host3 still shows the instance; `select host_id, power_host from cloud.vm_instance` alternates between the two hosts; after 10+ minutes the stale copy is still running. ### Expected When a host reconnects and reports an instance that CloudStack has meanwhile started on another host, CloudStack should stop the stale copy on the reconnected host (and not move the instance's host record to it). ### Context As far as we can see, with Linstor primary storage there is no storage-heartbeat self-fencing of an isolated host (#13089 discusses the heartbeat scripts with LINSTOR; in our tests no isolated host fenced itself during an 8-minute partition) and no out-of-band fencing without OOBM, so VM-HA restarts instances while the old copies may still run. Related: #14230 (storage-aware HA), #14206 and #14232 (instances left running in other situations). ### Versions CloudStack 4.23.0.0 (KVM, AlmaLinux 10.3), LINSTOR 1.35.3, DRBD 9.3.5, `quorum majority`, `on-no-quorum io-error`. ### Workaround we document Find the stale copy (its DRBD resource is Primary with `quorum:no`), wait until the database records the instance on the other host, `virsh destroy` it on the isolated host, then `drbdadm secondary <res>; drbdadm connect --discard-my-data <res>` there and `drbdadm connect <res>:<isolated host>` on the peers. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
