Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use "type.googleapis.com/google.protobuf.StringValue" in Matcher_OnMatch.Matcher_OnMatch_Action.TypedExtensionConfig.TypedConfig. TypeUrl: "type.googleapis.com/google.protobuf.StringValue", #1076

Open
lmq1999 opened this issue Dec 26, 2024 · 1 comment

Comments

@lmq1999
Copy link

lmq1999 commented Dec 26, 2024

I follow the example on:
https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/dynamic-config-cp for coding the new CP for my usecase

This is my envoy.yaml and it working perfectly on version 1.32.2: https://pikab.in/ae8aec158a [1]
This is the code to create the CP for my file above: https://pikab.in/89d41d2b23 [2]

(I only change the resource.go in https://github.com/envoyproxy/examples/blob/main/dynamic-config-cp/resource.go with my new resource.go file above in [2])

But I got these error:

dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.400][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:345] Decreasing pause count on discovery requests for type.googleapis.com/envoy.config.listener.v3.Listener (previous count 1)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.400][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:349] Resuming discovery requests for type.googleapis.com/envoy.config.listener.v3.Listener
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][http2] [source/common/http/http2/codec_impl.cc:1798] [Tags: "ConnectionId":"1"] Http2Visitor: remaining data payload: 1182, stream_id: 1, end_stream: false
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:361] Received gRPC message for type.googleapis.com/envoy.config.listener.v3.Listener at version 1
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:338] Pausing discovery requests for type.googleapis.com/envoy.config.listener.v3.Listener (previous count 0)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][warning][misc] [source/common/protobuf/message_validator_impl.cc:36] field 'envoy.config.listener.v3.Listener.filter_chain_matcher' is marked as work-in-progress. API features marked as work-in-progress are not considered stable, are not covered by the threat model, are not supported by the security team, and are subject to breaking changes. Do not use this feature without understanding each of the previous points.
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:338] Pausing discovery requests for type.googleapis.com/envoy.config.route.v3.RouteConfiguration (previous count 0)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:338] Pausing discovery requests for type.googleapis.com/envoy.config.route.v3.ScopedRouteConfiguration (previous count 0)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:338] Pausing discovery requests for type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret (previous count 0)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:550] begin add/update listener: name=tcp_listener hash=8478219076809685289
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:589] use full listener update path for listener name=tcp_listener hash=8478219076809685289
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:139]   filter #0:
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:140]     name: envoy.filters.listener.proxy_protocol
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:170]   config: {"@type":"type.googleapis.com/envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol"}
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:90]   filter #0:
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:103]     name: envoy.filters.network.tcp_proxy
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:106]   config: {"@type":"type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy","stat_prefix":"cluster_0","cluster":"cluster_0"}
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:90]   filter #0:
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.405][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:103]     name: envoy.filters.network.tcp_proxy
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:106]   config: {"@type":"type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy","stat_prefix":"cluster_1","cluster":"cluster_1"}
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:90]   filter #0:
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:103]     name: envoy.filters.network.tcp_proxy
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/common/listener_manager/listener_manager_impl.cc:106]   config: {"@type":"type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy","stat_prefix":"cluster_2","cluster":"cluster_2"}
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][init] [source/common/init/watcher_impl.cc:31] Listener-local-init-watcher tcp_listener destroyed
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][init] [source/common/init/watcher_impl.cc:31] init manager Listener-local-init-manager tcp_listener 8478219076809685289 destroyed
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][init] [source/common/init/target_impl.cc:34] target Listener-init-target tcp_listener destroyed
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:345] Decreasing pause count on discovery requests for type.googleapis.com/envoy.config.route.v3.RouteConfiguration (previous count 1)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:345] Decreasing pause count on discovery requests for type.googleapis.com/envoy.config.route.v3.ScopedRouteConfiguration (previous count 1)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][debug][config] [source/extensions/config_subscription/grpc/grpc_mux_impl.cc:345] Decreasing pause count on discovery requests for type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret (previous count 1)
dynamic-config-cp-proxy-1             | [2024-12-26 02:46:05.406][1][warning][config] [source/extensions/config_subscription/grpc/grpc_subscription_impl.cc:138] gRPC config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s) tcp_listener: Unable to unpack as google.protobuf.StringValue: type_url: "type.googleapis.com/google.protobuf.StringValue"
dynamic-config-cp-proxy-1             | value: "filter_nginx_0"

I don't know where I was wrong and the control-plane is not working

@valerian-roche
Copy link
Contributor

valerian-roche commented Dec 26, 2024

Hey, this seems like an issue in the way resources are built prior to being provided to the go-control-plane cache.
From the snippet you linked this seems invalid as this is not how a string would be serialized:

TypedConfig: &anypb.Any{
  TypeUrl: "type.googleapis.com/google.protobuf.StringValue",
  Value:   []byte("filter_nginx_0"),
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants