Skip to content

Conversation

elezar
Copy link
Member

@elezar elezar commented Aug 28, 2025

This change adds drop-in file support for containerd and crio. Instead of writing the entire in-memory config to the specified config path, we write only the modified settings (nvidia runtimes, default runtime, enable_cdi) settings to a drop-in file and update the top-level configs to import this if required.

See also #1272

For GPU Operator integration see NVIDIA/gpu-operator#1710

@elezar elezar force-pushed the drop-in-demo branch 2 times, most recently from 303181d to b332388 Compare September 18, 2025 12:52
@coveralls
Copy link

coveralls commented Sep 18, 2025

Pull Request Test Coverage Report for Build 17854078677

Details

  • 51 of 191 (26.7%) changed or added relevant lines in 13 files are covered.
  • 31 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.4%) to 36.32%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/config/engine/containerd/containerd.go 28 29 96.55%
pkg/config/engine/crio/crio.go 12 13 92.31%
cmd/nvidia-ctk/runtime/configure/configure.go 0 2 0.0%
pkg/config/engine/containerd/config.go 0 2 0.0%
pkg/config/engine/containerd/option.go 0 2 0.0%
pkg/config/engine/crio/option.go 0 2 0.0%
pkg/config/engine/engine.go 0 2 0.0%
cmd/nvidia-ctk-installer/container/container.go 0 6 0.0%
cmd/nvidia-ctk-installer/container/runtime/runtime.go 0 22 0.0%
pkg/config/engine/config.go 0 22 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/config/engine/containerd/config.go 6 39.0%
pkg/config/engine/crio/crio.go 7 55.17%
cmd/nvidia-ctk-installer/container/runtime/crio/crio.go 18 38.14%
Totals Coverage Status
Change from base Build 17850793830: -0.4%
Covered Lines: 4807
Relevant Lines: 13235

💛 - Coveralls

@ArangoGutierrez
Copy link
Collaborator

/retitle "Implement Drop-In Lifecycle Support for Containerd and Crio"

@elezar elezar force-pushed the drop-in-demo branch 2 times, most recently from 0f3597d to 62cffba Compare September 19, 2025 09:16
@elezar elezar changed the title WIP Add drop-in file support for containerd and crio Sep 19, 2025
@elezar elezar marked this pull request as ready for review September 19, 2025 09:17
@elezar elezar added this to the v1.18.0 milestone Sep 19, 2025
@elezar elezar linked an issue Sep 19, 2025 that may be closed by this pull request
This change adds drop-in file support for containerd and crio.
Instead of writing the entire in-memory config to the specified
config path, we write only the modified settings (nvidia runtimes,
default runtime, enable_cdi) settings to a drop-in file and update
the top-level configs to import this if required.

Signed-off-by: Evan Lezar <[email protected]>
Co-authored-by: Carlos Eduardo Arango Gutierrez <[email protected]>
Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elezar elezar merged commit 96050da into NVIDIA:main Sep 19, 2025
13 checks passed
Comment on lines +53 to +56
func (c *Config) AddRuntime(name string, path string, setAsDefault bool) error {
options := c.Source.GetDefaultRuntimeOptions()
return c.Destination.AddRuntimeWithOptions(name, path, setAsDefault, options)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this means the changes I made in #1256 will no longer take affect. If default_runtime_name=nvidia is set in the top-level config, and setAsDefault=false, we don't actually unset nvidia as the default runtime.

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.

Use drop-in files to configure containerd or cri-o
4 participants