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

[BUG] yurtadm does not allow minor version compatibility of kubelet #1169

Closed
fujitatomoya opened this issue Jan 20, 2023 · 11 comments · Fixed by #1244
Closed

[BUG] yurtadm does not allow minor version compatibility of kubelet #1169

fujitatomoya opened this issue Jan 20, 2023 · 11 comments · Fixed by #1244
Assignees
Labels
kind/bug kind/bug

Comments

@fujitatomoya
Copy link
Contributor

What happened:

yurtadm join checks if kubelet version in edge can match with cluster version.
And if it does not match any version major, minor or patch, it will fail to join the cluster.

What you expected to happen:

Kubernetes uses https://semver.org/, that means it should be compatible up to minor version.
So we could expect that only major version matches with cluster version, then proceed to join the cluster.

Anything else we need to know?:

This is likely to happen for edge environment, since it will be really hard to maintain all devices as single specific version with cluster.

Environment:

  • OpenYurt version: v1.1.0
  • Kubernetes version (use kubectl version): v1.22.13
  • OS (e.g: cat /etc/os-release):
root@raspi4-2:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
  • Kernel (e.g. uname -a):
root@raspi4-2:~# uname -a
Linux raspi4-2 5.4.0-1077-raspi #88-Ubuntu SMP PREEMPT Mon Nov 28 14:31:37 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

others

root@raspi4-2:~/openyurt# _output/local/bin/linux/arm64/yurtadm join 43.135.146.95:6443 --token=6yljiu.woh0grtna9uwywca --node-type=edge --discovery-token-unsafe-skip-ca-verification --v=5
I0120 22:22:06.229745 2606533 token.go:89] [discovery] Created cluster-info discovery client, requesting info from "43.135.146.95:6443"
I0120 22:22:06.264730 2606533 token.go:114] [discovery] Cluster info signature and contents are valid and no TLS pinning was specified, will use API Server "43.135.146.95:6443"
I0120 22:22:06.276563 2606533 util.go:294] kubernetes version: v1.22.17
I0120 22:22:06.276652 2606533 join.go:291] node join data info: join.joinData{joinNodeData:(*joindata.NodeRegistration)(0x40004a44c0), apiServerEndpoint:"43.135.146.95:6443", token:"6yljiu.woh0grtna9uwywca", tlsBootstrapCfg:(*api.Config)(0x40000969c0), clientSet:(*kubernetes.Clientset)(0x40001c22c0), ignorePreflightErrors:sets.String{}, organizations:"", pauseImage:"registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2", yurthubImage:"registry.cn-hangzhou.aliyuncs.com/openyurt/yurthub:latest", kubernetesVersion:"v1.22.17", caCertHashes:sets.String{}, nodeLabels:map[string]string{}, kubernetesResourceServer:"dl.k8s.io", yurthubServer:"127.0.0.1"}
I0120 22:22:06.276861 2606533 util.go:43] Setting ipv4 forward
I0120 22:22:06.277073 2606533 util.go:52] Setting bridge settings for kubernetes.
I0120 22:22:06.277840 2606533 util.go:74] Disabling SELinux.
I0120 22:22:06.277893 2606533 util.go:105] Check and install kubelet v1.22.17
I0120 22:22:06.437994 2606533 util.go:114] kubelet --version: v1.22.13
Error: error execution phase initialize: The existing kubelet version v1.22.13 of the node is inconsistent with cluster version v1.22.17, please clean it.
...<snip>

/kind bug

@fujitatomoya fujitatomoya added the kind/bug kind/bug label Jan 20, 2023
@fujitatomoya
Copy link
Contributor Author

1st I would like to check if this is constraint or limitation, as Kubernetes perspective, it can be supported.

@YTGhost
Copy link
Member

YTGhost commented Jan 21, 2023

I think maybe we could allow different patch versions of the kubelet if the major version and minor version are the same. @rambohe-ch WDYT

@fujitatomoya
Copy link
Contributor Author

yeah probably that would be somewhere we land to avoid possible problems with minor version mismatch.

@rambohe-ch
Copy link
Member

1st I would like to check if this is constraint or limitation, as Kubernetes perspective, it can be supported.
@fujitatomoya I think we have put too strict rule for kubelet version check. if major version and minor version can match with cluster version, we can proceed to join the cluster.

@fujitatomoya would you like to make a pull request to fix this weakness of yurtadm join?

@rambohe-ch
Copy link
Member

I think maybe we could allow different patch versions of the kubelet if the major version and minor version are the same. @rambohe-ch WDYT

@YTGhost yes, we can allow different patch versions, agree+1

@fujitatomoya
Copy link
Contributor Author

@YTGhost @rambohe-ch i will try that when i got some time. thanks for comments.

@rambohe-ch
Copy link
Member

@YTGhost @rambohe-ch i will try that when i got some time. thanks for comments.

@fujitatomoya Hi, do you have any progress about this issue?

@fujitatomoya
Copy link
Contributor Author

No, not really. i just cannot have bandwidth for that. i would not expect that i can do that in next couple of weeks. if somebody else takes this over, that would be appreciated.

@YTGhost
Copy link
Member

YTGhost commented Feb 17, 2023

No, not really. i just cannot have bandwidth for that. i would not expect that i can do that in next couple of weeks. if somebody else takes this over, that would be appreciated.

@fujitatomoya If you don't mind, I can take the job and get it done in the next few days.

@fujitatomoya
Copy link
Contributor Author

@YTGhost you can take it, all yours. thanks 👍

@YTGhost
Copy link
Member

YTGhost commented Feb 18, 2023

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug kind/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants