Skip to content

Conversation

@cdesiniotis
Copy link
Contributor

@cdesiniotis cdesiniotis commented Sep 23, 2025

The GPU Operator is switching from 'hook' to 'config' by default in the next release. This change ensures the default behavior of the toolkit container and GPU Operator are aligned. We also add deprecation messages to cases where an OCI hook is explicitly requested.

See thread for additional context: NVIDIA/gpu-operator#1578 (comment)

@coveralls
Copy link

coveralls commented Sep 23, 2025

Pull Request Test Coverage Report for Build 17973486093

Details

  • 0 of 16 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 36.226%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/nvidia-ctk-installer/container/runtime/runtime.go 0 3 0.0%
cmd/nvidia-ctk/runtime/configure/configure.go 0 5 0.0%
cmd/nvidia-ctk-installer/container/runtime/crio/crio.go 0 8 0.0%
Totals Coverage Status
Change from base Build 17920495274: -0.03%
Covered Lines: 4813
Relevant Lines: 13286

💛 - Coveralls

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the default CRI-O configuration mode from 'hook' to 'config' to align with the GPU Operator's upcoming change in default behavior.

  • Changed default configuration mode constant from "hook" to "config"

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, I'll leave final approval to ELezar

Name = "crio"

defaultConfigMode = "hook"
defaultConfigMode = "config"
Copy link
Member

@elezar elezar Sep 24, 2025

Choose a reason for hiding this comment

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

My one question was whether we wanted to print a deprecation warning when hook is configured?

In this case we would also need to update the nvidia-ctk runtime configure command to issue a similar warning.

elezar
elezar previously requested changes Sep 24, 2025
Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Minor UX improvement in terms of issuing a deprecation warning.

In order to more easily capture this in the release notes, maybe we can update the commit message to something like:

Deprecate hook config mode for cro-o

.

@elezar elezar force-pushed the switch-default-crio-config-mode branch from 5446a9e to e1f0f36 Compare September 24, 2025 09:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines 139 to 140
Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" +
"\tNote: The use of OCI hooks is deprecated.",
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

[nitpick] String concatenation across multiple lines reduces readability. Consider using a multi-line string literal or keeping the original format for better maintainability.

Suggested change
Usage: "the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.\n" +
"\tNote: The use of OCI hooks is deprecated.",
Usage: `the path to the OCI runtime hook to create if --config-mode=oci-hook is specified. If no path is specified, the generated hook is output to STDOUT.
Note: The use of OCI hooks is deprecated.`,

Copilot uses AI. Check for mistakes.
}

func (opts *Options) Validate(logger logger.Interface, _ *cli.Command) error {
if opts.configMode == "hook" {
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Use the defined constant configModeHook instead of the string literal "hook" for consistency with the newly introduced constants.

Copilot uses AI. Check for mistakes.
This chagne updates the default cri-o config mode from 'hook' to 'config' and
issues a deprecation warning if hook is explicitly selected.

Signed-off-by: Christopher Desiniotis <[email protected]>
Co-authored-by: Evan Lezar <[email protected]>
@elezar elezar force-pushed the switch-default-crio-config-mode branch from e1f0f36 to 781bbe2 Compare September 24, 2025 10:11
@elezar elezar self-requested a review September 24, 2025 10:11
@elezar elezar dismissed their stale review September 24, 2025 10:12

Addressed comments.

@elezar elezar changed the title Update default cri-o config mode to 'config' instead of 'hook' Deprecate the hook config mode for cri-o Sep 24, 2025
@elezar elezar added this to the v1.18.0 milestone Sep 24, 2025
Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Thanks @cdesiniotis.

I added the deprecation log messages as changes on-top.

@elezar elezar merged commit 3592084 into NVIDIA:main Sep 24, 2025
16 checks passed
@cdesiniotis
Copy link
Contributor Author

Thanks @elezar

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.

5 participants