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: graduate control plane prepare phase #73145

Merged
merged 1 commit into from
Feb 4, 2019
Merged

kubeadm: graduate control plane prepare phase #73145

merged 1 commit into from
Feb 4, 2019

Conversation

ereslibre
Copy link
Contributor

What this PR does / why we need it:
Graduate control plane prepare phase

Which issue(s) this PR fixes:
Refs kubernetes/kubeadm#1204

Does this PR introduce a user-facing change?:

NONE

/kind feature

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 21, 2019
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 21, 2019
@ereslibre
Copy link
Contributor Author

Submitting for early feedback. cc/ @fabriziopandini @neolit123

@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 Jan 21, 2019
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jan 21, 2019
Copy link
Member

@yagonobre yagonobre left a comment

Choose a reason for hiding this comment

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

Thanks @ereslibre
/ok-to-test
/kind cleanup
/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 21, 2019
Copy link
Member

@yagonobre yagonobre left a comment

Choose a reason for hiding this comment

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

@ereslibre SGTM, I have added few comments.

cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
Copy link
Contributor

@MalloZup MalloZup left a comment

Choose a reason for hiding this comment

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

🦄

@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label Jan 21, 2019
Copy link
Member

@yagonobre yagonobre left a comment

Choose a reason for hiding this comment

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

@ereslibre thanks for the fast interaction.
/lgtm

@ereslibre
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2019
@ereslibre
Copy link
Contributor Author

/hold

I want to improve this PR to treat every component as we do with init in the manifests subphase. Will ask for review when I'm finished.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2019
@ereslibre
Copy link
Contributor Author

/hold cancel

I added the manifests as separate subphases so the UX is similar to kubeadm init.

Also, the panic and the type assertion will be fixed on #73348

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2019
@ereslibre
Copy link
Contributor Author

Rebased on top of #73348

@ereslibre
Copy link
Contributor Author

/retest

1 similar comment
@ereslibre
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 29, 2019
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.

@ereslibre thanks for the PR.
added some comments.

probably the biggest topic is to move the etcd check in preflight.
we should have done that in @MalloZup 's PR.

sorry for not catching that.

cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
func runKubeconfigPhaseLocal(c workflow.RunData) error {
data, ok := c.(controlPlanePrepareData)
if !ok {
return errors.New("kubeconfig phase invoked with an invalid data struct")
Copy link
Member

Choose a reason for hiding this comment

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

[1]

cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/util.go Outdated Show resolved Hide resolved
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.

@ereslibre Thanks for this PR!
This is already a good starting point, even if an iteration is required to address some points:

  • file organization (i see a different approach here and in preflight)
  • the etcd check
    What about trying to organize a short meeting to discuss things F2F?

cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
cmd/kubeadm/app/cmd/phases/controlplanepreparejoin.go Outdated Show resolved Hide resolved
@ereslibre
Copy link
Contributor Author

@fabriziopandini @neolit123 I just reorganized the code to have everything in controlplane.go as with preflight. I would prefer a slightly different approach splitting in different files and potentially packages but for a first iteration I added a third commit (will be squashed if we agree) that reorganizes the code. Thanks!

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 31, 2019

@ereslibre: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws 965391f3a3d231ef02424b2869861d0b5bd21a88 link /test pull-kubernetes-e2e-kops-aws

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.

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.

@ereslibre The PR cleaned up nicely. Thanks

The last bit to be addressed before merging is the check etcd phase; I don't think this phase should be visible to the users (and in fact this fase was not included in the original list of phases).

So, considering this cannot be moved in prefilght, my proposal is to make ckeck etcd an hidden phase to be executed after control-plane prepare and before kubelet-start. Opinions?

@ereslibre
Copy link
Contributor Author

So, considering this cannot be moved in prefilght, my proposal is to make ckeck etcd an hidden phase to be executed after control-plane prepare and before kubelet-start. Opinions?

👍

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.

I'm ok with this version. Thanks @ereslibre
Might be in a follow up we should prefer checketcd to waitetcd (checketcd seems more appropriate to me), but this is a nit not blocking
/approve
Leaving final lgtm to @neolit123 or someone else

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ereslibre, fabriziopandini

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 Feb 4, 2019
@ereslibre
Copy link
Contributor Author

@fabriziopandini Renamed and squashed all commits. Thanks!

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.

this looks good, thanks for the update @ereslibre
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2019
@k8s-ci-robot k8s-ci-robot merged commit 25afae9 into kubernetes:master Feb 4, 2019
@ereslibre ereslibre deleted the graduate-control-plane-prepare-phase branch February 4, 2019 16:26
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants