You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BackendTLSPolicySANValidation conformance test failing on main since at least Aug 3 #9687
TestGatewayAPIConformance/BackendTLSPolicySANValidation has been failing on every main run I checked, going back to at least 2026-08-03. Every PR inherits the failure, so red CI is currently hard to read.
Every "valid SAN should succeed" case gets 503 for the whole 30s window (30/30 attempts on both /backendtlspolicy-san-dns and /backendtlspolicy-san-uri):
expected status code to be one of [200], got 503
The mismatch cases pass because they only assert that the request fails, so they would also pass if SAN validation rejected everything.
The BackendTLSPolicy e2e tests look affected too — TestE2E/HTTPRouteMixedProtocols (which applies policy-btls and backend-tls-ca) and TestE2E/HTTPRouteMixedBackends are failing on main and on PR branches in the same runs.
I have not root-caused it, so I am not sure whether the upstream TLS handshake or the SAN matcher is at fault. Filing this so it is tracked, and happy to dig in if nobody is on it already.
The 503 has an empty body (Content-Length: 0), and it is the same on all 30 attempts for all three valid paths — latest example is today's main run, where this is the only failing test in that job.
The three mismatch cases use MakeRequestAndExpectFailure, so a 503 satisfies them too. The test cannot tell "SAN rejected the connection" apart from "the whole route is 503ing", so it may well be all six paths returning the same thing.
It is also flaky rather than constant — about one conformance matrix job per run, and the entry that hits it moves around, so the same commit is green in the other seven jobs.
And there is an older, different failure under the same test name: runs 28554318658 (1 Jul) and 28735397251 (5 Jul) fail only /backendtlspolicy-san-uri and return 400, not 503. Both predate #9221, which fits @kkk777-7's read.
Next I will pull the envoy-gateway artifact from a failing run and check whether the six SAN clusters and their endpoints are in the config dump.
@zirain I think the 503 is ours by design, and not a TLS failure at all.
When a backend has no ready endpoints, NoEndpoints > 0 switches the route to a weighted action (xds.go#L1116), the endpoint-less setting is dropped from the weighted list, and its weight goes to invalid-backend-cluster (route.go#L358) with cluster_not_found_response_code: 503 (route.go#L399). We never create that cluster, so Envoy replies cluster_not_found — a 503 with an empty body, which is exactly what the client logs: 503 0 HTTP/1.1 map[Content-Length:[0] ...].
So in the failing job Envoy was serving a config where those Services had no endpoints, for the whole 30s window. The SAN part looks like a red herring — the same three paths would 503 with any BackendTLSPolicy.
What I cannot explain yet is why it never recovered. The Services select the tls-backend pods that are already running, so the EndpointSlices should be there almost immediately.
Bisected the 503 variant, and it points somewhere else.
I scanned every failing conformance job on main from 9 Jul to now. From 9 Jul through 30 Jul the SAN failure is always the 400-on-/backendtlspolicy-san-uri one, never a 503. The first 503 run is 30795904904 (3 Aug, 48986089), and the last run before it with all eight conformance jobs green is 30776472921 (4061d834). From 3 Aug on it shows up in most runs.
The one functional change in that window is #9532, which sets initial_fetch_timeout: 0 in makeConfigSource(). That helper is shared by RDS and by every SDS secret config, including the upstream validation context we build for BackendTLSPolicy (translator.go#L1305). In Envoy 0 means wait forever rather than the 15s default, so a cluster whose SDS secret does not arrive stays warming and never becomes active — and a route to a cluster that is not active gets cluster_not_found, which is the empty-body 503. It also fits that only these tests break: they are the ones creating new clusters with an SDS validation context.
#9532's own run had conformance skipped, so 30795904904 was the first run to exercise it. I have not reproduced this locally yet, so treat it as a lead rather than a conclusion.
Confirmed the link to #9532. The commit that added initialFetchTimeout: 0s to the BackendTLSPolicy validation-context SDS config is 4ce3a07f, and you can see it landing in the golden output at backend-tls-settings.clusters.yaml#L53-L58.
That PR closed #9373, which was about the warning initial fetch timed out for ...v3.Secret, so the "the secret does not reach Envoy in time" condition already existed well before 3 Aug — what #9532 changed is what happens when it occurs. With the 15s default the fetch eventually timed out and the cluster left the warming state; with 0 it never leaves it, so every request routed there gets cluster_not_found, which is the empty-body 503, and it cannot recover. That fits @zirain's "it's odd that always return 503" and all 30 attempts over the 30s window failing identically.
A plain revert would just bring the #9373 warning back, so the question I would ask next is why the secret is late for these clusters at all — the timeout setting only decides which failure you end up seeing.
I think this timeout change breaks other places as well.
After updating from 1.8 to 1.9 I'm seeing occasional outages of routes secured by OIDC, usually after control plane was redeployed. Envoy Proxies respond with 503 and %RESPONSE_CODE_DETAILS% in the access logs is OAuth2_secrets_are_not_ready.
It does not recover on its own, restarting Envoy Proxies fixes it.
@zaremjan that looks like the same code path rather than a separate bug.
The OAuth2 filter's TokenSecret and HmacSecret are built with the same makeConfigSource() helper #9532 changed (oidc.go#L156-L165), so initial_fetch_timeout: 0 applies verbatim to your OIDC client secret and HMAC secret. 4ce3a07f is in v1.9.0 and in no v1.8.x tag, which matches your upgrade exactly.
I would not assume both symptoms share an Envoy mechanism, though. Ours is cluster_not_found — the cluster never leaves warming. Yours is OAuth2_secrets_are_not_ready, so the listener is serving and the filter is rejecting on an empty secret slot. Whether a non-zero timeout would make your case actually recover, rather than just fail differently, is not obvious to me — on init-fetch timeout Envoy marks the init target ready with the secret still absent. If you can grab config_dump?resource=dynamic_warming_secrets and stats | grep 'sds\.' off a stuck proxy, that would settle it, and also show whether the control plane pushed that secret at all — which is where @zirain's coalescing analysis points.
Either way, "does not recover on its own" is new in v1.9.0 and now spans OIDC, BackendTLSPolicy, downstream TLS and the rate limit client cert. Even if the real fix is server-side, a finite initial_fetch_timeout on release/v1.9 seems worth it as a stopgap: it brings back the #9373 warning, but a log line beats a proxy serving 503s until someone restarts it.
This looks fixed — #9532 was reverted by #9747 (3b96b298, 23 Aug), which is on main. makeConfigSource() no longer sets initial_fetch_timeout at all, so the 0 = wait-forever behaviour @kadircanyildirm-crypto and @zirain traced is gone.
Conformance on recent main runs:
run
conformance jobs
failing
34010341014 (06 Sep)
10
0
33956918293 (05 Sep)
10
0
33860459754 (04 Sep)
10
1
33850549816 (04 Sep)
10
1
The two most recent are fully green on conformance, and SANValidation does not appear in the remaining 04 Sep failure. main is still red, but on e2e-test jobs rather than conformance.
Worth closing, since the issue's own complaint was that red CI is hard to read — an open issue saying main is broken has the same effect once it isn't.
Two things that may deserve their own issues rather than dying with this one:
@zaremjan's OIDC OAuth2_secrets_are_not_ready outages on 1.9.0. The revert is on main, but if release/v1.9 did not get it, upgraded clusters are still exposed.
@zirain's push-coalescing analysis (CDS, then CDS+SDS+EDS coalesced into CDS2 so SDS is never pushed). As @kadircanyildirm-crypto put it, the timeout only decided which failure you saw — if the secret is genuinely never pushed, that is still there, just no longer unrecoverable.
release/v1.9 did ship #9532 (4ce3a07f is an ancestor), so v1.9.0 has the bug. It was removed on the branch by c30c739f — "[release/v1.9] cherry pick for v1.9.1 (#9872)" — and that commit is an ancestor of the v1.9.1 tag.
@zaremjan so the concrete remedy for your OIDC outages is upgrade to v1.9.1. That matches your symptom exactly: 4ce3a07f is in v1.9.0 and in no v1.8.x tag, which is why 1.8 was fine, and it is gone again in v1.9.1.
That leaves @zirain's push-coalescing question as the only thing here without a resolution, and it is independent of the timeout — worth its own issue if it is still reproducible, since a secret that is never pushed is a problem regardless of what the fetch timeout is set to.
Activity
zirain commentedon Aug 13, 2026
@kkk777-7 Do you think may be associated with #9221?
kkk777-7 commentedon Aug 13, 2026
I don't think there is a relationship. 🤔
zirain commentedon Aug 13, 2026
it's odd that always return 503.
kadircanyildirm-crypto commentedon Aug 13, 2026
A few things I found while looking at this again:
The 503 has an empty body (
Content-Length: 0), and it is the same on all 30 attempts for all three valid paths — latest example is today's main run, where this is the only failing test in that job.The three mismatch cases use
MakeRequestAndExpectFailure, so a 503 satisfies them too. The test cannot tell "SAN rejected the connection" apart from "the whole route is 503ing", so it may well be all six paths returning the same thing.It is also flaky rather than constant — about one conformance matrix job per run, and the entry that hits it moves around, so the same commit is green in the other seven jobs.
And there is an older, different failure under the same test name: runs 28554318658 (1 Jul) and 28735397251 (5 Jul) fail only
/backendtlspolicy-san-uriand return 400, not 503. Both predate #9221, which fits @kkk777-7's read.Next I will pull the
envoy-gatewayartifact from a failing run and check whether the six SAN clusters and their endpoints are in the config dump.kadircanyildirm-crypto commentedon Aug 13, 2026
@zirain I think the 503 is ours by design, and not a TLS failure at all.
When a backend has no ready endpoints,
NoEndpoints > 0switches the route to a weighted action (xds.go#L1116), the endpoint-less setting is dropped from the weighted list, and its weight goes toinvalid-backend-cluster(route.go#L358) withcluster_not_found_response_code: 503(route.go#L399). We never create that cluster, so Envoy repliescluster_not_found— a 503 with an empty body, which is exactly what the client logs:503 0 HTTP/1.1 map[Content-Length:[0] ...].So in the failing job Envoy was serving a config where those Services had no endpoints, for the whole 30s window. The SAN part looks like a red herring — the same three paths would 503 with any BackendTLSPolicy.
What I cannot explain yet is why it never recovered. The Services select the
tls-backendpods that are already running, so the EndpointSlices should be there almost immediately.zirain commentedon Aug 13, 2026
yeah, why I assumed #9221 maybe the cause.
kadircanyildirm-crypto commentedon Aug 13, 2026
Bisected the 503 variant, and it points somewhere else.
I scanned every failing conformance job on
mainfrom 9 Jul to now. From 9 Jul through 30 Jul the SAN failure is always the 400-on-/backendtlspolicy-san-urione, never a 503. The first 503 run is 30795904904 (3 Aug,48986089), and the last run before it with all eight conformance jobs green is 30776472921 (4061d834). From 3 Aug on it shows up in most runs.The one functional change in that window is #9532, which sets
initial_fetch_timeout: 0inmakeConfigSource(). That helper is shared by RDS and by every SDS secret config, including the upstream validation context we build for BackendTLSPolicy (translator.go#L1305). In Envoy0means wait forever rather than the 15s default, so a cluster whose SDS secret does not arrive stays warming and never becomes active — and a route to a cluster that is not active getscluster_not_found, which is the empty-body 503. It also fits that only these tests break: they are the ones creating new clusters with an SDS validation context.#9532's own run had conformance skipped, so 30795904904 was the first run to exercise it. I have not reproduced this locally yet, so treat it as a lead rather than a conclusion.
kadircanyildirm-crypto commentedon Aug 13, 2026
Confirmed the link to #9532. The commit that added
initialFetchTimeout: 0sto the BackendTLSPolicy validation-context SDS config is4ce3a07f, and you can see it landing in the golden output at backend-tls-settings.clusters.yaml#L53-L58.That PR closed #9373, which was about the warning
initial fetch timed out for ...v3.Secret, so the "the secret does not reach Envoy in time" condition already existed well before 3 Aug — what #9532 changed is what happens when it occurs. With the 15s default the fetch eventually timed out and the cluster left the warming state; with0it never leaves it, so every request routed there getscluster_not_found, which is the empty-body 503, and it cannot recover. That fits @zirain's "it's odd that always return 503" and all 30 attempts over the 30s window failing identically.A plain revert would just bring the #9373 warning back, so the question I would ask next is why the secret is late for these clusters at all — the timeout setting only decides which failure you end up seeing.
zirain commentedon Aug 20, 2026
@kadircanyildirm-crypto after debugging this for a while I have same thought with you, I think #9532 cause this.
Thinking about following push queue:
After 1 is pushed to the envoy, 2 and 3 are coalesced(only 3 pushed to envoy), resulting in the sds not being pushed, the CDS will be blocked.
same-namespace-6f6866db8d-jnfx2.json
zaremjan commentedon Aug 21, 2026
I think this timeout change breaks other places as well.
After updating from 1.8 to 1.9 I'm seeing occasional outages of routes secured by OIDC, usually after control plane was redeployed. Envoy Proxies respond with
503and%RESPONSE_CODE_DETAILS%in the access logs isOAuth2_secrets_are_not_ready.It does not recover on its own, restarting Envoy Proxies fixes it.
kadircanyildirm-crypto commentedon Aug 21, 2026
@zaremjan that looks like the same code path rather than a separate bug.
The OAuth2 filter's
TokenSecretandHmacSecretare built with the samemakeConfigSource()helper #9532 changed (oidc.go#L156-L165), soinitial_fetch_timeout: 0applies verbatim to your OIDC client secret and HMAC secret.4ce3a07fis inv1.9.0and in nov1.8.xtag, which matches your upgrade exactly.And
makeConfigSource()is not BackendTLSPolicy-specific — ten call sites getinitial_fetch_timeout: 0onmaintoday: RDS route config, downstream TLS certificates (HTTP/3, TCP), downstream mTLS CA, OAuth2 client secret and HMAC secret, CredentialInjector credential, rate limit service client cert, and the BackendTLSPolicy validation context and client cert. The conformance failure is the case we happen to have a test for, not the boundary of the problem.I would not assume both symptoms share an Envoy mechanism, though. Ours is
cluster_not_found— the cluster never leaves warming. Yours isOAuth2_secrets_are_not_ready, so the listener is serving and the filter is rejecting on an empty secret slot. Whether a non-zero timeout would make your case actually recover, rather than just fail differently, is not obvious to me — on init-fetch timeout Envoy marks the init target ready with the secret still absent. If you can grabconfig_dump?resource=dynamic_warming_secretsandstats | grep 'sds\.'off a stuck proxy, that would settle it, and also show whether the control plane pushed that secret at all — which is where @zirain's coalescing analysis points.Either way, "does not recover on its own" is new in
v1.9.0and now spans OIDC, BackendTLSPolicy, downstream TLS and the rate limit client cert. Even if the real fix is server-side, a finiteinitial_fetch_timeoutonrelease/v1.9seems worth it as a stopgap: it brings back the #9373 warning, but a log line beats a proxy serving 503s until someone restarts it.vishals-3 commentedon Sep 23, 2026
This looks fixed — #9532 was reverted by #9747 (
3b96b298, 23 Aug), which is onmain.makeConfigSource()no longer setsinitial_fetch_timeoutat all, so the0= wait-forever behaviour @kadircanyildirm-crypto and @zirain traced is gone.Conformance on recent
mainruns:The two most recent are fully green on conformance, and
SANValidationdoes not appear in the remaining 04 Sep failure.mainis still red, but one2e-testjobs rather than conformance.Worth closing, since the issue's own complaint was that red CI is hard to read — an open issue saying
mainis broken has the same effect once it isn't.Two things that may deserve their own issues rather than dying with this one:
OAuth2_secrets_are_not_readyoutages on 1.9.0. The revert is onmain, but ifrelease/v1.9did not get it, upgraded clusters are still exposed.vishals-3 commentedon Sep 23, 2026
Following up on my own question about
release/v1.9— I checked, and it is covered, so there is no cherry-pick needed.release/v1.9did ship #9532 (4ce3a07fis an ancestor), so v1.9.0 has the bug. It was removed on the branch byc30c739f— "[release/v1.9] cherry pick for v1.9.1 (#9872)" — and that commit is an ancestor of thev1.9.1tag.@zaremjan so the concrete remedy for your OIDC outages is upgrade to v1.9.1. That matches your symptom exactly:
4ce3a07fis in v1.9.0 and in no v1.8.x tag, which is why 1.8 was fine, and it is gone again in v1.9.1.That leaves @zirain's push-coalescing question as the only thing here without a resolution, and it is independent of the timeout — worth its own issue if it is still reproducible, since a secret that is never pushed is a problem regardless of what the fetch timeout is set to.
conformance: report BackendTLSPolicySANValidation as unsupported for …
conformance: add v1.5 report for Calico v3.32.2 (#5290)