-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Fix kubeadm upgrade plan
for offline operation
#54016
Fix kubeadm upgrade plan
for offline operation
#54016
Conversation
Hi @praseodym. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
/ok-to-test |
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.
Thanks!
I'd consider this a cherrypick candidate
@@ -82,7 +82,9 @@ func GetAvailableUpgrades(versionGetterImpl VersionGetter, experimentalUpgradesA | |||
// Get and output the current latest stable version | |||
stableVersionStr, stableVersion, err := versionGetterImpl.VersionFromCILabel("stable", "stable version") | |||
if err != nil { | |||
return nil, err | |||
fmt.Println("[upgrade/versions] WARNING:", err) |
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.
style nit: I prefer Printf("foo: %v\n", err)
, that is what we have everywhere else
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’ll change that!
@@ -86,7 +86,7 @@ func (g *KubeVersionGetter) KubeadmVersion() (string, *versionutil.Version, erro | |||
func (g *KubeVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) { | |||
versionStr, err := kubeadmutil.KubernetesReleaseVersion(ciVersionLabel) | |||
if err != nil { | |||
return "", nil, fmt.Errorf("Couldn't fetch latest %s version from the internet: %v", description, err) |
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.
Why change these?
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.
This is a cosmetic change, currently the error message reads Couldn't fetch latest stable version version from the internet
(note the version version
).
Removing label |
fbd1b8f
to
8a4e0e8
Compare
/test pull-kubernetes-e2e-kubeadm-gce |
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: luxas, praseodym Associated issue: 498 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
/retest |
@praseodym: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 54160, 54016). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
This PR allows
kubeadm upgrade plan
to work in firewalled/offline/otherwise restricted environments by ignoring errors when trying to reach dl.k8s.io. Instead, we fall back to the current kubeadm version as the latest stable version. This is a reasonable as a user is expected to install a recent version of kubeadm before upgrading.Which issue this PR fixes: Fixes kubernetes/kubeadm#498
Special notes for your reviewer: Should preferably be cherrypicked to 1.8.