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

kubeadm: add mandatory configuration to "phase preflight" #68446

Merged

Conversation

neolit123
Copy link
Member

What this PR does / why we need it:
Add the:

  • mandatory flag "--config" to the preflight phase
    and parse the specified config file for either "master" or "node".
  • flag "--ignore-preflight-errors" to the preflight phase to
    allow skipping errors.
  • the function AddIgnorePreflightErrorsFlag()
    to "options/generic.go", because the flag is used in multiple commands.

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 kubernetes/kubeadm#924

Special notes for your reviewer:
this is following:
kubernetes/kubeadm#924 (comment)

Release note:

kubeadm: add mandatory "--config" flag to "kubeadm alpha phase preflight"

@kubernetes/sig-cluster-lifecycle-pr-reviews
/assign @fabriziopandini
/milestone 1.12
/kind bug

@k8s-ci-robot
Copy link
Contributor

@neolit123: You must be a member of the kubernetes/kubernetes-milestone-maintainers github team to set the milestone.

In response to this:

What this PR does / why we need it:
Add the:

  • mandatory flag "--config" to the preflight phase
    and parse the specified config file for either "master" or "node".
  • flag "--ignore-preflight-errors" to the preflight phase to
    allow skipping errors.
  • the function AddIgnorePreflightErrorsFlag()
    to "options/generic.go", because the flag is used in multiple commands.

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 kubernetes/kubeadm#924

Special notes for your reviewer:
this is following:
kubernetes/kubeadm#924 (comment)

Release note:

kubeadm: add mandatory "--config" flag to "kubeadm alpha phase preflight"

@kubernetes/sig-cluster-lifecycle-pr-reviews
/assign @fabriziopandini
/milestone 1.12
/kind bug

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.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 9, 2018
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

@neolit123 many thanks for this quick fix
LGTM

/assign @timothysc
for adding required labels/milestone

Copy link
Member

@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.

/approve

It generally lgtm but I'd like at @fabriziopandini to dbl-check for final lgtm.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2018
@timothysc timothysc added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 9, 2018
@timothysc timothysc added this to the v1.12 milestone Sep 9, 2018
err = configutil.VerifyAPIServerBindAddress(internalcfg.APIEndpoint.AdvertiseAddress)
kubeadmutil.CheckErr(err)

err = preflight.RunInitMasterChecks(utilsexec.New(), internalcfg, ignorePreflightErrorsSet)
Copy link
Member

Choose a reason for hiding this comment

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

@neolit123 not blocking, but could you kindly add fmt.Println("[preflight] running pre-flight checks") + eventually a pre-flight checks passed after the error check?
This will provide a better UX (now the user doesn't gets any message in case all the checks are passing).
same for nodes

Add the:
- mandatory flag "--config" to the preflight phase
and parse the specified config file for either "master" or "node".
- flag "--ignore-preflight-errors" to the preflight phase to
allow skipping errors.
- the function AddIgnorePreflightErrorsFlag()
to "options/generic.go", because the flag is used in multiple commands.
@neolit123
Copy link
Member Author

@fabriziopandini i have added the [preflight] ... output to master and node
PTAL.

@fabriziopandini
Copy link
Member

@neolit123 thanks!
/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, neolit123, timothysc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 10, 2018
@fabriziopandini
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit c5353a7 into kubernetes:master Sep 10, 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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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.

kubeadm alpha phase preflight master fails
4 participants