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

delete yurtctl-lock and yurt-tunnel-nodes when revert the whole cluster #540

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

Congrool
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

Delete the yurt-tunnel-nodes configmap and yurtctl-lock when revert the whole openyurt cluster back to k8s cluster.

Which issue(s) this PR fixes:

Fixes #531

Special notes for your reviewer:

I'll add the test log in the following comment.

@openyurt-bot
Copy link
Collaborator

@Congrool: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

/kind bug

What this PR does / why we need it:

Delete the yurt-tunnel-nodes configmap and yurtctl-lock when revert the whole openyurt cluster back to k8s cluster.

Which issue(s) this PR fixes:

Fixes #531

Special notes for your reviewer:

I'll add the test log in the following comment.

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.

@openyurt-bot openyurt-bot added the kind/bug kind/bug label Oct 30, 2021
@openyurt-bot openyurt-bot added the size/M size/M: 30-99 label Oct 30, 2021
@Congrool
Copy link
Member Author

Congrool commented Oct 30, 2021

First we check the configmap to ensure yurtctl-lock and yurt-tunnel-nodes exsit.
Then revert the cluster and check whether both configmaps are deleted or not.
Here's the log.

ys3@ys-desktop:~/Github/openyurt$ kubectl get cm -A
NAMESPACE            NAME                                 DATA   AGE
default              kube-root-ca.crt                     1      26m
kube-node-lease      kube-root-ca.crt                     1      26m
kube-public          cluster-info                         2      26m
kube-public          kube-root-ca.crt                     1      26m
kube-system          coredns                              1      26m
kube-system          extension-apiserver-authentication   6      27m
kube-system          kube-proxy                           2      26m
kube-system          kube-root-ca.crt                     1      26m
kube-system          kubeadm-config                       2      26m
kube-system          kubelet-config-1.20                  1      26m
kube-system          yurt-hub-cfg                         1      3m
kube-system          yurt-tunnel-nodes                    1      2m39s
kube-system          yurt-tunnel-server-cfg               4      3m
kube-system          yurtctl-lock                         0      3m51s
local-path-storage   kube-root-ca.crt                     1      26m
local-path-storage   local-path-config                    1      26m
ys3@ys-desktop:~/Github/openyurt$ ./_output/local/bin/linux/amd64/yurtctl revert --yurtctl-servant-image=openyurt/yurtctl-servant:v0.5.0-amd64-555716d
I1030 15:05:47.613824 1264334 revert.go:165] yurt controller manager is removed
I1030 15:05:47.640730 1264334 revert.go:175] serviceaccount for yurt controller manager is removed
I1030 15:05:47.655199 1264334 revert.go:185] clusterrole for yurt controller manager is removed
I1030 15:05:47.715017 1264334 revert.go:195] clusterrolebinding for yurt controller manager is removed
I1030 15:06:39.439657 1264334 util.go:494] servant job(yurtctl-enable-node-controller-openyurt-e2e-test-control-plane) has succeeded
I1030 15:06:39.439821 1264334 revert.go:220] complete enabling node-controller
I1030 15:06:59.497155 1264334 util.go:494] servant job(yurtctl-servant-revert-openyurt-e2e-test-worker) has succeeded
I1030 15:06:59.497283 1264334 revert.go:233] complete removing yurt-hub and resetting kubelet service on edge nodes
I1030 15:07:19.545228 1264334 util.go:494] servant job(yurtctl-servant-revert-openyurt-e2e-test-control-plane) has succeeded
I1030 15:07:19.545369 1264334 revert.go:241] complete removing yurt-hub and resetting kubelet service on cloud nodes
I1030 15:07:19.713284 1264334 revert.go:249] delete yurthub clusterrole and clusterrolebinding
ys3@ys-desktop:~/Github/openyurt$ kubectl get cm -A
NAMESPACE            NAME                                 DATA   AGE
default              kube-root-ca.crt                     1      30m
kube-node-lease      kube-root-ca.crt                     1      30m
kube-public          cluster-info                         2      30m
kube-public          kube-root-ca.crt                     1      30m
kube-system          coredns                              1      30m
kube-system          extension-apiserver-authentication   6      30m
kube-system          kube-proxy                           2      30m
kube-system          kube-root-ca.crt                     1      30m
kube-system          kubeadm-config                       2      30m
kube-system          kubelet-config-1.20                  1      30m
local-path-storage   kube-root-ca.crt                     1      30m
local-path-storage   local-path-config                    1      30m

We can find that both yurtctl-lock and yurt-tunnel-nodes have been deleted.

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Congrool, rambohe-ch

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

@openyurt-bot openyurt-bot merged commit 3f48d43 into openyurtio:master Nov 2, 2021
@Congrool Congrool deleted the yurtctlclean branch December 27, 2021 10:11
MrGirl pushed a commit to MrGirl/openyurt that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/bug kind/bug lgtm lgtm size/M size/M: 30-99
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] yurtctl revert should delete cm yurt-tunnel-nodes
3 participants