xds icon indicating copy to clipboard operation
xds copied to clipboard

Example of changes required to test out xds config with different envoy version

Open beezz opened this issue 5 years ago • 0 comments

This PR shows how to validate xDS configuration pulled by different envoy version, in this case, an old 1.11.0.

Reproduction steps:

  • Change the envoy version for the base image in xdsenvoy Dockerfile
  • Add the config you'd like to test out, in this case, it's access logs filter
  • Optionally comment out the cleanup part from runtests.sh to check the logs
  • ./runtests.sh

This will result in:

Tests failing for foo listener:

[2020-11-19 10:47:54]: Running tests
 ✓ /config_dump contains dynamicly configured foo cluster
 ✗ foo cluster response is from foo server
   (in test file tests/envoy.bats, line 14)
     `curl -f -s "${ENVOY_FOO_URL}" | grep "Server name: foo-"' failed
 ✓ /heatlhz endpoint is ok
 ✓ /config endpoint reports no error
 ✓ /v2/discovery:clusters select foo
 ✓ /v2/discovery:clusters select bar
 ✓ /v2/discovery:clusters select baz
 ✓ /v2/discovery:clusters select qux
 ✓ /v2/discovery:listeners select foo
 ✓ /v2/discovery:listeners select bar
 ✓ /v2/discovery:listeners select qux
 ✓ /v2/discovery:endpoints select foo
 ✓ /v2/discovery:endpoints select bar
 ✓ /v2/discovery:endpoints select qux
 ✓ /validate endpoint invalid configmap
 ✓ /validate endpoint valid configmap
 ✓ --validate from stdin invalid
 ✓ --validate from stdin valid
 ✓ --validate file invalid
 ✓ --validate file valid

20 tests, 1 failure

With a message in logs:

[2020-11-19 09:47:50.446][1][warning][config] [source/common/config/http_subscription_impl.cc:88] REST config update rejected: Error adding/updating listener(s) foo: Didn't find a registered implementation for name: 'envoy.access_loggers.file'

beezz avatar Nov 19 '20 09:11 beezz