envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.99k stars 4.81k forks source link

Envoy 1.12 update Lds will not send a request to get the route defined in the scope, nor report an error, the request will report no_route 404 #10913

Open yiyouguisu opened 4 years ago

yiyouguisu commented 4 years ago

image

ScopeRoute Config: image

RouteConfig: image

RawRouteConfig: [{ "name": "local_route_443", "virtual_hosts": [{ "routes": [{ "route": { "cluster": "serviceA" }, "match": { "path": "/service/1" } }, { "match": { "path": "/service/2" }, "route": { "cluster": "serviceB" } }, { "match": { "path": "/service/3" }, "route": { "weighted_clusters": { "clusters": [{ "name": "serviceA", "weight": 10 }, { "name": "serviceB", "weight": 90 }], "runtime_key_prefix": "weighted_clusters_healthy", "total_weight": 100 } } } ], "domains": [ "*" ], "name": "local_route_443" }] }, { "name": "local_route_80", "virtual_hosts": [{ "routes": [{ "route": { "cluster": "serviceA" }, "match": { "path": "/service/1" } }, { "match": { "path": "/service/2" }, "route": { "cluster": "serviceB" } }, { "match": { "path": "/service/3" }, "route": { "weighted_clusters": { "clusters": [{ "name": "serviceA", "weight": 10 }, { "name": "serviceB", "weight": 90 }], "runtime_key_prefix": "weighted_clusters_healthy", "total_weight": 100 } } } ], "domains": [ "*" ], "name": "local_route_80" }] }, { "name": "route-config1", "virtual_hosts": [{ "routes": [{ "route": { "cluster": "serviceA" }, "match": { "path": "/service/1" } }], "domains": [ "*" ], "name": "route-config1" }] }, { "name": "route-config2", "virtual_hosts": [{ "routes": [{ "match": { "path": "/service/2" }, "route": { "cluster": "serviceB" } }], "domains": [ "*" ], "name": "route-config2" }] } ]

zuercher commented 4 years ago

Have you tried this with a more recent version of Envoy?

yiyouguisu commented 4 years ago

Have you tried this with a more recent version of Envoy?

@zuercher I tried version 1.13 and the same result

zuercher commented 4 years ago

Can you share your listener config? Scoped route configurations are not obtained via RDS. They used SRDS, which is configured in the Listener's scoped_routes field.

yiyouguisu commented 4 years ago

Can you share your listener config? Scoped route configurations are not obtained via RDS. They used SRDS, which is configured in the Listener's scoped_routes field.

@zuercher ``` { "name": "listener-9999", "address": { "socket_address": { "address": "0.0.0.0", "port_value": 9999 } }, "filter_chains": [{ "filters": [{ "name": "envoy.http_connection_manager", "config": { "codec_type": "auto", "http_filters": [{ "name": "envoy.router", "config": {} }], "stat_prefix": "ingress_http", "scoped_routes": { "name": "foo-scoped-routes", "scope_key_builder": { "fragments": [{ "header_value_extractor": { "name": "X-APP", "element_separator": ",", "element": { "separator": "=", "key": "vip" } } }] }, "rds_config_source": { "ads": {} }, "scoped_route_configurations_list": { "scoped_route_configurations": [{ "name": "route-scope1", "route_configuration_name": "route-config1", "key": { "fragments": [{ "string_key": "172.10.10.20" }] } }, { "name": "route-scope2", "route_configuration_name": "route-config2", "key": { "fragments": [{ "string_key": "172.10.10.30" }] } } ] } } } }] }] }