Populate chaos proxies via http call
What does this MR do and why?
I realised that there is a bug in how we initially implemented how we populate the proxies for chaos testing. The initial implementation was naive and assumed we could access the docker container running by using localhost:8474
. However this is not true for our runners, as they do not allow connecting via localhost
- instead we would need to use the DNS name docker:8474
.
In order to have a solution that would be practical for developing or running locally and on the pipelines, we could have considered using an ENV but that adds extra configuration, so instead proposing we use a curl
docker image, attached to the same docker network as the container to populate the proxies without needing any additional configuration.
How to set up and validate locally
- I had been seeing errors in https://gitlab.com/gitlab-org/gitlab/-/jobs/3202785454 - Note the
Failed to open TCP connection to localhost:8474 (Cannot assign requested address - connect(2) for "localhost" port 8474)
errors on this job. - This fix can be seen to work in https://gitlab.com/gitlab-org/gitlab/-/jobs/3206562392 in addition to the pipelines on this MR.
bundle exec exe/gitlab-qa Test::Integration::Chaos EE --no-tests
curl http://localhost:8474/proxies
# - you should see a list of the proxies configured
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.