Skip device plugin alert when devicePlugin is disabled in ClusterPolicy#2238
Draft
harche wants to merge 1 commit intoNVIDIA:mainfrom
Draft
Skip device plugin alert when devicePlugin is disabled in ClusterPolicy#2238harche wants to merge 1 commit intoNVIDIA:mainfrom
harche wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
When devicePlugin.enabled is set to false in the ClusterPolicy, the nvidia-node-status-exporter still monitors the device_plugin_devices_total metric which reports 0 (since no device plugin pods are running). This triggers a false positive GPUOperatorNodeDeploymentFailed alert. Fix: The operator now injects a DEVICE_PLUGIN_ENABLED env var into the node-status-exporter daemonset based on the ClusterPolicy. When set to "false", the exporter skips device plugin validation entirely, so the metric is never emitted and the alert does not fire. Fixes: NVIDIA#2237 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
Initial code review looks good and unit tests pass. Keeping this as a draft, hardware testing with MIG-capable GPUs and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
devicePlugin.enabledis set tofalsein the ClusterPolicy, thenvidia-node-status-exporterstill monitorsgpu_operator_node_device_plugin_devices_total, which reports0(since no device plugin pods are running). This triggers a false positiveGPUOperatorNodeDeploymentFailedalert after 30 minutes.This is a valid configuration — for example, when GPU allocation is managed externally via MIG partitioning through a third-party operator.
Changes
controllers/object_controls.go: The operator now injects aDEVICE_PLUGIN_ENABLEDenv var into the node-status-exporter daemonset based onconfig.DevicePlugin.IsEnabled().cmd/nvidia-validator/metrics.go: WhenDEVICE_PLUGIN_ENABLED=false, the exporter skips device plugin validation and sets the gauge to-1(documented sentinel value), preventing the== 0alert from firing.assets/state-node-status-exporter/0800_prometheus_rule_openshift.yaml: Updated comment to document the behavior.controllers/transforms_test.go: Unit tests for env var injection (enabled + disabled).tests/e2e/helpers/clusterpolicy.go:EnableDevicePlugin/DisableDevicePluginhelpers.tests/e2e/suites/clusterpolicy_test.go: E2E tests verifying env var propagation to node-status-exporter daemonset.Test plan
TestTransformNodeStatusExporter)go build ./cmd/nvidia-validator/andgo build ./controllers/)go build ./tests/e2e/...)devicePlugin.enabled: falseFixes: #2237