Closed Shike-Ada closed 2 years ago
Found a failing test:
porting workloads testing
/home/runner/work/karmada/karmada/test/e2e/porting_workloads_test.go:19
porting workloads from legacy clusters testing
/home/runner/work/karmada/karmada/test/e2e/porting_workloads_test.go:21
porting Deployments from legacy clusters testing
/home/runner/work/karmada/karmada/test/e2e/porting_workloads_test.go:40
------------------------------
[MCS] Multi-Cluster Service testing Connectivity testing
Export Service from source-clusters, import Service to destination-clusters
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:260
STEP: Creating ClusterPropagationPolicy(serviceexports-c6g-policy)
STEP: Creating ClusterPropagationPolicy(serviceimports-9st-policy)
STEP: Check if crd(multicluster.x-k8s.io/v1alpha1/ServiceExport) present on member clusters
I1214 15:16:29.577424 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member1)
I1214 15:16:34.624492 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member2)
I1214 15:16:39.663811 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member3)
STEP: Check if crd(multicluster.x-k8s.io/v1alpha1/ServiceImport) present on member clusters
I1214 15:16:39.670935 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member1)
I1214 15:16:39.678695 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member2)
I1214 15:16:39.686116 40089 customresourcedefine.go:58] Waiting for crd present on cluster(member3)
STEP: Creating Deployment(karmadatest-wcg/hello-2jh)
I1214 15:16:39.692804 40089 mcs_test.go:227] Create Deployment(karmadatest-wcg/hello-2jh) in member1 cluster
I1214 15:16:39.701538 40089 mcs_test.go:230] Create Service(karmadatest-wcg/hello-2jh) in member1 cluster
STEP: Creating Service(karmadatest-wcg/hello-2jh)
STEP: Wait Service(karmadatest-wcg/hello-2jh)'s EndpointSlice exist in member1 cluster
STEP: Create ServiceExport(karmadatest-wcg/hello-2jh)
STEP: Creating PropagationPolicy(karmadatest-wcg/export-hello-2jh-policy)
STEP: Wait EndpointSlices collected to namespace(karmadatest-wcg) in controller-plane
STEP: Create ServiceImport(karmadatest-wcg/hello-2jh)
STEP: Creating PropagationPolicy(karmadatest-wcg/import-hello-2jh-policy)
STEP: Wait derived-service(karmadatest-wcg/derived-hello-2jh) exist in member2 cluster
STEP: Wait EndpointSlices have been imported to member2 cluster
I1214 15:21:54.827869 40089 mcs_test.go:253] Delete Deployment(karmadatest-wcg/hello-2jh) in member1 cluster
STEP: Removing Deployment(karmadatest-wcg/hello-2jh)
STEP: Removing Service(karmadatest-wcg/hello-2jh)
I1214 15:21:54.841631 40089 mcs_test.go:256] Delete Service(karmadatest-wcg/hello-2jh) in member1 cluster
STEP: Removing ClusterPropagationPolicy(serviceimports-9st-policy)
STEP: Removing ClusterPropagationPolicy(serviceexports-c6g-policy)
• Failure [325.532 seconds]
[MCS] Multi-Cluster Service testing
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:178
Connectivity testing
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:220
Export Service from source-clusters, import Service to destination-clusters [It]
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:260
Timed out after 300.003s.
Expected
<int>: 0
to equal
<int>: 1
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:319
------------------------------
SSSSSSSSSSSS
Summarizing 1 Failure:
[Fail] [MCS] Multi-Cluster Service testing Connectivity testing [It] Export Service from source-clusters, import Service to destination-clusters
/home/runner/work/karmada/karmada/test/e2e/mcs_test.go:319
Ran 19 of 31 Specs in 804.028 seconds
FAIL! -- 18 Passed | 1 Failed | 0 Pending | 12 Skipped
--- FAIL: TestE2E (804.12s)
FAIL
/lgtm /approve
/hold @algebra2k @jrkeen Should we update the chart version as well? (since we do changed templates)
/hold @algebra2k @jrkeen Should we update the chart version as well? (since we do changed templates)
I think it`s necessary @Shike-Ada
Okay, I will try it soon.
Just update it to 0.0.3
should be ok.
By the way, could you please help check why the E2E is falling?
I think this may require modifying the K8S parameter, and I will try to inspect it soon.
You can ignore the FOSSA
check. There must be something wrong with the service. I'll look at it.
The e2e test can't pass and I do not know how to fix it. Maybe it exists incompatibility problem.
We've fixed several failing tests. So please rebase your code and try again.
It still doesn't work, and e2e test failed in the same function again..
It still doesn't work, and e2e test failed in the same function again.
Hi, @Shike-Ada. With the current pr, it's bound to happen. You can run hack/run-e2e.sh
in you local env.
To avoid running the case in full, you can specify a topic:
ginkgo -v -race -failFast -focus="XXX" ./test/e2e/
just modify the line in hack/run-e2e.sh
:
Sorry, I don't know rebase operation in the past and have known it now. And In my local env, I do not have enough resource to run it. Maybe I would use the online test.
Although having skipped a lot of use cases, a error has occurred.
Maybe @XiShanYongYe-Chang could help take a look since he is the test owner.
Maybe @XiShanYongYe-Chang could help take a look since he is the test owner.
@Shike-Ada, ok, let me have a look at my local site.
Hi, @Shike-Ada discovery.k8s.io/v1beta1
EndpointSlices are deprecated in favor of discovery.k8s.io/v1
, we can refer to https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md
So you need to update like this:
--- a/test/e2e/mcs_test.go
+++ b/test/e2e/mcs_test.go
@@ -232,7 +232,7 @@ var _ = ginkgo.Describe("[MCS] Multi-Cluster Service testing", func() {
ginkgo.By(fmt.Sprintf("Wait Service(%s/%s)'s EndpointSlice exist in %s cluster", demoService.Namespace, demoService.Name, serviceExportClusterName), func() {
gomega.Eventually(func(g gomega.Gomega) (int, error) {
- endpointSlices, err := exportClusterClient.DiscoveryV1beta1().EndpointSlices(demoService.Namespace).List(context.TODO(), metav1.ListOptions{
+ endpointSlices, err := exportClusterClient.DiscoveryV1().EndpointSlices(demoService.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: labels.Set{discoveryv1beta1.LabelServiceName: demoService.Name}.AsSelector().String(),
})
g.Expect(err).NotTo(gomega.HaveOccurred())
Update DiscoveryV1beta1()
to DiscoveryV1()
in all place.
Besides, we use discoveryv1beta1
in the controller, we also need to update it to discoveryv1
.
Hi @Shike-Ada, you can directly cherry-pick my commit: https://github.com/XiShanYongYe-Chang/karmada/commit/047e0d7997f93de95c23405751ff794f41870722
I have passed the CI on my local site.
Thanks for your help!@XiShanYongYe-Chang ! I will cherry-pick it in this day.
@Shike-Ada , It looks ok.
/cc @RainbowMango
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: RainbowMango
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/hold cancel
What type of PR is this?
/kind feature
What this PR does / why we need it: Upgrade k8s version to v1.21.7 Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer: The latest version of K8s image with v1.21.x is 7. Does this PR introduce a user-facing change?: