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

Inconsistent logging during kubeadm init #883

Closed
chuckha opened this issue Jun 4, 2018 · 12 comments
Closed

Inconsistent logging during kubeadm init #883

chuckha opened this issue Jun 4, 2018 · 12 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@chuckha
Copy link

chuckha commented Jun 4, 2018

Is this a BUG REPORT or FEATURE REQUEST?

FEATURE REQUEST

During kubeadm init we call out to two places in the code that use bare glog logging. Since we do not log with this style, we end up with some glog output in the middle of our nice output without the prefix.

There is no way to remove the prefix in glog logging.

The two calls are

test/e2e and the kubelet

@chuckha chuckha added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jun 4, 2018
@timothysc timothysc added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 3, 2018
@timothysc timothysc added this to the v1.12 milestone Jul 3, 2018
@timothysc
Copy link
Member

/assign @chuckha

@timothysc timothysc added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Aug 10, 2018
@timothysc timothysc removed this from the v1.12 milestone Aug 10, 2018
@Klaven
Copy link

Klaven commented Aug 22, 2018

can I take this one?

@neolit123
Copy link
Member

can I take this one?

sure, sorry for not getting a response.

@neolit123 neolit123 added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Aug 29, 2018
@neolit123
Copy link
Member

@Klaven is working on this. 🎉

please ask questions that you may have to me or @chuckha about this.
thanks.

@neolit123 neolit123 added this to the v1.12 milestone Aug 29, 2018
@neolit123 neolit123 removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 29, 2018
@Klaven
Copy link

Klaven commented Sep 4, 2018

@neolit123 or @chuckha
There are other cases of glog being used in kubeadm like the one here:
https://github.com/kubernetes/kubernetes/blob/be11540775e36b1f1acdd6cb43500c1717af0ad4/cmd/kubeadm/app/util/system/kernel_validator.go#L255

Do you want me to try and fix as many as I can find? or just the ones that log improperly on init during a "standard"/"successful" init?

Is [kernelvalidator] or [preflight/kernel] the right "tag" for there? Using preflight felt wrong as the kernel validator could be used in other things then preflight checks but does not currently look like it is. That being said [preflight/kernel] matches [preflight/images].

@timothysc timothysc added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Sep 5, 2018
@timothysc
Copy link
Member

/assign @neolit123

@neolit123
Copy link
Member

@Klaven
sorry for the delay. too many things.

i'm currently investigating what is best to do here.

@neolit123
Copy link
Member

neolit123 commented Sep 5, 2018

@Klaven
so digging a little i find only a couple of potential issues:

$cd cmd/kubeadm/app
$ grep "glog.Info" * -rnI
cmd/join.go:329:		glog.Infoln("[join] running pre-flight checks before initializing the new control plane instance")
util/system/validators.go:44:		glog.Infof("Validating %s...", v.Name())

the original links in the OP seem out of date.
the idea would be to only remove glog.Info or glog.Infof calls because these mix with our standard output.

  1. please start as a PR changing the above two calls to fmt.Println / fmt.Printf.
  2. start kubeadm init and see if you get output such as:
I0905 18:59:00.337035    4195 kernel_validator.go:81] Validating kernel version
I0905 18:59:00.337255    4195 kernel_validator.go:96] Validating kernel config

for non-errors. we also call some vendored code and hopefully it doesn't have these.

I0905 18:59:00.337255 is the kind of output from glog that we don't want unless there is an error or a warning or if verbosity is enabled glog.V(x > 0)....

glog docs for reference:
https://godoc.org/github.com/golang/glog

LMK if you have any further questions. 👍

@Klaven
Copy link

Klaven commented Sep 10, 2018

@neolit123 I think I have done everything needed for the above. Please let me know if there is more I need to do! Please let me know if I missed any step.
kubernetes/kubernetes#68455
I tried to assign it too you :) but I don't think it lets me.
Thanks for your help getting me into the project!

@timothysc timothysc modified the milestones: v1.12, v1.13 Sep 18, 2018
@Klaven
Copy link

Klaven commented Oct 3, 2018

I am not sure if I screwed this up linking it, but this ticket still says it is open, and the PR was merged.
Here is the link to the PR:
kubernetes/kubernetes#68455
Thanks!

@neolit123
Copy link
Member

thanks
/close

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

thanks
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

5 participants