Skip to content

Reduce logging verbosity in NVIDIA Container Runtime - #560

Merged
elezar merged 3 commits into
NVIDIA:mainfrom
elezar:reduce-logging
Jul 1, 2024
Merged

elezar merged 3 commits into
NVIDIA:mainfrom
elezar:reduce-logging

Conversation

@elezar

@elezar elezar commented Jun 24, 2024 •

Copy link
Copy Markdown
Member

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.

@ArangoGutierrez ArangoGutierrez left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread internal/oci/runtime_low_level.go Resolved
Comment thread internal/oci/runtime_low_level.go Resolved
elezar added 3 commits July 1, 2024 12:12
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 <[email protected]>
@elezar
elezar merged commit a6a96a8 into NVIDIA:main Jul 1, 2024
@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.

2 participants