Skip to content

EKS: nvidia-setup-kernel should no-op before apt when the running kernel already matches #2870

Description

@yuanchen8911

Note

This issue was substantially rewritten on 2026-09-19. The original report claimed AICR
installed kernel 7.0.0 and poisoned the nodes. That was wrong — see "Correction" at the
bottom. The valid finding is narrower and is stated below. Earlier comments are retained as
history; prefer this body.

Summary

nvidia-setup-kernel runs an apt transaction even when the node is already booted on the
exact kernel the package targets
. With NVIDIA_SETUP_INSTALL_KERNEL: "true" the version
check is bypassed entirely, so there is no path that short-circuits before apt.

On a node carrying unrelated pre-existing dpkg damage, that unnecessary transaction inherits
the damage, fails, and blocks node tuning — and therefore aicr validate.

Bounded by post-repair evidence (2026-09-19): after both nodes were repaired, tuning was
re-run with stock settings and reached 2/2 complete. The install path still ran despite the
nodes already being on the target kernel — apt reached the repositories, reported
0 upgraded, 0 newly installed, 0 removed, and GRUB was regenerated — but it succeeded. So
this is a latent reliability hazard, not a healthy-node failure: it performs avoidable
network, package-manager and boot-configuration work, and makes otherwise-idempotent tuning
depend on apt, repository, dpkg and GRUB health.

What is wrong in AICR

recipes/components/nodewright-customizations/manifests/tuning.yaml sets
NVIDIA_SETUP_INSTALL_KERNEL: "true" on nvidia-setup-kernel. In
ghcr.io/nvidia/nodewright-packages/nvidia-setup@sha256:1551abdd54476f6bddce863d383903a0a76f8a91bb4daa53c4f3c9490b980dae
(the digest tuning.yaml pins as containerSHA), steps/ensure_kernel.sh:

if [ "${NVIDIA_SETUP_INSTALL_KERNEL:-false}" = "true" ]; then
  install_kernel
  exit 0
fi
# the kernel checks live below this branch and are never reached

The package's own target for this lane is already satisfied: defaults/eks-gb300.conf sets
KERNEL=6.17.0-1019-aws, and resolve_full_kernel appends -64k on aarch64 →
6.17.0-1019-aws-64k, which both GPU nodes run. There was nothing to install.

AICR's comment at tuning.yaml:102 ("Check for kernel being >= to 6.17.0-1019 and if not
install") describes neither real branch.

Why flipping the flag is not the fix

Two independent reasons:

  1. With NVIDIA_SETUP_KERNEL_ALLOW_NEWER: "false" (what AICR sets alongside it), the false
    path runs check_kernel_exact and exit 1s otherwise. It is check-then-fail, not
    check-then-install.

    Worth noting the check is not what its name implies. It strips everything after the first
    hyphen and compares only the upstream version:

    check_kernel_exact() {
      local required="$1"
      local current
      current=$(uname -r)
      local required_upstream="${required%%-*}"   # 6.17.0-1019-aws-64k -> 6.17.0
      local current_upstream="${current%%-*}"     # 6.17.0-1019-aws-64k -> 6.17.0
      [ "${current_upstream}" = "${required_upstream}" ]
    }

    So it accepts any 6.17.0-* kernel regardless of ABI or flavour, while the error text says
    "exact match required". A fix that relies on this path should either describe those semantics
    accurately or introduce a full-version comparison.

  2. false is not a no-op either. A successful kernel check continues into the full EKS
    setup path in apply.sh, including upgrade.sh and further apt activity. Verified on
    cluster: patching the live CR to false still failed against the same broken dpkg state.

Proposed fix

Short-circuit before the first apt operation when the running kernel already matches the
target.
A check inside the INSTALL_KERNEL=true branch of ensure_kernel.sh, immediately
before install_kernel, is sufficient — apply.sh exits after ensure_kernel.sh returns. The
requirement is simply that nothing touches the package database before that check.

Scope

Both follow-ups from this run share the same exposure:

