envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Cluster ‘xxx’ Not Found Error When Adding Fluentd Access Log to Listener

Open sefaphlvn opened this issue 1 year ago • 6 comments
trafficstars

Hi everyone,

I’m encountering an issue when trying to add a Fluentd access log to a listener in Envoy. I receive the following error:

[2024-10-09 18:05:42.405][75338004][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) testlstnrnaJDny: cluster 'abc' was not found

However, the Fluentd cluster abc is clearly added, as shown below:

{
    "dynamic_active_clusters":
    [
        {
            "cluster":
            {
                "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
                "alt_stat_name": "aasdaa",
                "load_assignment":
                {
                    "cluster_name": "abc",
                    "endpoints":
                    [
                        {
                            "lb_endpoints":
                            [
                                {
                                    "endpoint":
                                    {
                                        "address":
                                        {
                                            "socket_address":
                                            {
                                                "address": "1.1.1.1",
                                                "port_value": 80
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                },
                "name": "abc",
                "type": "STATIC"
            },
            "last_updated": "2024-10-09T15:05:42.392Z",
            "version_info": "12a56d24a2dca4e5778852ecdf1aa919a78e9ca35f729bdb9a7c71998cc288dc"
        }
    ]
}

image

Despite the cluster being active and correctly configured, Envoy fails to recognize it when applying the listener configuration.

Any insights or suggestions on what might be causing this discrepancy would be greatly appreciated. Thanks in advance for your help!

Note: When I assign the same cluster abc to a route, it works without any issues.

sefaphlvn avatar Oct 09 '24 15:10 sefaphlvn

yeah I'm not sure but I could imagine checkActiveStaticCluster being too narrow of a check https://github.com/envoyproxy/envoy/blob/main/source/extensions/access_loggers/fluentd/config.cc#L42 cc @ohadvano @wbpcode

alyssawilk avatar Oct 09 '24 18:10 alyssawilk

yeah I'm not sure but I could imagine checkActiveStaticCluster being too narrow of a check https://github.com/envoyproxy/envoy/blob/main/source/extensions/access_loggers/fluentd/config.cc#L42 cc @ohadvano @wbpcode

Yeah, I think the checkActiveStaticCluster is too strict for the logger.

Hi, @sefaphlvn I think this feature require you config the cluster in the bootstrap directly. It is typically too strict for this feature.

Hi @ohadvano could you take a look, thanks?

wbpcode avatar Oct 10 '24 07:10 wbpcode

Thank you for the clarification!

If configuring the cluster in the bootstrap is indeed a requirement for this feature, it would be great to mention this explicitly in the documentation to help avoid similar confusion for other users.

Thanks again for your support!

sefaphlvn avatar Oct 10 '24 07:10 sefaphlvn

Thank you for the clarification!

If configuring the cluster in the bootstrap is indeed a requirement for this feature, it would be great to mention this explicitly in the documentation to help avoid similar confusion for other users.

Thanks again for your support!

Yeah, we will try to release this limitation first. If it's impossible, then we will update the docs. And thanks for the report. :)

wbpcode avatar Oct 10 '24 08:10 wbpcode

Hi @ohadvano could you take a look, thanks?

@wbpcode, I'm out for a while so can't work on a fix at this moment. If possible, please update docs that it's only supported for with static clusters. I can try see how to make it work with dynamic after I'm back.

ohadvano avatar Oct 10 '24 11:10 ohadvano

Would this be a beginner-friendly issue? Would it be just a matter of creating a more relaxed check (disregarding the "staticness" of a cluster)? Like, just checking if it's in the active clusters collection in the cluster manager?

Given that @ohadvano is out for now, I'd be happy to give it a shot if it's a simple issue.

grnmeira avatar Oct 17 '24 13:10 grnmeira

If no one is working already, I can take a stab at this, @wbpcode / @ohadvano similar question as above, on the implementation front, would the additional change be beginner-friendly/simple as checking if cluster exist in active clusters list or would it be something more complex?

Sanchit-20 avatar Jan 07 '25 05:01 Sanchit-20

Sanchit-20 is not allowed to assign users.

:cat:

Caused by: a https://github.com/envoyproxy/envoy/issues/36511#issuecomment-2581150216 was created by @Sanchit-20.

see: more, trace.