Summary
If a virtual node has two backends that share listening ports, the protocols of both listeners must be the same otherwise App Mesh will generate invalid Envoy configuration.
Steps to Reproduce
http virtual node:
virtualNodeName: http-example-local-node
spec:
listeners:
- portMapping:
port: 80
protocol: http
serviceDiscovery:
dns:
hostname: http.example.local
http virtual service
virtualServiceName: http.example.local
spec:
provider:
virtualNode:
virtualNodeName: http-example-local-node
http2 virtual node:
virtualNodeName: http2-example-local-node
spec:
listeners:
- portMapping:
port: 80
protocol: http2
serviceDiscovery:
dns:
hostname: http2.example.local
http2 virtual service
virtualServiceName: http2.example.local
spec:
provider:
virtualNode:
virtualNodeName: http2-example-local-node
virtualNodeName: frontend-example-local-node
spec:
backends:
- virtualService:
virtualServiceName: http.example.local
- virtualService:
virtualServiceName: http2.example.local
listeners:
- portMapping:
port: 80
protocol: http
frontend-example-local-node will fail to initialize its listeners.The Envoy logs will display
[warning][config] [source/common/config/grpc_mux_subscription_impl.cc:82] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Error adding/updating listener(s) lds_egress_0.0.0.0_15001: error adding listener '0.0.0.0:15001': multiple filter chains with the same matching rules are defined
meaning that App Mesh sent a Listener resource to the Envoy that looks like this:
name: lds_egress_0.0.0.0_15001
address:
socketAddress:
address: 0.0.0.0
portValue: 15001
filterChains:
- filterChainMatch:
destinationPort: 80
filters:
- name: envoy.http_connection_manager
config:
stat_prefix: egress
rds:
config_source:
ads: {}
route_config_name: rds_egress_http_80
http_filters:
- name: envoy.router
tracing:
operation_name: EGRESS
- filterChainMatch:
destinationPort: 80
filters:
- name: envoy.http_connection_manager
config:
stat_prefix: egress
rds:
config_source:
ads: {}
route_config_name: rds_egress_http2_80
http_filters:
- name: envoy.router
tracing:
operation_name: EGRESS
- filterChainMatch:
destinationPort: 443
serverNames:
- "*.amazonaws.com"
filters:
- name: envoy.tcp_proxy
config:
stat_prefix: egress
cluster: cds_egress_app-mesh-example_amazonaws
listenerFilters:
- name: envoy.listener.original_dst
- name: envoy.listener.tls_inspector
Note that there are 2 filter chains matches, one for http and one for http2 that both match on port 80. This is ambiguous so Envoy rejects this configuration as well as its other Listener configuration that allows it to listen for ingress traffic.
Are you currently working around this issue?
This can be worked around by using different listening ports for the backend virtual nodes. e.g. the http node can use port 80 and the http2 node can use port 8080.
we've made significant progress here and this should mostly be released within July 2020
We have released the bug fix and verified that this bug doesn't exist anymore
Most helpful comment
We have released the bug fix and verified that this bug doesn't exist anymore