From 876819b8b640a644bfff152e8efada5664ab9720 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Tue, 15 Oct 2024 01:12:49 +0300 Subject: [PATCH] e2e_node: fix mirror pod test Modified stopNfsServer function to wait until nfs rpc is unregistered. This should fix failing pull-kubernetes-node-arm64-ubuntu-serial-gce job. --- test/e2e_node/mirror_pod_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/e2e_node/mirror_pod_test.go b/test/e2e_node/mirror_pod_test.go index 314492cd5e6..70717c3a45b 100644 --- a/test/e2e_node/mirror_pod_test.go +++ b/test/e2e_node/mirror_pod_test.go @@ -233,9 +233,6 @@ var _ = SIGDescribe("MirrorPod", func() { ginkgo.By("Stopping the NFS server") stopNfsServer(f, nfsServerPod) - ginkgo.By("Waiting for NFS server to stop...") - time.Sleep(30 * time.Second) - ginkgo.By(fmt.Sprintf("Deleting the static nfs test pod: %s", staticPodName)) err = deleteStaticPod(podPath, staticPodName, ns) framework.ExpectNoError(err) @@ -303,7 +300,7 @@ func restartNfsServer(f *framework.Framework, serverPod *v1.Pod) { // pod's (only) container. This command changes the number of nfs server threads to 0, // thus closing all open nfs connections. func stopNfsServer(f *framework.Framework, serverPod *v1.Pod) { - const stopcmd = "/usr/sbin/rpc.nfsd 0" + const stopcmd = "rpc.nfsd 0 && for i in $(seq 200); do rpcinfo -p | grep -q nfs || break; sleep 1; done" _, _, err := e2evolume.PodExec(f, serverPod, stopcmd) framework.ExpectNoError(err) }