#2865 #2870
Structurally exposed EKS profiles where the kernel-build path runs Same — eks-h100, eks-gb200, eks-gb300
AICR recipes affected A100, H100, H200, GB200, GB300 EKS Same
Reproduced on GB300 only GB300 only
Not exposed AKS, GKE, BCM, generic-GB300, RKE2, OKE, OCP Same

Detail:

  • Pre-existing package damage verified on both GB300 nodes of this cluster.
  • AICR tuning failure reproduced on one node (ip-10-0-227-27). The current NodeWright CR
    processed only that node; ip-10-0-187-96 remains waiting and is absent from nodeState.
  • Same package configuration: eks-h100 / eks-gb200 / eks-gb300 profiles (identical
    KERNEL=6.17.0-1019-aws and EFA=1.48.0), reached by AICR's A100/H100/H200/GB200/GB300 EKS
    recipes.
  • Not exposed by the current AKS profile: aks-h100.conf omits KERNEL, and ensure_kernel.sh
    tests for that before the INSTALL_KERNEL branch.
  • Not exposed: GKE, BCM, generic GB300, RKE2, OKE, OCP.

This particular tuning failure requires both AICR's unnecessary apt call and pre-existing
damage on the node. That is not to say the damage is otherwise benign — broken iU/iF kernel
packages are independently harmful to node maintenance and reboot safety, regardless of AICR.

Correction — what this issue originally got wrong

The original report attributed the broken kernel packages to AICR. Node evidence disproves it:

unattended-upgrades installed kernel 7.0.0 on 2026-09-16, three days before the AICR run.

Start-Date: 2026-09-16  06:22:11
Commandline: /usr/bin/unattended-upgrade
INFO Packages that will be upgraded: … linux-aws linux-headers-aws linux-image-aws …
INFO Package linux-aws is kept back because a related package is kept back

The EFA DKMS build failed against 7.0.0 — EFA 3.0.0 is source-incompatible
(kcompat.h:274: error: 'struct ib_umem' has no member named 'nmap') — leaving the packages
iU/iF. Both GPU nodes show the same state and the same 09-16 origin.

Today's AICR run requested only 6.17.0-1019-aws-64k; its 7.0.0 dpkg entries are
configure retries of the pre-existing unpacked packages, not installs:

2026-09-19 22:12:18 configure linux-image-7.0.0-1012-aws:arm64
2026-09-19 22:12:18 status half-configured linux-image-7.0.0-1012-aws:arm64

Therefore, withdrawn: that AICR installed or transitively pulled kernel 7.0.0; that AICR
poisoned the nodes; that the linux-aws metapackages were pulled by AICR's transaction; and
the "persistent node damage caused by AICR" escalation. The node damage is a fleet/image
concern for the cluster owner, not an AICR defect.

Upstream

Reopen requested upstream at NVIDIA/nodewright-packages#85 (currently CLOSED) —
"nvidia-setup: skip-if-newer kernel mode + flavor-aware check".

That issue predates this one (opened 2026-07-03) and already describes both the unconditional
install and the flavour-stripping comparison. It was closed 2026-09-15 as "already implemented",
but neither behaviour is present at
b90ba46
or in the published nvidia-setup:0.8.0 (the newest release). A reopen request with the source
evidence and a minimal patch is posted here:

This issue stays open as the downstream tracker. It closes when the corrected package is
released and this repo advances nvidia-setup's version / containerSHA in tuning.yaml.

Note the upstream minimal fix is an exact-match short circuit, which is what #2870 needs; it
does not implement #85's broader "skip when newer" behaviour.

Components Affected

The fix itself belongs upstream, not in this repo:

  • Upstream nvidia-setup package logic — steps/ensure_kernel.sh (and the surrounding
    apply.sh path) is where the short-circuit must happen. AICR only passes the env var.
  • AICR recipe pin — recipes/components/nodewright-customizations/manifests/tuning.yaml
    needs its version / containerSHA advanced to consume the corrected package once released.

AICR could additionally reconsider whether NVIDIA_SETUP_INSTALL_KERNEL: "true" is the right
default for lanes whose AMI already ships the target kernel, but that is a mitigation rather
than the fix — see "Why flipping the flag is not the fix" above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/recipestheme/recipesRecipe expansion, overlays, mixins, and component registry

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions