moby / moby/spdystream

Usage of environment variable debug=True

Open
#87 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
149
Forks
59
PR merge metrics
No merged PRs in 30d

Description

Problem: If one has debug=True set as environment variable, the logging behavior might be irritating using e.g. kubectl.

It brings a bunch of messages - e.g. when using the shell of an pod:

I1129 12:16:37.622982    5834 log.go:184] (0xc00010e160) (0xc0005ba1e0) Create stream
I1129 12:16:37.623601    5834 log.go:184] (0xc00010e160) (0xc0005ba1e0) Stream added, broadcasting: 1
I1129 12:16:37.716400    5834 log.go:184] (0xc00010e160) Reply frame received for 1
I1129 12:16:37.717023    5834 log.go:184] (0xc00010e160) (0xc0005ba280) Create stream
I1129 12:16:37.717043    5834 log.go:184] (0xc00010e160) (0xc0005ba280) Stream added, broadcasting: 3
I1129 12:16:37.770884    5834 log.go:184] (0xc00010e160) Reply frame received for 3
I1129 12:16:37.771082    5834 log.go:184] (0xc00010e160) (0xc000aac1e0) Create stream
I1129 12:16:37.771094    5834 log.go:184] (0xc00010e160) (0xc000aac1e0) Stream added, broadcasting: 5
I1129 12:16:37.823963    5834 log.go:184] (0xc00010e160) Reply frame received for 5
I1129 12:16:37.824279    5834 log.go:184] (0xc00010e160) (0xc00069b220) Create stream
I1129 12:16:37.824294    5834 log.go:184] (0xc00010e160) (0xc00069b220) Stream added, broadcasting: 7

Those messages appear with every key stroke when typing in the pod shell. This might be irritating to new k8s users and they might think, something is broken. I did some research on the problem - it seems like others have the same problem and a lot of questions are unanswered as its not obvious to make this link.

This was also posted in https://github.com/kubernetes/kubectl/issues/1153 as I asked to change kubectl behavior.

Proposed solution: Would it be possible, to change the env variable used to something other then debug?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where the debug environment variable is read in the spdystream entry points and compare the reported behavior with kubectl issue 1153. Done should mean that normal pod-shell interaction no longer emits the repeated stream messages while an intentional debugging mode remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.