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

upgrade ignores HighAvailability feature gate #731

Closed
mxey opened this issue Mar 15, 2018 · 2 comments · Fixed by kubernetes/kubernetes#62455
Closed

upgrade ignores HighAvailability feature gate #731

mxey opened this issue Mar 15, 2018 · 2 comments · Fixed by kubernetes/kubernetes#62455
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Milestone

Comments

@mxey
Copy link

mxey commented Mar 15, 2018

Choose one: BUG REPORT

I have the HighAvailability feature gate enabled in my kubeadm configuration file. On kubeadm init, that added --endpoint-reconciler-type=lease to the kube-apiserver static pod. After running kubeadm upgrade with the same configuration file, that option is gone.

Versions

kubeadm version (use kubeadm version): 1.9.4

Environment:

  • Kubernetes version (use kubectl version): 1.9.3

  • Cloud provider or hardware configuration: Vagrant with VirtualBox

  • OS (e.g. from /etc/os-release): CentOS Linux release 7.4.1708 (Core)

  • Kernel (e.g. uname -a): Linux vagrant-kubernetes-master1 3.10.0-693.17.1.el7.x86_64 kubeadm join on slave node fails preflight checks #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

  • Others:

What happened?

Before upgrade:

[root@vagrant-kubernetes-master1 etc]# grep endpoint-reconciler-type /etc/kubernetes/manifests/kube-apiserver.yaml 
    - --endpoint-reconciler-type=lease

After upgrade:

[root@vagrant-kubernetes-master1 etc]# grep endpoint-reconciler-type /etc/kubernetes/manifests/kube-apiserver.yaml 

What you expected to happen?

After upgrade:

[root@vagrant-kubernetes-master1 etc]# grep endpoint-reconciler-type /etc/kubernetes/manifests/kube-apiserver.yaml 
    - --endpoint-reconciler-type=lease

How to reproduce it (as minimally and precisely as possible)?

  • Create kubeadm.yaml:
kind: MasterConfiguration

networking:
  podSubnet: 10.244.0.0/16

featureGates:
  HighAvailability: true
  • kubeadm init --config /etc/kubernetes/kubeadm.yaml
  • grep endpoint-reconciler-type /etc/kubernetes/manifests/kube-apiserver.yaml: shows option
  • Install CNI to make node ready: kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml
  • Wait for node to become ready: kubectl get nodes -w
  • kubeadm upgrade --yes --config /etc/kubernetes/kubeadm.yaml apply v1.9.4
  • grep endpoint-reconciler-type /etc/kubernetes/manifests/kube-apiserver.yaml: no output

Anything else we need to know?

@timothysc
Copy link
Member

timothysc commented Apr 4, 2018

/assign @fabriziopandini

@timothysc timothysc added this to the v1.11 milestone Apr 4, 2018
@timothysc timothysc added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Apr 4, 2018
@fabriziopandini
Copy link
Member

@mxey a possible workaround is to pass --features-gates to upgrade as a flag; the fix is on the flight

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Apr 12, 2018
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 <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubeadm upgrade ignores HighAvailability feature gate

**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](#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**:
```release-note
Fixed #731 kubeadm upgrade ignores HighAvailability feature gate
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants