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 <maros.ondrejicka@pantheon.tech>
Change-Id: I910416ad1c87137396e7da89c13de7739ce74c70
This commit is contained in:
Maros Ondrejicka
2022-10-13 15:38:17 +02:00
committed by Maros O
parent ce62d6f01c
commit eeaf6c8973
2 changed files with 6 additions and 1 deletions

4
.gitignore vendored
View File

@ -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

View File

@ -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
}
}