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

Upgrades: Implement preflight checks #206

Merged
merged 8 commits into from
Feb 21, 2019

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented Feb 18, 2019

What this PR does / why we need it:

This PR implements preflight checks for upgrades. Work in progress; do not merge.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #200

Special notes for your reviewer:

Documentation:

Release note:

NONE

@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 18, 2019
@xmudrii xmudrii force-pushed the upgrades/preflight-checks branch 5 times, most recently from 87c3ffe to f07c474 Compare February 20, 2019 09:44
@xmudrii xmudrii requested a review from kron4eg February 20, 2019 09:44
@xmudrii
Copy link
Member Author

xmudrii commented Feb 20, 2019

/assign @kron4eg

@kron4eg
Copy link
Member

kron4eg commented Feb 20, 2019

pkg/upgrader/upgrade/preflight_checks.go:164:8: declaration of "err" shadows declaration at pkg/upgrader/upgrade/preflight_checks.go:149 (govet)
--
5 | ver, err := parseContainerImageVersion(p.Spec.Containers[0])
6 | ^
7 | Makefile:22: recipe for target 'lint' failed

@kubermatic-bot kubermatic-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 20, 2019
@xmudrii xmudrii changed the title [WIP] Upgrades: Implement preflight checks Upgrades: Implement preflight checks Feb 20, 2019
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 20, 2019
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super awesome!

minor notices applied

pkg/cmd/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrader/upgrade/preflight_checks.go Outdated Show resolved Hide resolved
pkg/upgrader/upgrader.go Outdated Show resolved Hide resolved
pkg/upgrader/upgrade/preflight_checks.go Outdated Show resolved Hide resolved
fmt.Printf("Pod %s is running apiserver version %s\n", p.ObjectMeta.Name, ver.String())
}
if apiserverVersion == nil {
apiserverVersion = ver
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no sure about this logic, probably we need to find biggest version on apiserver in cluster.

It's needed because kubeone upgarde can fail (temporary, for network reasons for example), and on the second run you could have different versions of apiserver on different nodes.

@kron4eg
Copy link
Member

kron4eg commented Feb 21, 2019

@xmudrii this PR needs a rebase

@xmudrii
Copy link
Member Author

xmudrii commented Feb 21, 2019

@kron4eg done and also fixed comments regarding imports and spaces. I'm now fixing comments regarding version and prerequisites check

@kron4eg
Copy link
Member

kron4eg commented Feb 21, 2019

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9460a4fa8d00761d40c2c971499e9365c101aac7

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2019
@kubermatic-bot kubermatic-bot merged commit ba3aae4 into master Feb 21, 2019
@kubermatic-bot kubermatic-bot deleted the upgrades/preflight-checks branch February 21, 2019 10:52
@kdomanski kdomanski mentioned this pull request Feb 26, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build pre-flight checks for kubeone upgrade
3 participants