Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce logging verbosity in NVIDIA Container Runtime #560

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

elezar
Copy link
Member

@elezar elezar commented Jun 24, 2024

These changes reduce the verbosity of the logging of the NVIDIA Container Runtime -- especially for the case where no modifications are required.

See:

Testing

  1. Build the executable:
make cmd-nvidia-container-runtime
  1. Create a dummy config file:
mkdir -p .config/nvidia-container-runtime
cat <<EOF > .config/nvidia-container-runtime/config.toml 
[nvidia-container-runtime]
log-level = "info"
runtimes = ["undefined", "missing", "runtime"]
EOF
  1. Create a dummy runtime:
cat <<EOF > runtime
#!/bin/bash
echo "runtime args \$@"
EOF
chmod +x runtime
  1. Run the NVIDIA runtime with the create command:
PATH=$(pwd):${PATH} XDG_CONFIG_HOME=$(pwd)/.config \
./nvidia-container-runtime --log=$(pwd)/runtime.log create foo
  1. Check the generated log:
cat runtime.log

We can change the following:

  • the log-level in the config file. Note that adding --debug flag to the command line (e.g. ./nvidia-container-runtime --debug) will configure debug logging.
  • The runc command to check the behaviour for non-create commands.

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.

Changes look sane, I don't have a system to test the changes but I don't see anything breaking/

Only a question at internal/oci/runtime_low_level.go , not a blocker

internal/oci/runtime_low_level.go Show resolved Hide resolved
internal/oci/runtime_low_level.go Show resolved Hide resolved
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change moves most of the logging for the NVIDIA Container runtime
from Info to Debug or Trace -- especially in the case where no
modifications are requried.

This removes execessive logging.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar merged commit a6a96a8 into NVIDIA:main Jul 1, 2024
6 of 7 checks passed
@elezar elezar deleted the reduce-logging branch July 1, 2024 14:22
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.

None yet

2 participants