gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Envoy complains about request_trailer_mode not being set to SEND with 1.4.1

Open sanjaypujare opened this issue 7 months ago • 9 comments

Description: I installed the latest 1.4.1 of Envoy Gateway and tried to use the new FullDuplex body mode in one of my EnvoyExtensionPolicies. However Envoy complains about "request_trailer_mode not being set to SEND"

Repro steps: I added an extension as follows:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
metadata:
  name: my-ext-proc
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: eg
  extProc:
    - backendRefs:
        - name: my-ext-proc-ingress
          port: 443
      processingMode:
        request:
          body: FullDuplexStreamed
        response: 
          body: FullDuplexStreamed

However when I triggered this extension by sending a request, Envoy generates an error as follows:

severity: "ERROR"

[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) default/eg/http: If the ext_proc filter has the request_body_mode set to FULL_DUPLEX_STREAMED, then the request_trailer_mode has to be set to SEND

I notice there's no way to add "trailers" in the extension. How can we use FullDuplexStreamed body mode? How was it verified in the tests?

Environment: gateway version, envoy version: 1.4.1

Logs:

sanjaypujare avatar Jun 06 '25 22:06 sanjaypujare

cc @guydc

arkodg avatar Jun 06 '25 23:06 arkodg

cc @guydc

Thanks!

Another ping.

sanjaypujare avatar Jun 09 '25 21:06 sanjaypujare

@kfswain was this tested ?

marking it as help-wanted

arkodg avatar Jun 10 '25 15:06 arkodg

can this be worked around with allowModeOverride ?

arkodg avatar Jun 10 '25 15:06 arkodg

ignore my prev comment, this is a config validation issue https://github.com/envoyproxy/envoy/blob/9739df72fc281dadfd52a542e2ffdc5f8074122c/source/extensions/filters/http/ext_proc/config.cc#L50

looks like this feature was not tested, the decision needed here is, to expose request_trailer_mode in the API or set it to SEND by default for this case

arkodg avatar Jun 10 '25 15:06 arkodg

ignore my prev comment, this is a config validation issue https://github.com/envoyproxy/envoy/blob/9739df72fc281dadfd52a542e2ffdc5f8074122c/source/extensions/filters/http/ext_proc/config.cc#L50

looks like this feature was not tested, the decision needed here is, to expose request_trailer_mode in the API or set it to SEND by default for this case

My preference is to "expose request_trailer_mode in the API". But if that needs more work/time then a quick fix could be to use SEND for trailers until a proper fix is implemented

sanjaypujare avatar Jun 10 '25 16:06 sanjaypujare

Agree with the quick fix for now, if we have use for trailers later on, we can expand the API.

guydc avatar Jun 11 '25 14:06 guydc

Agree with the quick fix for now, if we have use for trailers later on, we can expand the API.

Trailers will be needed for grpc or other http2 use-cases. What's the ETA for the quick fix if one is planned?

sanjaypujare avatar Jun 11 '25 15:06 sanjaypujare

will try working to open a fix PR this week. No ETA for the next patch release at the moment.

guydc avatar Jun 16 '25 11:06 guydc

arkodg closed this as completedin #632351 minutes ago

Great! Will this be in 1.4.2? Any idea of the ETA for 1.4.2?

sanjaypujare avatar Jun 20 '25 16:06 sanjaypujare