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

Fix error handling for loading initCfg in kubeadm #78611

Merged
merged 1 commit into from Jun 1, 2019

Conversation

@odinuge
Copy link
Member

commented Jun 1, 2019

This fixes possible problems when kubeadm upgrade can't load the
InitConfig properly. Some new code introduced in
#75499 is placed between
the loading of the config and the error handling, hiding possible
errors.

This error cannot be ignored (as is the case now), since the cfg ptr.
returned from the configutil function will be nil in the case of an
error.

Signed-off-by: Odin Ugedal odin@ugedal.com

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix error handling for loading initCfg in kubeadm upgrade and apply

CC: @marccarre

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

Hi @odinuge. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

Fix error handling for loading initCfg in kubeadm
This fixes possible problems when kubeadm upgrade can't load the
InitConfig properly. Some new code introduced in
#75499 is placed between
the loading of the config and the error handling, hiding possible
errors.

This error cannot be ignored (as is the case now), since the cfg ptr.
returned from the configutil function will be nil in the case of an
error.

Signed-off-by: Odin Ugedal <odin@ugedal.com>

@odinuge odinuge force-pushed the odinuge:kubeadm-err-check branch from 4fc636a to 2fc9b3a Jun 1, 2019

@k8s-ci-robot k8s-ci-robot added size/M and removed size/S labels Jun 1, 2019

@yagonobre
Copy link
Member

left a comment

Thanks @odinuge
/priority critical-urgent
/ok-to-test
/lgtm

/assign @rosti @neolit123

@neolit123
Copy link
Member

left a comment

thanks
/approve
/milestone v1.15

@k8s-ci-robot k8s-ci-robot added this to the v1.15 milestone Jun 1, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123, odinuge

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@neolit123

This comment has been minimized.

Copy link
Member

commented Jun 1, 2019

/retest

@marccarre

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

Apologies for the bug/regression 🙇

@k8s-ci-robot k8s-ci-robot merged commit 9c807d4 into kubernetes:master Jun 1, 2019

21 checks passed

cla/linuxfoundation odinuge authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@odinuge odinuge referenced this pull request Jul 1, 2019
6 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.