-
Notifications
You must be signed in to change notification settings - Fork 713
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
add dry run e2e tests #2653
add dry run e2e tests #2653
Comments
@neolit123 It seems that we cannot run The I0412 10:01:39.066015 149 join.go:530] [preflight] Discovering cluster-info
I0412 10:01:39.067243 149 token.go:80] [discovery] Created cluster-info discovery client, requesting info from "127.0.0.1:6443"
I0412 10:01:39.101380 149 round_trippers.go:553] GET https://127.0.0.1:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s in 10 milliseconds
I0412 10:01:39.104282 149 token.go:217] [discovery] Failed to request cluster-info, will try again: Get "https://127.0.0.1:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 127.0.0.1:6443: connect: connection refused
I0412 10:01:45.026633 149 round_trippers.go:553] GET https://127.0.0.1:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s in 5 milliseconds
I0412 10:01:45.027445 149 token.go:217] [discovery] Failed to request cluster-info, will try again: Get "https://127.0.0.1:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 127.0.0.1:6443: connect: connection refused Therefore, we need at least one |
Hm, i think we should fix that and use a fake CM or the dry run client...In dryrun other API calls work like that. But if using the dry run client it means we will probably will have to skip validation of the CM as well 🤔 If you prefer we can merge the initial test job without the join test but it seems we have to fix it in k/k eventually. |
Emm... It doesn't look like the ... Maybe it requires a major refactor to use a fake client for |
i think the refactor is doable. we need to rename the "init" dry-run client to be a generic one and use it for "join" as well. we can merge the current PR, but keep this issue open until we can do that in k/k after code freeze for 1.24. |
@SataQiu looks like the current e2e tests are flaky. https://testgrid.k8s.io/sig-cluster-lifecycle-kubeadm#kubeadm-kinder-dryrun-latest the error is:
my guess is that we are running EDIT: unclear if alternatively this could be a weird bug where containerd in the nodes is simply refusing to start for some reason, and despite:
|
It looks like the |
Oh looks like @RA489 's PR deleted it in the 1.24 updates and i didn't see that.. Can you please send it again. |
Sure! |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Yeah, we can skip testing join in this PR but keep the related issue open.
Once k/k code freeze is lifted we should make the change in k/k and add the
join test. I don't think it's that complicated, but I haven't looked in
more detail.
…On Apr 12, 2022 17:57, "SataQiu" ***@***.***> wrote:
Emm... It doesn't look like the kubeadm join --dry-run command is using a
fake client at all.
https://github.com/kubernetes/kubernetes/blob/
7380fc735aca591325ae1fabf8dab194b40367de/cmd/kubeadm/app/
cmd/join.go#L551-L563
Maybe it requires a major refactor to use a fake client for kubeadm join
--dry-run :(
—
Reply to this email directly, view it on GitHub
<#2653 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRATAKANSC2YZPXQAO733VEWFNLANCNFSM5N5WID2A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
kubeadm is currently missing integration / e2e tests for
--dry-run
.this means if we happen to break our dry run support for a particular command (e.g.
init
) we will not know about it until users report it to us.xref #2649
kubeadm has integration tests here:
https://github.com/kubernetes/kubernetes/tree/master/cmd/kubeadm/test/cmd
these tests execute a precompiled kubeadm binary to perform some checks and look for exist status 0.
we can use the same method for the
init
,join
,reset
tests with--dry-run
.because the dry-run will be reentrant.
but we cannot use this method for
upgrade *
commands, because the--dry-run
for upgrade expects an existing cluster.to have everything in the same place we can add dry-run as part of kinder e2e test workflow:
https://github.com/kubernetes/kubeadm/tree/main/kinder/ci/workflows
the workflow can look like the following:
kubeadm init --dry-run
on it (add--upload-certs
and other special flags, how to test external CA?)kubeadm join --dry-run
on it (add--control-plane
,--certificate-key
and other flags?)kubeadm reset --dry-run
on itkubeadm init ...
to create an actual k8s nodekubeadm upgrade apply --dry-run
to dry run the "primary node" upgrade of this nodekubeadm upgrade node --dry-run
to dry run the "secondary node" upgrade of this nodetasks:
k/kubeadm: Add dry run e2e tests #2673
k/test-infra PR: kubeadm: add dryrun e2e test job test-infra#25997
TODO
TODO
The text was updated successfully, but these errors were encountered: