in a number of places kubeadm calls:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/error.go#L54
if err is non-nil the function causes an abrupt os.Exit(..).
we need to refactor all calls to this function and any stray calls to os.Exit().
mini-guide:
Run: calls in kubeadm with RunE - e.g.:CheckErr and replace them with the following pattern:if err := someOperation(); err != nil {
return err
}
go test ./cmd/kubeadm/app/... to make sure unit tests pass.for more detail see the comments in this PR;
https://github.com/kubernetes/kubernetes/pull/80937#discussion_r312964179
https://github.com/kubernetes/kubernetes/pull/80937
cc @rosti for extra comments if needed.
/assign
Thanks for taking on this @michaelclopez ! Ping me for a review when ready.
In addition to CheckErr calls, we need to make sure, that we don't have any os.Exit() and klog.Fatal* calls.
os.Exit calls should return an appropriate error.klog.Fatal* is basically klog.Error* and os.Exit(1). Any such calls should be replaced by klog.Error* and error return and propagation.No problem @rosti. Should I ping you with questions in case I need clarification on something?
@michaelclopez , feel free to ping me for any kind of questions, that you might have.
we are in code freeze. punting to 1.17.
No problem @rosti. Should I ping you with questions in case I need clarification on something?
@michaelclopez Hi, sorry for bugging you, I'm going to do this task if you have no enough time. :)
cc: @neolit123 @rosti
Yes, sorry about the delay. Got pulled in a few directions here. Please take this if you can get it out sooner.
Yes, sorry about the delay. Got pulled in a few directions here. Please take this if you can get it out sooner.
@michaelclopez Thanks a lot. :)
Most helpful comment
/assign