fix: build the Slurm exporter image locally with a current base#1365
Conversation
cdb1932 to
c8b9177
Compare
The role pulled deepops/prometheus-slurm-exporter:latest, a 2020-era image whose glibc is older than the Slurm client binaries bind-mounted from modern hosts, so sinfo/squeue/sdiag failed inside the container and the service crash-looped. The tag was also unpinned and the image had no in-repo build path. Build the image locally from a bundled Dockerfile instead: the vpenso prometheus-slurm-exporter 0.20 binary (matching the metric names used by the shipped Grafana dashboard) on an Ubuntu 24.04 base with the system libraries the mounted Slurm binaries link. The image tag is pinned, no registry pull is required, and sites can still supply their own image with slurm_exporter_build_image: false. Mount the full Slurm install lib directory so libslurm resolves alongside the plugin dir. Fixes #1328
c8b9177 to
59fa7a0
Compare
Live validation summaryValidated on a disposable dual-GPU server (Ubuntu 22.04) with a fresh Slurm 26.05.1 deployment; the exporter role was applied from this branch. Live validation surfaced three real defects that are all addressed in the final head — each was reproduced, fixed, and re-verified on the node:
Final state on the node: image |
|
The upstream exporter bug patched at image build here (node collector panic from |
Summary
deepops/prometheus-slurm-exporter:latest— a 2020-era external image with a single unpinned tag and no in-repo build path. Its old glibc is incompatible with the Slurm client binaries bind-mounted from modern hosts, so the service crash-loops on current deployments (The Docker image 'deepops/prometheus-slurm-exporter' is based on too old version of Ubuntu. #1328, Errors in deepops/slurm-exporter #1307).prometheus-slurm-exporter0.20 (same metric names as the shipped Grafana dashboard) on an Ubuntu 24.04 base with the system libraries the mounted Slurm binaries require. The tag is pinned; no registry access is needed.slurm_exporter_build_image: falseand aslurm_exporter_containeroverride (the unit then retains the pull step).libdirectory (superset of the previouslib/slurmplugin mount) solibslurmresolves alongside the plugins, and mountsshare, which the exporter's fair-share collector executes but the unit never provided.slurmsystem user in the image (the mounted Slurm clients refuse to parseslurm.confwithout it) and patch an upstream exporter bug at build time: the node collector'ssinfo -Ocall uses default field widths, so node names of 20+ characters merge into the next column and panic the exporter on every scrape (present through upstream master; patch is a candidate for upstream contribution).Validation
ansible-playbook --syntax-check playbooks/slurm-cluster.yml./metricsservesslurm_*series.Notes