-
Notifications
You must be signed in to change notification settings - Fork 527
fix: validate k8s control plane before addons #3729
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3729 +/- ##
=======================================
Coverage 73.20% 73.20%
=======================================
Files 148 148
Lines 25372 25375 +3
=======================================
+ Hits 18573 18576 +3
Misses 5663 5663
Partials 1136 1136
Continue to review full report at Codecov.
|
As it's rather hard to test the error respons from the new
The expected CSE 30 exit response is preserved:
And the relevant kubelet logs are interpolated into the CSE log output at
|
local output=${@: -2: 1} | ||
local exit_code=${@: -1: 1} | ||
local command=${@:1:$#-2} | ||
$command >> $output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to make sure that you don't care about the exit/failure in line 234 (the $command part)
Including that the $command is slow. I would think maybe backgrounding that such that it can complete separate from the exit (just a thought)
Something like: $command >> $output &
The point being that you would like this information but you don't want it to cause a nested failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of running in the background
4b8b9e8
to
cc398db
Compare
cc398db
to
84e49ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis, mboersma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reason for Change:
This PR improves the CSE error handling due to the control plane being unable to connect to the cluster apiserver.
Specifically, this PR makes the following changes:
kubectl cluster-info
) before validating "init" addons, because being able to connect to the cluster apiserver endpoint is a precondition of validating "init" addonsexit_cse
CSE helper func which can be used to gather debug data prior to exiting the CSE scriptexit_cse
to dump systemd kubelet logs prior to all exit paths where Kubernetes application layer logs are relevant for debugging failuresIssue Fixed:
Requirements:
Notes: