Skip to content

Fix Slurm nodes draining on DCGM deadline expiration - #6230

Draft
simrankaurb wants to merge 1 commit into
GoogleCloudPlatform:developfrom
simrankaurb:fix-dcgm-drain
Draft

Fix Slurm nodes draining on DCGM deadline expiration#6230
simrankaurb wants to merge 1 commit into
GoogleCloudPlatform:developfrom
simrankaurb:fix-dcgm-drain

Conversation

@simrankaurb

Copy link
Copy Markdown
Contributor

Abrupt termination of containerized DCGM jobs can leave nv-hostengine unresponsive, causing the Slurm Epilog script (gpu-test) to hang and fail, leading to nodes being drained.

This change adds a responsiveness check for nv-hostengine using dcgmi. If it is unresponsive, we attempt to restart the nvidia-dcgm service (or manually restart nv-hostengine if not managed by systemd) before running diagnostics.

TAG=agy

CONV=6a10bd40-c7ab-4d60-a8b0-4e7fe4cb3f69

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where abrupt termination of containerized DCGM jobs leaves the nv-hostengine in an unresponsive state, causing the Slurm Epilog script to hang and trigger unnecessary node draining. By introducing a robust responsiveness check and automated recovery mechanism, the script now ensures the engine is operational before executing diagnostics, significantly improving system stability and reducing false-positive node failures.

Highlights

  • nv-hostengine Health Check: Added a proactive responsiveness check for the nv-hostengine using dcgmi to ensure the service is operational before proceeding with diagnostics.
  • Automated Recovery Logic: Implemented recovery procedures that attempt to restart the nvidia-dcgm service or manually restart the nv-hostengine process if it is found to be unresponsive.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds responsiveness checks for nv-hostengine in the gpu-test script, attempting to restart the nvidia-dcgm service or kill the process if it is unresponsive. The review feedback highlights a critical issue where systemctl restart nvidia-dcgm might hang for up to 90 seconds waiting for a graceful stop of an unresponsive nv-hostengine process, potentially causing Slurm to drain the node due to an Epilog timeout. A code suggestion was provided to forcefully kill nv-hostengine with pkill -9 before restarting the service to avoid this delay.

Abrupt termination of containerized DCGM jobs can leave nv-hostengine unresponsive, causing the Slurm Epilog script (gpu-test) to hang and fail, leading to nodes being drained.

This change adds a responsiveness check for nv-hostengine using dcgmi. If it is unresponsive, we attempt to restart the nvidia-dcgm service (or manually restart nv-hostengine if not managed by systemd) before running diagnostics.

We forcefully kill the hung nv-hostengine process before restarting the service to prevent systemd from waiting for the graceful stop timeout (typically 90s), which would cause Slurm Epilog to timeout and drain the node.

TAG=agy

CONV=6a10bd40-c7ab-4d60-a8b0-4e7fe4cb3f69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant