Repository navigation
Conversation
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments: 1
deployments/gpu-operator/values.yaml: 1
244-245: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRender
hostSubscriptionin the NVIDIADriver template.When
driver.nvidiaDriverCRD.enabledistrue,templates/clusterpolicy.yamlskips the driver block that rendersdriver.hostSubscription. The defaulttemplates/nvidiadriver.yamlrendersrepoConfigbut does not renderdriver.hostSubscription, sodriver.hostSubscription.enabledhas no effect in that supported install mode.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/gpu-operator/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
001468f8-3af8-4c40-962b-f41e647c92b7
⛔ Files ignored due to path filters: 8
api/nvidia/v1/zz_generated.deepcopy.gois excluded by!**/zz_generated.*.goapi/nvidia/v1alpha1/zz_generated.deepcopy.gois excluded by!**/zz_generated.*.gobundle/manifests/nvidia.com_clusterpolicies.yamlis excluded by!bundle/manifests/nvidia.com_*.yamlbundle/manifests/nvidia.com_nvidiadrivers.yamlis excluded by!bundle/manifests/nvidia.com_*.yamlconfig/crd/bases/nvidia.com_clusterpolicies.yamlis excluded by!config/crd/bases/**config/crd/bases/nvidia.com_nvidiadrivers.yamlis excluded by!config/crd/bases/**deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yamlis excluded by!deployments/gpu-operator/crds/**deployments/gpu-operator/crds/nvidia.com_nvidiadrivers.yamlis excluded by!deployments/gpu-operator/crds/**
📒 Files selected for processing: 10
api/nvidia/v1/clusterpolicy_types.goapi/nvidia/v1/clusterpolicy_types_test.goapi/nvidia/v1alpha1/nvidiadriver_types.goapi/nvidia/v1alpha1/nvidiadriver_types_test.gocontrollers/object_controls.gocontrollers/transforms_test.godeployments/gpu-operator/templates/clusterpolicy.yamldeployments/gpu-operator/values.yamlinternal/state/driver_test.gointernal/state/driver_volumes.go
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
| # Mount host subscription files on eligible OS/runtime combinations, including with repoConfig. | ||
| # Set to false for air-gapped hosts without subscription files. | ||
| hostSubscription: | ||
| enabled: true |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
The default changes behavior on helm upgrade for RHEL installs that use repoConfig.
The change summary says that, before this PR, RHEL with repoConfig skipped subscription mounts. With enabled: true as the default, the same installs now mount /etc/pki/entitlement, /etc/yum.repos.d/redhat.repo and /etc/rhsm. This applies to vanilla Kubernetes with a non-CRI-O runtime.
The SubscriptionPathMap entries use HostPathDirectory and HostPathFile. A host without these paths fails the mount, and the driver pod stays in ContainerCreating. The paths are missing on air-gapped hosts that use a mirror in repoConfig.
Because the driver daemonset rolls with maxUnavailable, the failure can stall the driver rollout after the operator upgrade.
The workaround is hostSubscription.enabled: false. Existing users do not know to set it. Either document this as a breaking default in the upgrade or release notes, or keep the old behavior for existing installs. For example, leave the key unset by default so the operator decides.
As per path instructions: "any default whose change alters behaviour for existing installs on helm upgrade."
Source: Path instructions
Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
4d37056 to
a14a903
Compare
| if !config.Driver.HostSubscription.IsEnabled() { | ||
| n.logger.Info("Skipping host subscription mounts because hostSubscription is disabled", "OS", osID) |
There was a problem hiding this comment.
🔴 Existing air-gapped RHEL driver pods fail
On RHEL hosts with repoConfig but missing subscription files, omitted hostSubscription now adds mandatory hostPath mounts. Existing driver pods fail to start after upgrade.
Learn more
Both driver render paths previously omitted RHEL subscription mounts when a custom repository was configured. The new default enables those mounts even for existing custom-repository installations. The subscription paths require host files and directories, so Kubernetes cannot start the pod on an air-gapped node where they do not exist. The same condition changed in getDriverAdditionalConfigs.
Example: A RHEL node has a custom repository ConfigMap but no /etc/pki/entitlement. Before upgrade its driver pod starts without subscription mounts. After upgrade, its unchanged resource produces a required /etc/pki/entitlement hostPath and the driver pod cannot start.
Recommended fix: Preserve the old skip behavior when hostSubscription.enabled is omitted and repoConfig is configured on RHEL, in both transformDriverContainer and getDriverAdditionalConfigs. Allow explicit true to mount both and explicit false to skip. If changing the omitted default is necessary, provide a migration that keeps existing installations running.
Was this helpful? React with 👍 or 👎 to provide feedback.
| {{- if .Values.driver.hostSubscription }} | ||
| hostSubscription: {{ toYaml .Values.driver.hostSubscription | nindent 6 }} | ||
| {{- end }} |
There was a problem hiding this comment.
🔴 Helm switch leaves default driver mounts enabled
With nvidiaDriverCRD.enabled=true, driver.hostSubscription.enabled=false reaches ClusterPolicy but not the default NVIDIADriver. That driver still mounts subscription paths, so air-gapped RHEL pods fail to start.
Learn more
The Helm chart has two driver rendering modes. When driver.nvidiaDriverCRD.enabled is true, the driver specification comes from the default NVIDIADriver template, while ClusterPolicy does not supply its driver settings. The newly added value is emitted only in the ClusterPolicy template. The default NVIDIADriver omits it, so its IsEnabled() call selects mounts even when the Helm value is false.
Example: Install with driver.nvidiaDriverCRD.enabled=true, driver.nvidiaDriverCRD.deployDefaultCR=true, driver.hostSubscription.enabled=false, and a RHEL host without /etc/pki/entitlement. The default driver resource omits the setting and the rendered pod requires that path; the driver pod cannot start.
Recommended fix: Also emit hostSubscription under spec in templates/nvidiadriver.yaml, using the same values key. Test both Helm driver modes with an explicit false value.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Closing in favor of #3109 |
Summary
Alternative implementation. Fixes #2817 by making host subscription mounts independent of custom repository configuration.
Previously, configuring
driver.repoConfigimplicitly disabled RHEL host subscription mounts. This prevented driver installations that require both host subscription repositories and additional custom repositories.Changes
Add
driver.hostSubscription.enabledto Helm, ClusterPolicy, and NVIDIADriver:truefalseUse a pointer boolean to distinguish omitted values from explicit
false. Custom repositories no longer implicitly disable subscriptions.The
hostSubscriptionobject also leaves room for future configuration, such as custom subscription paths. This change only introducesenabled; custom paths are not currently supported.Example
Air-gapped installations can explicitly disable host subscription mounts:
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing