Skip to content

prometheus-slurm-exporter: mount Slurm client tools onto the container PATH - #1395

Open
100milliongold wants to merge 1 commit into
NVIDIA:masterfrom
xiilab:fix/slurm-exporter-mount-into-container-path
Open

prometheus-slurm-exporter: mount Slurm client tools onto the container PATH#1395
100milliongold wants to merge 1 commit into
NVIDIA:masterfrom
xiilab:fix/slurm-exporter-mount-into-container-path

Conversation

@100milliongold

Copy link
Copy Markdown
Contributor

Problem

roles/prometheus-slurm-exporter/templates/docker.slurm-exporter.service.j2 mounts the Slurm client tools into the container at the host path:

-v {{ slurm_install_prefix }}/bin/sinfo:{{ slurm_install_prefix }}/bin/sinfo

The exporter invokes them by name, so the destination must be on the container's PATH. With the default slurm_install_prefix the destination is /usr/local/bin, which already is; with a custom prefix it is not, and every scrape run dies:

exec: "sinfo": executable file not found in $PATH

Restart=always means systemctl status keeps reporting active and the play completes normally. The only visible symptoms are an empty Grafana dashboard and, in Prometheus, Get "http://<node>:8080/metrics": EOF. On our node the unit had restarted 3289 times before anyone noticed.

Reproduced on DGX B300 / DGX OS 7.5.0 with slurm_install_prefix: /raid/slurm/usr/local.

Fix

Pin the three destination paths to /usr/local/bin. Behaviour with the default prefix is unchanged, since that is where they already landed.

The library mount is deliberately left as-is: shared objects are resolved by path, not by PATH.

Verification

After changing the destinations on the affected node:

$ systemctl status docker.slurm-exporter.service | grep Active
     Active: active (running) since ...; 20s ago      # previously restarting every ~15s

$ curl -s localhost:8080/metrics | grep -c "^slurm"
34

$ curl -s localhost:9090/api/v1/targets | grep -o '"health":"[a-z]*"' | sort | uniq -c
      4 "health":"up"

The Grafana SLURM dashboard populates as expected.

…r PATH

The unit mounts sdiag, sinfo and squeue at the host's slurm_install_prefix
inside the container as well. The exporter invokes them by name, and a
custom prefix is not on the container's PATH, so every scrape run fails:

  exec: "sinfo": executable file not found in $PATH

With the default prefix the destination happens to be /usr/local/bin,
which is already on PATH, so the bug only appears when the operator sets
slurm_install_prefix. Restart=always keeps the unit reported as active,
so nothing in the play fails; only Prometheus shows it, as an EOF on the
scrape.

Pin the destination paths to /usr/local/bin. The library mount is left
alone: shared objects are resolved by path, not by PATH.

Observed on DGX B300, DGX OS 7.5.0, slurm_install_prefix=/raid/slurm/usr/local.

Signed-off-by: Jea-Eok-Kim <je.kim@xiilab.com>
@100milliongold
100milliongold marked this pull request as ready for review September 4, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants