Skip to content

Conversation

@bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Oct 20, 2018

What type of PR is this?
/kind feature

What this PR does / why we need it:
Implemented preflight check to ensure that number of CPUs
on the master node is not less than required.

Does this PR introduce a user-facing change?:

kubeadm: Implemented preflight check to ensure that number of CPUs
on the master node is not less than required.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 20, 2018
@k8s-ci-robot k8s-ci-robot requested review from chuckha and luxas October 20, 2018 12:04
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 20, 2018
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

thanks @bart0sh
added a couple of minor comments, LGTM

Copy link
Member

Choose a reason for hiding this comment

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

let's use a table of the test cases like var tests = []struct {...
line 690.

Copy link
Member

Choose a reason for hiding this comment

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

number of CPUs %d is less than required %d

-->

the number of available CPUs %d is less than the required %d

@bart0sh bart0sh force-pushed the PR0032-kubeadm-add-NumCPUCheck branch from db07f1b to 198f914 Compare October 20, 2018 13:00
@bart0sh
Copy link
Contributor Author

bart0sh commented Oct 20, 2018

@neolit123 Thanks for the review! Updated.

Copy link
Member

Choose a reason for hiding this comment

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

contents of Errorf() should start will lowercase.

Copy link
Member

Choose a reason for hiding this comment

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

FYI we gravitate towards using subtests with t.Run for new code, but not critical here.

Copy link
Member

Choose a reason for hiding this comment

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

instead of 2^31-1 we might as well hardcode a very big int like 99999999, for better readability?
and so that we don't include math.

also having test names is a plus.

Implemented preflight check to ensure that number of CPUs
on the master node is not less than required.
@bart0sh bart0sh force-pushed the PR0032-kubeadm-add-NumCPUCheck branch from 198f914 to d230b24 Compare October 20, 2018 14:55
@bart0sh
Copy link
Contributor Author

bart0sh commented Oct 20, 2018

/test pull-kubernetes-e2e-kops-aws
/test pull-kubernetes-integration

@neolit123
Copy link
Member

/retest

@neolit123
Copy link
Member

one argument here would be if we want it as a warning or an error.
my vote goes for error so that it blocks and lets the user know right away.

/lgtm
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/assign @timothysc

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2018
Copy link
Contributor

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bart0sh, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2018
@k8s-ci-robot k8s-ci-robot merged commit 15c15be into kubernetes:master Oct 23, 2018
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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants