Skip to content

Conversation

@jactor-sue
Copy link

Enable debug-level log for nvidia-ctk-installer cmd by --debug or -d.

Signed-off-by: Jactor Sue <jactor_sue@live.com>
@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 19, 2025

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.


var availableRuntimes = map[string]struct{}{"docker": {}, "crio": {}, "containerd": {}}
var defaultLowLevelRuntimes = []string{"runc", "crun"}
var (
Copy link
Member

Choose a reason for hiding this comment

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

If you're going to make these changes please make them in a separate commit.

Copy link
Author

@jactor-sue jactor-sue Jan 26, 2026

Choose a reason for hiding this comment

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

Nothing changed here, auto-formated by the gofumpt formatter.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
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 for the contribution.

I have made a proposal for using log-verbosity instead as well as some other changes that better align with some things that I've been considering recently.

Please feel free to squash / clean up as required.

Usage: "enable debug-level log",
Destination: &options.debug,
Sources: cli.EnvVars("TOOLKIT_DEBUG"),
},
Copy link
Member

Choose a reason for hiding this comment

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

One thing that we have been considering is switching to an explicit verbosity-based approach for this component so as to prepare for a switch to klog at some point. Could we changes this to:

Suggested change
},
&cli.IntFlag{
Name: "log-versbosity",
Aliases: []string{"v"},
Destination: &options.logVerbosity,
Sources: cli.EnvVars("LOG_VERBOSITY"),
},

Copy link
Author

Choose a reason for hiding this comment

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

So you want to change logger from logrus to klog for whole toolkit stack or only for installer?

Copy link
Member

Choose a reason for hiding this comment

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

The idea would be to move to something like logr.Logger internally, and then use klog in the installer and logrus for the CLI components. This may be longer term though, so a simpler change may be to ensure that the installer can have debug logging enabled as per your original change.

Deprecating the --debug flag, or mapping it to a well-defined log-verbosity at some point in the future would also be possible.

Copy link
Member

Choose a reason for hiding this comment

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

(feel free to rebase and drop my commit so that I can review this).

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.

2 participants