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 kubeadm upgrade ignores HighAvailability feature gate #62455

Merged
merged 1 commit into from Apr 12, 2018

Conversation

fabriziopandini
Copy link
Member

@fabriziopandini fabriziopandini commented Apr 12, 2018

What this PR does / why we need it:
This PR fixes kubernetes/kubeadm#731

Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#731

Special notes for your reviewer:
The problem is a regression introduced by #55952 which added a --feature-gates
flag to kubeadm upgrade, to be used for updating feature gates during the upgrade process (so it is update + upgrade).

The original implementation always override the actual feature gates with the flag value, even when the flag is not set; this PR fixes this behaviour making kubeadm upgrade considers the flag value only if set, otherwise actual feature gates will be preserved.

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-cluster-lifecycle-bugs

Release note:

Fixed #731 kubeadm upgrade ignores HighAvailability feature gate

@k8s-ci-robot k8s-ci-robot added 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 12, 2018
@0xmichalis
Copy link
Contributor

Do we also need this change for kubeadm init too?

@0xmichalis
Copy link
Contributor

Also can you add a unit test?

@@ -70,16 +70,19 @@ func enforceRequirements(flags *cmdUpgradeFlags, dryRun bool, newK8sVersion stri
cfg.KubernetesVersion = newK8sVersion
}

// If features gates are passed to the command line, use it (otherwise use featureGates from configuration)
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to tell users this in the flag's description. They should know the behavior, IMO.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, but I'm not going to block on this and with the overhaul coming to CLI+phases+Config we will add that documentation.

/cc @liztio @fabriziopandini

@fabriziopandini
Copy link
Member Author

@Kargakis

Do we also need this change for kubeadm init too?
No; in kubeadm init flags and config are mutually exclusive, so there is no risk of conflict

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.

/lgtm
/approve

@@ -70,16 +70,19 @@ func enforceRequirements(flags *cmdUpgradeFlags, dryRun bool, newK8sVersion stri
cfg.KubernetesVersion = newK8sVersion
}

// If features gates are passed to the command line, use it (otherwise use featureGates from configuration)
Copy link
Member

Choose a reason for hiding this comment

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

Agreed, but I'm not going to block on this and with the overhaul coming to CLI+phases+Config we will add that documentation.

/cc @liztio @fabriziopandini

@k8s-ci-robot
Copy link
Contributor

@timothysc: GitHub didn't allow me to request PR reviews from the following users: liztio, fabriziopandini.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Agreed, but I'm not going to block on this and with the overhaul coming to CLI+phases+Config we will add that documentation.

/cc @liztio @fabriziopandini

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 12, 2018
@timothysc timothysc added this to the v1.10 milestone Apr 12, 2018
@timothysc timothysc added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cherrypick-candidate cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Apr 12, 2018
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@fabriziopandini @timothysc

Pull Request Labels
  • sig/cluster-lifecycle: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/bug: Fixes a bug discovered during the current release.
Help

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@fabriziopandini
Copy link
Member Author

/retest

@liztio
Copy link
Contributor

liztio commented Apr 12, 2018

/lgtm

@k8s-ci-robot
Copy link
Contributor

@liztio: changing LGTM is restricted to assignees, and only kubernetes org members may be assigned issues.

In response to this:

/lgtm

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, liztio, 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-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 62455, 62465, 62427, 62416, 62411). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit c07caaa into kubernetes:master Apr 12, 2018
@fabriziopandini fabriziopandini deleted the kubeadm-731 branch April 14, 2018 08:52
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 cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade ignores HighAvailability feature gate
7 participants