diff --git a/extensions/base/suite.go b/extensions/base/suite.go index 739fe5638f..309b45e855 100644 --- a/extensions/base/suite.go +++ b/extensions/base/suite.go @@ -52,7 +52,7 @@ func (s *Suite) TearDownSuite() { } const ( - sha = "21a1077bbd46da2aef9bba8ee08fe2410c00bd00" + sha = "34cbe565c5354465a8c067341cb1a3da65dcccd6" ) // SetupSuite runs all extensions diff --git a/suites/basic/suite.gen.go b/suites/basic/suite.gen.go index 47c63b6018..88d847cf3b 100755 --- a/suites/basic/suite.gen.go +++ b/suites/basic/suite.gen.go @@ -28,7 +28,7 @@ func (s *Suite) SetupSuite() { r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl delete mutatingwebhookconfiguration ${WH}` + "\n" + `kubectl delete ns nsm-system`) }) r.Run(`kubectl create ns nsm-system`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system`) } func (s *Suite) TestKernel2Kernel() { @@ -37,7 +37,7 @@ func (s *Suite) TestKernel2Kernel() { r.Run(`kubectl delete ns ns-kernel2kernel`) }) r.Run(`kubectl create ns ns-kernel2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2kernel`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -51,7 +51,7 @@ func (s *Suite) TestKernel2Memif() { r.Run(`kubectl delete ns ns-kernel2memif`) }) r.Run(`kubectl create ns ns-kernel2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-kernel2memif`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -65,7 +65,7 @@ func (s *Suite) TestKernel2Vxlan2Kernel() { r.Run(`kubectl delete ns ns-kernel2vxlan2kernel`) }) r.Run(`kubectl create ns ns-kernel2vxlan2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2vxlan2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2vxlan2kernel`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2vxlan2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -79,7 +79,7 @@ func (s *Suite) TestKernel2Vxlan2Memif() { r.Run(`kubectl delete ns ns-kernel2vxlan2memif`) }) r.Run(`kubectl create ns ns-kernel2vxlan2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2vxlan2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-kernel2vxlan2memif`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2vxlan2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -93,7 +93,7 @@ func (s *Suite) TestKernel2Wireguard2Kernel() { r.Run(`kubectl delete ns ns-kernel2wireguard2kernel`) }) r.Run(`kubectl create ns ns-kernel2wireguard2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Wireguard2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Wireguard2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2wireguard2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2wireguard2kernel`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2wireguard2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -107,7 +107,7 @@ func (s *Suite) TestKernel2Wireguard2Memif() { r.Run(`kubectl delete ns ns-kernel2wireguard2memif`) }) r.Run(`kubectl create ns ns-kernel2wireguard2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Wireguard2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Wireguard2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2wireguard2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-kernel2wireguard2memif`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2wireguard2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -121,7 +121,7 @@ func (s *Suite) TestMemif2Kernel() { r.Run(`kubectl delete ns ns-memif2kernel`) }) r.Run(`kubectl create ns ns-memif2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-memif2kernel`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -135,7 +135,7 @@ func (s *Suite) TestMemif2Memif() { r.Run(`kubectl delete ns ns-memif2memif`) }) r.Run(`kubectl create ns ns-memif2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-memif2memif`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -149,7 +149,7 @@ func (s *Suite) TestMemif2Vxlan2Kernel() { r.Run(`kubectl delete ns ns-memif2vxlan2kernel`) }) r.Run(`kubectl create ns ns-memif2vxlan2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Vxlan2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Vxlan2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2vxlan2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-memif2vxlan2kernel`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2vxlan2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -163,7 +163,7 @@ func (s *Suite) TestMemif2Vxlan2Memif() { r.Run(`kubectl delete ns ns-memif2vxlan2memif`) }) r.Run(`kubectl create ns ns-memif2vxlan2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Vxlan2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Vxlan2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2vxlan2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-memif2vxlan2memif`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2vxlan2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -177,7 +177,7 @@ func (s *Suite) TestMemif2Wireguard2Kernel() { r.Run(`kubectl delete ns ns-memif2wireguard2kernel`) }) r.Run(`kubectl create ns ns-memif2wireguard2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Wireguard2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Wireguard2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2wireguard2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-memif2wireguard2kernel`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2wireguard2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -191,7 +191,7 @@ func (s *Suite) TestMemif2Wireguard2Memif() { r.Run(`kubectl delete ns ns-memif2wireguard2memif`) }) r.Run(`kubectl create ns ns-memif2wireguard2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Wireguard2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Wireguard2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2wireguard2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-memif2wireguard2memif`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2wireguard2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) diff --git a/suites/features/suite.gen.go b/suites/features/suite.gen.go index e53038c1b2..4d8090c82b 100755 --- a/suites/features/suite.gen.go +++ b/suites/features/suite.gen.go @@ -29,10 +29,10 @@ func (s *Suite) TestAnnotated_namespace() { s.T().Cleanup(func() { r.Run(`kubectl delete ns ns-annotated-namespace`) }) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/annotated-namespace?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/annotated-namespace?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-annotated-namespace`) r.Run(`kubectl annotate ns ns-annotated-namespace networkservicemesh.io=kernel://annotated-namespace/nsm-1`) - r.Run(`kubectl apply -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/2dbc67a434ce864fe0aca418e578d2fa78e2fcb6/examples/features/annotated-namespace/client.yaml`) + r.Run(`kubectl apply -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/2828e1f02618ec4e05fecb8a1124eaeb28450eb3/examples/features/annotated-namespace/client.yaml`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-annotated-namespace`) r.Run(`NSE=$(kubectl get pods -l app=nse-kernel -n ns-annotated-namespace --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-annotated-namespace --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -45,7 +45,7 @@ func (s *Suite) TestDns() { r.Run(`kubectl delete ns ns-dns`) }) r.Run(`kubectl create ns ns-dns`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dns?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dns?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=5m pod dnsutils -n ns-dns`) r.Run(`kubectl wait --for=condition=ready --timeout=5m pod -l app=nse-kernel -n ns-dns`) r.Run(`NSC=$(kubectl get pods -l app=dnsutils -n ns-dns --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -60,7 +60,7 @@ func (s *Suite) TestKernel2Kernel_dual_stack() { r.Run(`kubectl delete ns ns-kernel2kernel-dual-stack`) }) r.Run(`kubectl create ns ns-kernel2kernel-dual-stack`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dual-stack/Kernel2Kernel_dual_stack?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dual-stack/Kernel2Kernel_dual_stack?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2kernel-dual-stack`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2kernel-dual-stack`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2kernel-dual-stack --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -76,7 +76,7 @@ func (s *Suite) TestKernel2Wireguard2Kernel_dual_stack() { r.Run(`kubectl delete ns ns-kernel2wireguard2kernel-dual-stack`) }) r.Run(`kubectl create ns ns-kernel2wireguard2kernel-dual-stack`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dual-stack/Kernel2Wireguard2Kernel_dual_stack?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/dual-stack/Kernel2Wireguard2Kernel_dual_stack?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2wireguard2kernel-dual-stack`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2wireguard2kernel-dual-stack`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2wireguard2kernel-dual-stack --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -93,7 +93,7 @@ func (s *Suite) TestExclude_prefixes() { }) r.Run(`kubectl create ns ns-exclude-prefixes`) r.Run(`kubectl apply -f exclude-prefixes-config-map.yaml`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/exclude-prefixes?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/exclude-prefixes?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel -n ns-exclude-prefixes`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-exclude-prefixes`) r.Run(`NSC=$(kubectl get pods -l app=nsc-kernel -n ns-exclude-prefixes --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -107,7 +107,7 @@ func (s *Suite) TestExclude_prefixes_client() { r.Run(`kubectl delete ns ns-exclude-prefixes-client`) }) r.Run(`kubectl create ns ns-exclude-prefixes-client`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/exclude-prefixes-client?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/exclude-prefixes-client?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-exclude-prefixes-client`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel-1 -n ns-exclude-prefixes-client`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel-2 -n ns-exclude-prefixes-client`) @@ -125,7 +125,7 @@ func (s *Suite) TestKernel2Kernel_ipv6() { r.Run(`kubectl delete ns ns-kernel2kernel-ipv6`) }) r.Run(`kubectl create ns ns-kernel2kernel-ipv6`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Kernel_ipv6?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Kernel_ipv6?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2kernel-ipv6`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2kernel-ipv6`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2kernel-ipv6 --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -139,7 +139,7 @@ func (s *Suite) TestKernel2Wireguard2Kernel_ipv6() { r.Run(`kubectl delete ns ns-kernel2wireguard2kernel-ipv6`) }) r.Run(`kubectl create ns ns-kernel2wireguard2kernel-ipv6`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Wireguard2Kernel_ipv6?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Wireguard2Kernel_ipv6?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2wireguard2kernel-ipv6`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2wireguard2kernel-ipv6`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2wireguard2kernel-ipv6 --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -153,7 +153,7 @@ func (s *Suite) TestKernel2Wireguard2Memif_ipv6() { r.Run(`kubectl delete ns ns-kernel2wireguard2memif-ipv6`) }) r.Run(`kubectl create ns ns-kernel2wireguard2memif-ipv6`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Wireguard2Memif_ipv6?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Kernel2Wireguard2Memif_ipv6?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2wireguard2memif-ipv6`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-kernel2wireguard2memif-ipv6`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2wireguard2memif-ipv6 --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -181,7 +181,7 @@ func (s *Suite) TestMemif2Wireguard2Kernel_ipv6() { r.Run(`kubectl delete ns ns-memif2wireguard2kernel-ipv6`) }) r.Run(`kubectl create ns ns-memif2wireguard2kernel-ipv6`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Memif2Wireguard2Kernel_ipv6?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Memif2Wireguard2Kernel_ipv6?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2wireguard2kernel-ipv6`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-memif2wireguard2kernel-ipv6`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2wireguard2kernel-ipv6 --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -195,7 +195,7 @@ func (s *Suite) TestMemif2Wireguard2Memif_ipv6() { r.Run(`kubectl delete ns ns-memif2wireguard2memif-ipv6`) }) r.Run(`kubectl create ns ns-memif2wireguard2memif-ipv6`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Memif2Wireguard2Memif_ipv6?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/ipv6/Memif2Wireguard2Memif_ipv6?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2wireguard2memif-ipv6`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-memif2wireguard2memif-ipv6`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2wireguard2memif-ipv6 --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -209,7 +209,7 @@ func (s *Suite) TestMutually_aware_nses() { r.Run(`kubectl delete ns ns-mutually-aware-nses`) }) r.Run(`kubectl create ns ns-mutually-aware-nses`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/mutually-aware-nses?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/mutually-aware-nses?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel -n ns-mutually-aware-nses`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel-1 -n ns-mutually-aware-nses`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel-2 -n ns-mutually-aware-nses`) @@ -224,7 +224,7 @@ func (s *Suite) TestNse_composition() { r.Run(`kubectl delete ns ns-nse-composition`) }) r.Run(`kubectl create ns ns-nse-composition`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/nse-composition?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/nse-composition?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-nse-composition`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-nse-composition`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-nse-composition --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -240,7 +240,7 @@ func (s *Suite) TestOpa() { r.Run(`kubectl delete ns ns-opa`) }) r.Run(`kubectl create ns ns-opa`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/opa?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/opa?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel -n ns-opa`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-opa`) r.Run(`NSC=$(kubectl get pods -l app=nsc-kernel -n ns-opa --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -253,7 +253,7 @@ func (s *Suite) TestPolicy_based_routing() { r.Run(`kubectl delete ns ns-policy-based-routing`) }) r.Run(`kubectl create ns ns-policy-based-routing`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/policy-based-routing?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/policy-based-routing?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nettools -n ns-policy-based-routing`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-policy-based-routing`) r.Run(`NSC=$(kubectl get pods -l app=nettools -n ns-policy-based-routing --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -274,7 +274,7 @@ func (s *Suite) TestScale_from_zero() { }) r.Run(`kubectl create ns ns-scale-from-zero`) r.Run(`NODES=($(kubectl get nodes -o go-template='{{range .items}}{{ if not .spec.taints }}{{ .metadata.name }} {{end}}{{end}}'))` + "\n" + `NSC_NODE=${NODES[0]}` + "\n" + `SUPPLIER_NODE=${NODES[1]}` + "\n" + `if [ "$SUPPLIER_NODE" == "" ]; then SUPPLIER_NODE=$NSC_NODE; echo "Only 1 node found, testing that pod is created on the same node is useless"; fi`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/scale-from-zero?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/scale-from-zero?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n ns-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nse-supplier-k8s`) r.Run(`kubectl wait -n ns-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nsc-kernel`) r.Run(`kubectl wait -n ns-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nse-icmp-responder`) @@ -292,7 +292,7 @@ func (s *Suite) TestSelect_forwarder() { r.Run(`kubectl delete ns ns-select-forwarder`) }) r.Run(`kubectl create ns ns-select-forwarder`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/select-forwarder?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/select-forwarder?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-select-forwarder`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-select-forwarder`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-select-forwarder --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -307,7 +307,7 @@ func (s *Suite) TestVl3_basic() { r.Run(`kubectl delete ns ns-vl3`) }) r.Run(`kubectl create ns ns-vl3`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-basic?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-basic?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`nscs=$(kubectl get pods -l app=nsc-kernel -o go-template --template="{{range .items}}{{.metadata.name}} {{end}}" -n ns-vl3) ` + "\n" + `[[ ! -z $nscs ]]`) r.Run(`for nsc in $nscs ` + "\n" + `do` + "\n" + ` ipAddr=$(kubectl exec -n ns-vl3 $nsc -- ifconfig nsm-1)` + "\n" + ` ipAddr=$(echo $ipAddr | grep -Eo 'inet addr:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'| cut -c 11-)` + "\n" + ` for pinger in $nscs` + "\n" + ` do` + "\n" + ` echo $pinger pings $ipAddr` + "\n" + ` kubectl exec $pinger -n ns-vl3 -- ping -c4 $ipAddr` + "\n" + ` done` + "\n" + `done`) r.Run(`for nsc in $nscs ` + "\n" + `do` + "\n" + ` echo $nsc pings nses` + "\n" + ` kubectl exec -n ns-vl3 $nsc -- ping 169.254.0.0 -c4` + "\n" + ` kubectl exec -n ns-vl3 $nsc -- ping 169.254.1.0 -c4` + "\n" + `done`) @@ -317,7 +317,7 @@ func (s *Suite) TestVl3_dns() { s.T().Cleanup(func() { r.Run(`kubectl delete ns ns-vl3-dns`) }) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-dns?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-dns?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`nscs=$(kubectl get pods -l app=alpine -o go-template --template="{{range .items}}{{.metadata.name}} {{end}}" -n ns-vl3-dns) ` + "\n" + `[[ ! -z $nscs ]]`) r.Run(`for nsc in $nscs ` + "\n" + `do` + "\n" + ` for pinger in $nscs` + "\n" + ` do` + "\n" + ` kubectl exec $pinger -n ns-vl3-dns -- ping -c4 $nsc.vl3-dns` + "\n" + ` done` + "\n" + `done`) } @@ -327,7 +327,7 @@ func (s *Suite) TestVl3_scale_from_zero() { r.Run(`kubectl delete ns ns-vl3-scale-from-zero`) }) r.Run(`kubectl create ns ns-vl3-scale-from-zero`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-scale-from-zero?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/vl3-scale-from-zero?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n ns-vl3-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nse-supplier-k8s`) r.Run(`kubectl wait -n ns-vl3-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nsc-kernel`) r.Run(`kubectl wait -n ns-vl3-scale-from-zero --for=condition=ready --timeout=1m pod -l app=nse-vl3-vpp`) @@ -341,7 +341,7 @@ func (s *Suite) TestWebhook() { r.Run(`kubectl delete ns ns-webhook`) }) r.Run(`kubectl create ns ns-webhook`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/webhook?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/webhook?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=5m pod -l app=nse-kernel -n ns-webhook`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nettools -n ns-webhook`) r.Run(`NSC=$(kubectl get pods -l app=nettools -n ns-webhook --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) diff --git a/suites/floating_interdomain/spire/suite.gen.go b/suites/floating_interdomain/spire/suite.gen.go index 2123c78b27..1a12eaa83a 100755 --- a/suites/floating_interdomain/spire/suite.gen.go +++ b/suites/floating_interdomain/spire/suite.gen.go @@ -29,15 +29,15 @@ func (s *Suite) SetupSuite() { r.Run(`[[ ! -z $KUBECONFIG2 ]]`) r.Run(`[[ ! -z $KUBECONFIG3 ]]`) r.Run(`export KUBECONFIG=$KUBECONFIG1`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster1?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster1?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-agent`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-server`) r.Run(`export KUBECONFIG=$KUBECONFIG2`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster2?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster2?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-agent`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-server`) r.Run(`export KUBECONFIG=$KUBECONFIG3`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster3?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/floating_interdomain/spire/cluster3?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-agent`) r.Run(`kubectl wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-server`) r.Run(`export KUBECONFIG=$KUBECONFIG1 && bundle1=$(kubectl exec spire-server-0 -n spire -- bin/spire-server bundle show -format spiffe)` + "\n" + `export KUBECONFIG=$KUBECONFIG2 && bundle2=$(kubectl exec spire-server-0 -n spire -- bin/spire-server bundle show -format spiffe)` + "\n" + `export KUBECONFIG=$KUBECONFIG3 && bundle3=$(kubectl exec spire-server-0 -n spire -- bin/spire-server bundle show -format spiffe)`) diff --git a/suites/floating_interdomain/suite.gen.go b/suites/floating_interdomain/suite.gen.go index 0d2f99a222..bfa249093e 100755 --- a/suites/floating_interdomain/suite.gen.go +++ b/suites/floating_interdomain/suite.gen.go @@ -55,14 +55,14 @@ func (s *Suite) TestFloatingKernel2Vxlan2Kernel() { r.Run(`kubectl delete ns ${NAMESPACE2}`) }) r.Run(`export KUBECONFIG=$KUBECONFIG2`) - r.Run(`NAMESPACE1=($(kubectl create -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/2dbc67a434ce864fe0aca418e578d2fa78e2fcb6/examples/floating_interdomain/usecases/namespace.yaml)[0])` + "\n" + `NAMESPACE1=${NAMESPACE1:10}`) - r.Run(`cat > kustomization.yaml < kustomization.yaml < patch-nse.yaml < kustomization.yaml < kustomization.yaml < patch-nsc.yaml < kustomization.yaml < kustomization.yaml < kustomization.yaml < patch-nsc.yaml < kustomization.yaml < kustomization.yaml < kustomization.yaml < kustomization.yaml < kustomization.yaml < kustomization.yaml < patch-nse.yaml < kustomization.yaml < kustomization.yaml < patch-nsc.yaml < kustomization.yaml < kustomization.yaml < patch-nse.yaml < kustomization.yaml < kustomization.yaml < patch-nsc.yaml < control-plane.yaml`) - r.Run(`cat > kustomization.yaml < kustomization.yaml < docker-compose.override.yaml < docker-compose.override.yaml </dev/null 2>&1 & \` + "\n" + `'`) + r.Run(`kubectl -n ns-kernel2kernel-vfio2noop exec ${NSE_VFIO} --container ponger -- /bin/bash -c '\` + "\n" + ` (sleep 10 && kill $(pgrep "pingpong")) 1>/dev/null 2>&1 & \` + "\n" + `'`) r.Run(`kubectl delete ns ns-kernel2kernel-vfio2noop`) }) r.Run(`kubectl create ns ns-kernel2kernel-vfio2noop`) - r.Run(`function mac_create(){` + "\n" + ` echo -n 00` + "\n" + ` dd bs=1 count=5 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02x"'` + "\n" + `}`) - r.Run(`CLIENT_MAC=$(mac_create)` + "\n" + `echo Client MAC: ${CLIENT_MAC}`) - r.Run(`SERVER_MAC=$(mac_create)` + "\n" + `echo Server MAC: ${SERVER_MAC}`) - r.Run(`cat > patch-nse-vfio.yaml <"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) + r.Run(`function dpdk_ping() {` + "\n" + ` err_file="$(mktemp)"` + "\n" + ` trap 'rm -f "${err_file}"' RETURN` + "\n" + `` + "\n" + ` client_mac="$1"` + "\n" + ` server_mac="$2"` + "\n" + `` + "\n" + ` command="/root/dpdk-pingpong/build/pingpong \` + "\n" + ` --no-huge \` + "\n" + ` -- \` + "\n" + ` -n 500 \` + "\n" + ` -c \` + "\n" + ` -C ${client_mac} \` + "\n" + ` -S ${server_mac}` + "\n" + ` "` + "\n" + ` out="$(kubectl -n ns-kernel2kernel-vfio2noop exec ${NSC_VFIO} --container pinger -- /bin/bash -c "${command}" 2>"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) r.Run(`kubectl exec ${NSC_KERNEL} -n ns-kernel2kernel-vfio2noop -- ping -c 4 172.16.1.100`) r.Run(`kubectl exec ${NSE_KERNEL} -n ns-kernel2kernel-vfio2noop -- ping -c 4 172.16.1.101`) - r.Run(`dpdk_ping ${CLIENT_MAC} ${SERVER_MAC}`) + r.Run(`dpdk_ping "0a:55:44:33:22:00" "0a:55:44:33:22:11"`) } func (s *Suite) TestKernel2Vxlan2Kernel() { r := s.Runner("../deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel") @@ -76,7 +72,7 @@ func (s *Suite) TestKernel2Vxlan2Kernel() { r.Run(`kubectl delete ns ns-kernel2vxlan2kernel`) }) r.Run(`kubectl create ns ns-kernel2vxlan2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2vxlan2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2vxlan2kernel`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2vxlan2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -85,18 +81,14 @@ func (s *Suite) TestKernel2Vxlan2Kernel() { r.Run(`kubectl exec ${NSE} -n ns-kernel2vxlan2kernel -- ping -c 4 172.16.1.101`) } func (s *Suite) TestKernel2Vxlan2Kernel_Vfio2Noop() { - r := s.Runner("../deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel&Vfio2Noop") + r := s.Runner("../deployments-k8s/examples/use-cases/Kernel2Vxlan2Kernel_Vfio2Noop") s.T().Cleanup(func() { r.Run(`NSE_VFIO=$(kubectl get pods -l app=nse-vfio -n ns-kernel2vxlan2kernel-vfio2noop --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) - r.Run(`kubectl -n ns-kernel2vxlan2kernel-vfio2noop exec ${NSE_VFIO} --container ponger -- /bin/bash -c '\` + "\n" + ` sleep 10 && kill $(pgrep "pingpong") 1>/dev/null 2>&1 & \` + "\n" + `'`) + r.Run(`kubectl -n ns-kernel2vxlan2kernel-vfio2noop exec ${NSE_VFIO} --container ponger -- /bin/bash -c '\` + "\n" + ` (sleep 10 && kill $(pgrep "pingpong")) 1>/dev/null 2>&1 & \` + "\n" + `'`) r.Run(`kubectl delete ns ns-kernel2vxlan2kernel-vfio2noop`) }) r.Run(`kubectl create ns ns-kernel2vxlan2kernel-vfio2noop`) - r.Run(`function mac_create(){` + "\n" + ` echo -n 00` + "\n" + ` dd bs=1 count=5 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02x"'` + "\n" + `}`) - r.Run(`CLIENT_MAC=$(mac_create)` + "\n" + `echo Client MAC: ${CLIENT_MAC}`) - r.Run(`SERVER_MAC=$(mac_create)` + "\n" + `echo Server MAC: ${SERVER_MAC}`) - r.Run(`cat > patch-nse-vfio.yaml <"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) + r.Run(`function dpdk_ping() {` + "\n" + ` err_file="$(mktemp)"` + "\n" + ` trap 'rm -f "${err_file}"' RETURN` + "\n" + `` + "\n" + ` client_mac="$1"` + "\n" + ` server_mac="$2"` + "\n" + `` + "\n" + ` command="/root/dpdk-pingpong/build/pingpong \` + "\n" + ` --no-huge \` + "\n" + ` -- \` + "\n" + ` -n 500 \` + "\n" + ` -c \` + "\n" + ` -C ${client_mac} \` + "\n" + ` -S ${server_mac}` + "\n" + ` "` + "\n" + ` out="$(kubectl -n ns-kernel2vxlan2kernel-vfio2noop exec ${NSC_VFIO} --container pinger -- /bin/bash -c "${command}" 2>"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) r.Run(`kubectl exec ${NSC_KERNEL} -n ns-kernel2vxlan2kernel-vfio2noop -- ping -c 4 172.16.1.100`) r.Run(`kubectl exec ${NSE_KERNEL} -n ns-kernel2vxlan2kernel-vfio2noop -- ping -c 4 172.16.1.101`) - r.Run(`dpdk_ping ${CLIENT_MAC} ${SERVER_MAC}`) + r.Run(`dpdk_ping "0a:55:44:33:22:00" "0a:55:44:33:22:11"`) } func (s *Suite) TestMemif2Memif() { r := s.Runner("../deployments-k8s/examples/use-cases/Memif2Memif") @@ -115,7 +107,7 @@ func (s *Suite) TestMemif2Memif() { r.Run(`kubectl delete ns ns-memif2memif`) }) r.Run(`kubectl create ns ns-memif2memif`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Memif?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Memif2Memif?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-memif -n ns-memif2memif`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-memif -n ns-memif2memif`) r.Run(`NSC=$(kubectl get pods -l app=nsc-memif -n ns-memif2memif --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -129,7 +121,7 @@ func (s *Suite) TestSriovKernel2Noop() { r.Run(`kubectl delete ns ns-sriov-kernel2noop`) }) r.Run(`kubectl create ns ns-sriov-kernel2noop`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/SriovKernel2Noop?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/SriovKernel2Noop?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl -n ns-sriov-kernel2noop wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel`) r.Run(`kubectl -n ns-sriov-kernel2noop wait --for=condition=ready --timeout=1m pod -l app=nse-kernel`) r.Run(`kubectl -n ns-sriov-kernel2noop wait --for=condition=ready --timeout=1m pod -l app=ponger`) @@ -140,18 +132,14 @@ func (s *Suite) TestVfio2Noop() { r := s.Runner("../deployments-k8s/examples/use-cases/Vfio2Noop") s.T().Cleanup(func() { r.Run(`NSE=$(kubectl -n ns-vfio2noop get pods -l app=nse-vfio --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) - r.Run(`kubectl -n ns-vfio2noop exec ${NSE} --container ponger -- /bin/bash -c '\` + "\n" + ` sleep 10 && kill $(pgrep "pingpong") 1>/dev/null 2>&1 & \` + "\n" + `'`) + r.Run(`kubectl -n ns-vfio2noop exec ${NSE} --container ponger -- /bin/bash -c '\` + "\n" + ` (sleep 10 && kill $(pgrep "pingpong")) 1>/dev/null 2>&1 & \` + "\n" + `'`) r.Run(`kubectl delete ns ns-vfio2noop`) }) r.Run(`kubectl create ns ns-vfio2noop`) - r.Run(`function mac_create(){` + "\n" + ` echo -n 00` + "\n" + ` dd bs=1 count=5 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02x"'` + "\n" + `}`) - r.Run(`CLIENT_MAC=$(mac_create)` + "\n" + `echo Client MAC: ${CLIENT_MAC}`) - r.Run(`SERVER_MAC=$(mac_create)` + "\n" + `echo Server MAC: ${SERVER_MAC}`) - r.Run(`cat > patch-nse-vfio.yaml <"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) - r.Run(`dpdk_ping ${CLIENT_MAC} ${SERVER_MAC}`) + r.Run(`function dpdk_ping() {` + "\n" + ` err_file="$(mktemp)"` + "\n" + ` trap 'rm -f "${err_file}"' RETURN` + "\n" + `` + "\n" + ` client_mac="$1"` + "\n" + ` server_mac="$2"` + "\n" + `` + "\n" + ` command="/root/dpdk-pingpong/build/pingpong \` + "\n" + ` --no-huge \` + "\n" + ` -- \` + "\n" + ` -n 500 \` + "\n" + ` -c \` + "\n" + ` -C ${client_mac} \` + "\n" + ` -S ${server_mac}` + "\n" + ` "` + "\n" + ` out="$(kubectl -n ns-vfio2noop exec ${NSC_VFIO} --container pinger -- /bin/bash -c "${command}" 2>"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) + r.Run(`dpdk_ping "0a:55:44:33:22:00" "0a:55:44:33:22:11"`) } diff --git a/suites/observability/suite.gen.go b/suites/observability/suite.gen.go index d5c25d67d9..7ca7effc41 100755 --- a/suites/observability/suite.gen.go +++ b/suites/observability/suite.gen.go @@ -31,13 +31,13 @@ func (s *Suite) TestJaeger_and_prometheus() { r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl delete mutatingwebhookconfiguration ${WH}` + "\n" + `kubectl delete ns nsm-system`) r.Run(`kubectl describe pods -n observability` + "\n" + `kubectl delete ns observability` + "\n" + `pkill -f "port-forward"`) }) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait -n observability --timeout=1m --for=condition=ready pod -l app=opentelemetry`) r.Run(`kubectl create ns nsm-system`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus/nsm-system?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus/nsm-system?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system`) r.Run(`kubectl create ns ns-jaeger-and-prometheus`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus/example?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/observability/jaeger-and-prometheus/example?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-jaeger-and-prometheus`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-jaeger-and-prometheus`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-jaeger-and-prometheus --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) diff --git a/suites/ovs/suite.gen.go b/suites/ovs/suite.gen.go index 4e75076d06..56e96a362d 100755 --- a/suites/ovs/suite.gen.go +++ b/suites/ovs/suite.gen.go @@ -28,7 +28,7 @@ func (s *Suite) SetupSuite() { r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl delete mutatingwebhookconfiguration ${WH}` + "\n" + `kubectl delete ns nsm-system`) }) r.Run(`kubectl create ns nsm-system`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/ovs?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/ovs?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system`) } func (s *Suite) TestWebhook_smartvf() { @@ -38,7 +38,7 @@ func (s *Suite) TestWebhook_smartvf() { }) r.Run(`kubectl create ns ns-webhook`) r.Run(`WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')` + "\n" + `kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/webhook-smartvf?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/webhook-smartvf?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=5m pod -l app=nse-kernel -n ns-webhook-smartvf`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod postgres-cl -n ns-webhook-smartvf`) r.Run(`NSC=$(kubectl get pods -l app=postgres-cl -n ns-webhook-smartvf --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -51,7 +51,7 @@ func (s *Suite) TestKernel2Kernel() { r.Run(`kubectl delete ns ns-kernel2kernel`) }) r.Run(`kubectl create ns ns-kernel2kernel`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Kernel?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2Kernel?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-kernel2kernel`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2kernel`) r.Run(`NSC=$(kubectl get pods -l app=alpine -n ns-kernel2kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) @@ -65,7 +65,7 @@ func (s *Suite) TestKernel2KernelVLAN() { r.Run(`kubectl delete ns ns-kernel2kernel-vlan`) }) r.Run(`kubectl create ns ns-kernel2kernel-vlan`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2KernelVLAN?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/Kernel2KernelVLAN?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel -n ns-kernel2kernel-vlan`) r.Run(`kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-kernel2kernel-vlan`) r.Run(`NSC=$((kubectl get pods -l app=nsc-kernel -n ns-kernel2kernel-vlan --template '{{range .items}}{{.metadata.name}}{{" "}}{{end}}') | cut -d' ' -f1)` + "\n" + `TARGET_IP=$(kubectl exec -ti ${NSC} -n ns-kernel2kernel-vlan -- ip route show | grep 172.16 | cut -d' ' -f1)`) @@ -78,7 +78,7 @@ func (s *Suite) TestSmartVF2SmartVF() { r.Run(`kubectl delete ns ns-smartvf2smartvf`) }) r.Run(`kubectl create ns ns-smartvf2smartvf`) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/SmartVF2SmartVF?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/use-cases/SmartVF2SmartVF?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl -n ns-smartvf2smartvf wait --for=condition=ready --timeout=1m pod -l app=nsc-kernel`) r.Run(`kubectl -n ns-smartvf2smartvf wait --for=condition=ready --timeout=1m pod -l app=nse-kernel`) r.Run(`NSC=$(kubectl -n ns-smartvf2smartvf get pods -l app=nsc-kernel --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')`) diff --git a/suites/remotevlan/rvlanovs/suite.gen.go b/suites/remotevlan/rvlanovs/suite.gen.go index ccfd76af26..896965fa2f 100755 --- a/suites/remotevlan/rvlanovs/suite.gen.go +++ b/suites/remotevlan/rvlanovs/suite.gen.go @@ -23,9 +23,9 @@ func (s *Suite) SetupSuite() { } r := s.Runner("../deployments-k8s/examples/remotevlan/rvlanovs") s.T().Cleanup(func() { - r.Run(`kubectl delete -k https://github.com/networkservicemesh/deployments-k8s/examples/remotevlan/rvlanovs?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl delete -k https://github.com/networkservicemesh/deployments-k8s/examples/remotevlan/rvlanovs?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) }) - r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/remotevlan/rvlanovs?ref=2dbc67a434ce864fe0aca418e578d2fa78e2fcb6`) + r.Run(`kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/remotevlan/rvlanovs?ref=2828e1f02618ec4e05fecb8a1124eaeb28450eb3`) r.Run(`kubectl -n nsm-system wait --for=condition=ready --timeout=2m pod -l app=forwarder-ovs`) } func (s *Suite) TestKernel2RVlanBreakout() { @@ -79,7 +79,7 @@ func (s *Suite) TestKernel2RVlanMultiNS() { r.Run(`kubectl apply -k ./ns-1`) r.Run(`cat > ns-2/second-client.yaml < ns-2/third-client.yaml < ns-2/patch-nse.yaml < ns-2/kustomization.yaml < ns-2/kustomization.yaml < client.yaml < ns-2/second-client.yaml < ns-2/third-client.yaml < ns-2/patch-nse.yaml < ns-2/kustomization.yaml < ns-2/kustomization.yaml < client.yaml </dev/null 2>&1 & \` + "\n" + `'`) + r.Run(`kubectl -n ns-vfio2noop exec ${NSE} --container ponger -- /bin/bash -c '\` + "\n" + ` (sleep 10 && kill $(pgrep "pingpong")) 1>/dev/null 2>&1 & \` + "\n" + `'`) r.Run(`kubectl delete ns ns-vfio2noop`) }) r.Run(`kubectl create ns ns-vfio2noop`) - r.Run(`function mac_create(){` + "\n" + ` echo -n 00` + "\n" + ` dd bs=1 count=5 if=/dev/random 2>/dev/null | hexdump -v -e '/1 ":%02x"'` + "\n" + `}`) - r.Run(`CLIENT_MAC=$(mac_create)` + "\n" + `echo Client MAC: ${CLIENT_MAC}`) - r.Run(`SERVER_MAC=$(mac_create)` + "\n" + `echo Server MAC: ${SERVER_MAC}`) - r.Run(`cat > patch-nse-vfio.yaml <"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) - r.Run(`dpdk_ping ${CLIENT_MAC} ${SERVER_MAC}`) + r.Run(`function dpdk_ping() {` + "\n" + ` err_file="$(mktemp)"` + "\n" + ` trap 'rm -f "${err_file}"' RETURN` + "\n" + `` + "\n" + ` client_mac="$1"` + "\n" + ` server_mac="$2"` + "\n" + `` + "\n" + ` command="/root/dpdk-pingpong/build/pingpong \` + "\n" + ` --no-huge \` + "\n" + ` -- \` + "\n" + ` -n 500 \` + "\n" + ` -c \` + "\n" + ` -C ${client_mac} \` + "\n" + ` -S ${server_mac}` + "\n" + ` "` + "\n" + ` out="$(kubectl -n ns-vfio2noop exec ${NSC_VFIO} --container pinger -- /bin/bash -c "${command}" 2>"${err_file}")"` + "\n" + `` + "\n" + ` if [[ "$?" != 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if ! pong_packets="$(echo "${out}" | grep "rx .* pong packets" | sed -E 's/rx ([0-9]*) pong packets/\1/g')"; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` if [[ "${pong_packets}" == 0 ]]; then` + "\n" + ` echo "${out}"` + "\n" + ` cat "${err_file}" 1>&2` + "\n" + ` return 1` + "\n" + ` fi` + "\n" + `` + "\n" + ` echo "${out}"` + "\n" + ` return 0` + "\n" + `}`) + r.Run(`dpdk_ping "0a:55:44:33:22:00" "0a:55:44:33:22:11"`) }