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

[24.0 backport] docker info: fix condition for printing debug information #4393

Merged
merged 1 commit into from Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion cli/command/system/info.go
Expand Up @@ -313,7 +313,12 @@ func prettyPrintServerInfo(streams command.Streams, info *info) []error {
fprintln(output, " Docker Root Dir:", info.DockerRootDir)
fprintln(output, " Debug Mode:", info.Debug)

if info.Debug {
// The daemon collects this information regardless if "debug" is
// enabled. Print the debugging information if either the daemon,
// or the client has debug enabled. We should probably improve this
// logic and print any of these if set (but some special rules are
// needed for file-descriptors, which may use "-1".
if info.Debug || debug.IsEnabled() {
fprintln(output, " File Descriptors:", info.NFd)
fprintln(output, " Goroutines:", info.NGoroutines)
fprintln(output, " System Time:", info.SystemTime)
Expand Down