Skip to content

nvidia-gpu-tests: optionally fail the play on a failed DCGM diagnostic - #1436

Merged
dholt merged 2 commits into
NVIDIA:masterfrom
saqibkh:gpu-tests-fail-on-dcgm-error
Oct 27, 2026
Merged

dholt merged 2 commits into
NVIDIA:masterfrom
saqibkh:gpu-tests-fail-on-dcgm-error

Conversation

@saqibkh

@saqibkh saqibkh commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

As suggested in #1434. Every test in roles/nvidia-gpu-tests runs with ignore_errors, so a failing GPU never fails the play. This adds gpu_test_dcgm_fail_on_error, off by default. When it is set, a non-zero exit from dcgmi diag fails the play. The default behaviour doesn't change, and the other tests keep ignore_errors. The README line for the DCGM step mentions the option.

I tested it with ansible-core 2.21, running the role's DCGM task with a stub dcgmi on the PATH: with the option off a failing diagnostic is ignored and the play continues; with it on and a passing diagnostic the play continues; with it on and a failing one (the stub exits 226) the play fails. ansible-lint --offline roles/nvidia-gpu-tests passes.

Signed off with git commit -s.

saqibkh and others added 2 commits October 23, 2026 16:26
Every test in the role runs with ignore_errors, so a failing GPU never
fails the play. Add gpu_test_dcgm_fail_on_error (off by default); when
set, a non-zero exit from dcgmi diag fails the play.

Signed-off-by: Saqib Khan <11544614+saqibkh@users.noreply.github.com>
Honor string false/no values supplied through Ansible extra vars.
Exercise the actual diagnostic task with a local stub across default,
boolean and string settings, with successful and failing diagnostics.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Signed-off-by: Doug Holt <dholt@nvidia.com>

@dholt dholt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the opt-in diagnostic failure handling and the follow-up boolean normalization. The default still ignores diagnostic failures; explicit true values fail the play on a non-zero diagnostic exit, while CLI string false/no values preserve the default behavior.

The 14-case local regression passes on Ansible 2.17 and 2.19. Independent verification of the final head passed, including explicit lint of the affected role. Role lint, playbook syntax checks, and all current-head GitHub checks pass. The original contributor commit is preserved.

@dholt
dholt merged commit 78ed70d into NVIDIA:master Oct 27, 2026
28 checks passed
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