From eeaf6c8973d5dde96612e0212137408675fadf7a Mon Sep 17 00:00:00 2001 From: Maros Ondrejicka Date: Thu, 13 Oct 2022 15:38:17 +0200 Subject: misc: avoid permission issue when running envoy Because envoy didn't have permission for `envoy.log` file it would stop. This made tests involving envoy fail. Adding `ENVOY_UID` environment variable makes envoy run as root, which avoids the problem. Type: fix Signed-off-by: Maros Ondrejicka Change-Id: I910416ad1c87137396e7da89c13de7739ce74c70 --- .gitignore | 4 ++++ extras/hs-test/utils.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index aba513c91e5..be94f092580 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,7 @@ compile_commands.json # No test log files **/test-run-*-*-* +# host stack test framework +/extras/hs-test/vpp-data +/extras/hs-test/hs-test +/extras/hs-test/http_server diff --git a/extras/hs-test/utils.go b/extras/hs-test/utils.go index 25303591a43..ba40beedeaf 100755 --- a/extras/hs-test/utils.go +++ b/extras/hs-test/utils.go @@ -207,6 +207,7 @@ func startEnvoy(ctx context.Context, dockerInstance string) <-chan error { "-v", fmt.Sprintf("%s/envoy/proxy.yaml:/etc/envoy/envoy.yaml", wd), "-v", fmt.Sprintf("shared-vol:/tmp/%s", dockerInstance), "-v", fmt.Sprintf("%s/envoy:/tmp", wd), + "-e", "ENVOY_UID=0", "-e", "VCL_CONFIG=/tmp/vcl.conf", "envoyproxy/envoy-contrib:v1.21-latest"} fmt.Println(c) @@ -221,7 +222,7 @@ func startEnvoy(ctx context.Context, dockerInstance string) <-chan error { break } if count > 5 { - errCh <- fmt.Errorf("Failed to start envoy docker after %d attempts", count) + errCh <- fmt.Errorf("failed to start envoy docker after %d attempts", count) return } } -- cgit 1.2.3-korg