Skip to content

integrate cluster health check into toolkit. - #5917

Merged
mufaqam-gcl merged 6 commits into
GoogleCloudPlatform:developfrom
leiyiz:develop
Jul 10, 2026
Merged

integrate cluster health check into toolkit.#5917
mufaqam-gcl merged 6 commits into
GoogleCloudPlatform:developfrom
leiyiz:develop

Conversation

@leiyiz

@leiyiz leiyiz commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

passive cluster healthcheck daemon

@leiyiz
leiyiz requested a review from a team as a code owner July 7, 2026 22:33
@github-actions github-actions Bot added the external PR from external contributor label Jul 7, 2026
@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 introduces a passive health checking solution for NVIDIA GPUs in GKE clusters. By deploying a DaemonSet, the toolkit can now monitor GPU health, report failures via Kubernetes Node conditions and labels, and allow for configurable severity escalation for specific XID errors, enhancing cluster reliability and observability.

Highlights

  • Cluster Health Check Daemon: Introduced a new passive cluster health check daemon that monitors NVIDIA GPUs for hardware and network issues and updates Kubernetes Node objects with severity labels.
  • Containerization: Added a multi-stage Dockerfile to build the health check tool, including support for NVIDIA DCGM dependencies and distroless base images.
  • Kubernetes Integration: Provided deployment manifests (DaemonSet and ConfigMap) to enable automated GPU health monitoring and configurable XID error escalation.
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 introduces a new cluster-health-check community module, which deploys a Go-based agent as a Kubernetes DaemonSet to passively monitor NVIDIA GPUs on GKE. Feedback on the implementation highlights several critical and high-severity issues: a bug in the DaemonSet's LD_LIBRARY_PATH overrides necessary container library paths; shell redirection is incorrectly passed as a literal argument to execCommandContext; and hardcoded thresholds in the PCIe link width and NIC heartbeat checks present high false-positive risks on idle or non-RDMA nodes. Additionally, the agent should utilize the synced informer cache instead of making direct Kubernetes API calls, propagate context to all command executions, and register the new module in the main index in modules/README.md as required by the style guide.

Comment thread community/cluster-health-check/deployment/dcgm-healthcheck.yaml
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/README.md
@leiyiz
leiyiz force-pushed the develop branch 2 times, most recently from 3d9393c to d5e7fd4 Compare July 8, 2026 16:06
@mufaqam-gcl mufaqam-gcl added the enhancement New feature or request label Jul 9, 2026
@mufaqam-gcl
mufaqam-gcl requested a review from bytetwin July 9, 2026 15:51
@leiyiz
leiyiz force-pushed the develop branch 2 times, most recently from 34fc3a1 to 03e92b4 Compare July 9, 2026 19:16
- main.go: signal.NotifyContext for cooperative SIGTERM handling; watchdog
  goroutine checks ctx before Fatalf on nv-hostengine exit; waitForHostEngine
  polling loop replaces blind 5s sleep; dcgmi setup gets a timeout;
  dmesg calls use CommandContext; JSON patches built via json.Marshal on
  typed structs so control bytes in dmesg/dcgmi output can't corrupt the
  patch body; extractOverflowMessages sorts map keys for deterministic
  output; clearNodeHealth only patches the parts that actually need
  clearing (fixes per-tick PATCH storm on healthy nodes); passive severity
  and message now merge into an active-test-failed condition instead of
  being dropped; lastTransitionTime preserved when Status stays True;
  nvidia-smi failures now surface as Warning; 9 copy-paste check blocks
  refactored into a table-driven loop.
- Dockerfile: switch base to public golang:1.25.10.
- build-and-push script: run 'go mod vendor' before docker buildx; use
  absolute SCRIPT_DIR; drop dead ROOT_DIR.
- daemonset.yaml: drop unused configmaps verbs from ClusterRole; comment
  out -check-interval=15s so the default 5m kicks in.
Comment thread community/cluster-health-check/Dockerfile Outdated
Comment thread community/cluster-health-check/deployment/dcgm-healthcheck.yaml
Comment thread community/cluster-health-check/deployment/daemonset.yaml Outdated
Comment thread community/cluster-health-check/deployment/dcgm-healthcheck.yaml
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go Outdated
Comment thread community/cluster-health-check/cmd/dcgm-healthcheck/main.go
Comment thread community/cluster-health-check/Dockerfile Outdated
mufaqam-gcl
mufaqam-gcl previously approved these changes Jul 10, 2026
@leiyiz
leiyiz requested a review from bytetwin July 10, 2026 16:16
simrankaurb
simrankaurb previously approved these changes Jul 10, 2026
@mufaqam-gcl
mufaqam-gcl enabled auto-merge (squash) July 10, 2026 16:21
bytetwin
bytetwin previously approved these changes Jul 10, 2026
@mufaqam-gcl

Copy link
Copy Markdown
Contributor

/gcbrun

Comment thread community/cluster-health-check/README.md
auto-merge was automatically disabled July 10, 2026 17:13

Head branch was pushed to by a user without write access

mufaqam-gcl
mufaqam-gcl previously approved these changes Jul 10, 2026
simrankaurb
simrankaurb previously approved these changes Jul 10, 2026
@mufaqam-gcl

Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94 Neelabh94 added the release-key-new-features Added to release notes under the "Key New Features" heading. label Jul 10, 2026
@Neelabh94
Neelabh94 dismissed stale reviews from simrankaurb and mufaqam-gcl via af70768 July 10, 2026 19:08
@Neelabh94

Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94

Copy link
Copy Markdown
Contributor

/gcbrun

@mufaqam-gcl
mufaqam-gcl merged commit 7d83193 into GoogleCloudPlatform:develop Jul 10, 2026
13 of 86 checks passed
ep-nag pushed a commit to nagconsulting/cluster-toolkit that referenced this pull request Aug 7, 2026
Co-authored-by: Neelabh94 <neelgoyal@google.com>
ep-nag pushed a commit to nagconsulting/cluster-toolkit that referenced this pull request Aug 7, 2026
ep-nag pushed a commit to nagconsulting/cluster-toolkit that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request external PR from external contributor release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants