Skip to content

slurm: use ssh.service on Debian-family when hiding GPUs from login shells - #1389

Open
100-JM wants to merge 1 commit into
NVIDIA:masterfrom
100-JM:fix/slurm-ssh-unit-name-ubuntu
Open

slurm: use ssh.service on Debian-family when hiding GPUs from login shells#1389
100-JM wants to merge 1 commit into
NVIDIA:masterfrom
100-JM:fix/slurm-ssh-unit-name-ubuntu

Conversation

@100-JM

@100-JM 100-JM commented Sep 3, 2026

Copy link
Copy Markdown

Problem

roles/slurm/tasks/login-compute-setup.yml hardcodes sshd.service in the "Hide GPUs for regular user logins" task. On Debian-family systems the OpenSSH unit is ssh.service, so the task fails:

Failed to set unit properties on sshd.service: Unit sshd.service not found.

The task's creates: argument already branches on ansible_os_family (ssh.service.d for non-RedHat), so only the shell command was out of step.

Reproduced on DGX OS 7.5.0 (Ubuntu-based) with slurm_login_on_compute: true.

Fix

Introduce a single ssh_unit task var and use it in both the shell command and creates:. Behaviour on RedHat-family is unchanged.

Verification

Applied the equivalent systemctl set-property ssh.service DeviceAllow=/dev/nvidiactl on the DGX; a fresh SSH session shows nvidia-smiNo devices were found, as intended.

…hells

The 'Hide GPUs for regular user logins' task hardcodes sshd.service,
which does not exist on Ubuntu (the unit is ssh.service). The creates:
condition already branches on ansible_os_family; make the shell command
follow the same branch via a single ssh_unit variable.

Observed on DGX OS 7.5.0:
  Failed to set unit properties on sshd.service: Unit sshd.service not found.

Signed-off-by: 백지명 <wlaud9805@gmail.com>
@100-JM
100-JM marked this pull request as ready for review September 3, 2026 13:39
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.

1 participant