Skip to content

KVM: SharedMountPoint HA heartbeat fails when pool path is a subdirectory of a mounted cluster FS ("Mount point is not a mounted filesystem") #14326

Description

@danivogel90

ISSUE TYPE

Bug Report

COMPONENT NAME

KVM agent / HA (scripts/vm/hypervisor/kvm/kvmsmpheartbeat.sh)

CLOUDSTACK VERSION

4.22.1.0, 4.23.0.0 (introduced by #12773)

CONFIGURATION

KVM, Ubuntu 24.04, SharedMountPoint primary storage on IBM Storage Scale (GPFS).
GPFS is mounted at /data01, the primary storage pool path is /data01/vol01.

SUMMARY

#12773 added HA heartbeats for SharedMountPoint pools. The new script
kvmsmpheartbeat.sh requires the pool path itself to be a mount point:

if ! mountpoint -q "$MountPoint"; then
  echo "Mount point is not a mounted filesystem: $MountPoint" >&2
  exit 1

According to the docs, SharedMountPoint is "a file system path local to each
server". A subdirectory of a clustered filesystem (GPFS, OCFS2, GFS2, CephFS ...)
is a valid and common setup. For such a pool the heartbeat write never succeeds:

WARN [kvm.resource.KVMHAMonitor] Write heartbeat for pool [27454846-...] failed:
Mount point is not a mounted filesystem: /data01/vol01; try: 5 of 5.

IMPACT

STEPS TO REPRODUCE

  1. Mount a shared FS at /data01. Create a SharedMountPoint pool with path /data01/vol01.
  2. Upgrade or install the agent to >= 4.22.1.
  3. Agent log shows the warning above every minute; KVMHA/ is never created.

EXPECTED RESULTS

The heartbeat is written to /data01/vol01/KVMHA/hb-<ip>.

SUGGESTED FIX

⚠️ Incomplete – do not apply alone. See the comment below and PR #14331.

Keep the safety intent (do not write the heartbeat to the local root FS when the shared
FS is not mounted). Check the filesystem containing the path instead of requiring the
path itself to be a mount point:

if command -v findmnt >/dev/null 2>&1; then
  mnt_target=$(findmnt -n -o TARGET -T "$MountPoint" 2>/dev/null)
  if [ -z "$mnt_target" ] || [ "$mnt_target" = "/" ]; then
    echo "Mount point is not on a mounted (shared) filesystem: $MountPoint" >&2
    exit 1
  fi
fi

Workaround for now: bind-mount the directory onto itself (mount --bind /data01/vol01 /data01/vol01).

Related: #12773 (SMP heartbeat), #13090 (configurable fence action), #10111 (reboot on heartbeat timeout disabled by default).
Broader context: see enhancement issue #14327 (first-class support for parallel/clustered filesystems).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions