Skip to content

fix(runtime): preserve config when drop-ins are disabled - #2124

Open
efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:codex/nvidia-2123-empty-dropin
Open

efegokdemir wants to merge 1 commit into
NVIDIA:mainfrom
efegokdemir:codex/nvidia-2123-empty-dropin

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Description

Fixes #2123. When --drop-in-config or RUNTIME_DROP_IN_CONFIG is empty, containerd and CRI-O now update the loaded configuration directly. Previously, both engines still created a drop-in-only destination while the CLI or installer wrote to the top-level config path, which could overwrite existing runtime settings or leave the NVIDIA runtime missing.

CRI-O cleanup continues to use its explicitly loaded top-level destination when removing the NVIDIA runtime. Regression tests cover CLI configuration for both engines, installer setup for both engines, and CRI-O cleanup with distinct source and destination configs.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Unit tests passing (make test)
  • Lint checks passing (make lint) — the full-repository lint reports six existing SA4023 issues in cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go and internal/ldconfig/ldconfig.go; the same failures reproduce on pristine main. All changed packages pass targeted lint.
  • Test cases are added for new code paths
  • Commits are signed-off and cryptographically signed

Testing

  • make build — passed
  • make test — passed
  • golangci-lint run on the five changed package paths — passed, 0 issues
  • make lint — fails on the six unrelated SA4023 findings above; verified on pristine upstream a672e378
  • make fmt and git diff --check — passed
  • Fail-before evidence: the new CLI regression test failed on pristine a672e378 for both runtimes. CRI-O lost its existing crun default, while containerd wrote a self-referential import and omitted the NVIDIA runtime. The same tests pass with this change.

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: an empty --drop-in-config overwrites the engine config with drop-in-only content

1 participant