Skip to content

loadbalancer/healthserver: stabilize proxy-redirect test#44323

Merged
dylandreimerink merged 1 commit intocilium:mainfrom
mhofstetter:pr/mhofstetter/lb-healthserver-test-fix
Feb 19, 2026
Merged

loadbalancer/healthserver: stabilize proxy-redirect test#44323
dylandreimerink merged 1 commit intocilium:mainfrom
mhofstetter:pr/mhofstetter/lb-healthserver-test-fix

Conversation

@mhofstetter
Copy link
Copy Markdown
Member

@mhofstetter mhofstetter commented Feb 12, 2026

The newly introduced loadbalancer healthserver script test that tests the health for services with proxy redirection sometimes fails with the following error.

    scripttest.go:72: (command "* cmp healthserver-proxy.expected healthserver.after" failed, retrying in 500ms...)
        diff healthserver-proxy.expected healthserver.after
        --- healthserver-proxy.expected
        +++ healthserver.after
        @@ -3,6 +3,6 @@
         Content-Type=application/json
         Date=<omitted>
         X-Content-Type-Options=nosniff
        -X-Load-Balancing-Endpoint-Weight=1
        +X-Load-Balancing-Endpoint-Weight=3
         ---
        -{"service":{"namespace":"test","name":"echo"},"localEndpoints":1}
        +{"service":{"namespace":"test","name":"echo"},"localEndpoints":3}

See https://github.com/cilium/cilium/actions/runs/21952595101/job/63407305531

I was also able to reproduce it once locally when executing the test in a loop.

It seems that asynchronous (k8s) event processing can lead to situations where the proxy redirection port (set with svc/set-proxy-redirect test helper) is reset.
Even the retry to fetch and compare will always see the same outdated data.

Therefore it seems to be safer to include the call to svc/set-proxy-redirect test/echo 1000 into the same hive script test section so that it gets retried too in case of a failure (* ) prefix.

See https://docs.cilium.io/en/stable/contributing/development/hive/#command-reference for more info.

Fixes: #44286 (introduced the test while fixing an issue)
Fixes: #44414 🙏

@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. area/CI Continuous Integration testing issue or flake release-note/misc This PR makes changes that have no direct user impact. area/loadbalancing Impacts load-balancing and Kubernetes service implementations needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Feb 12, 2026
@mhofstetter mhofstetter changed the title loadbalancer/healthserver: stabilize test loadbalancer/healthserver: stabilize proxy-redirect test Feb 12, 2026
The newly introduced loadbalancer healthserver script
test that tests the health for services with proxy redirection
sometimes fails with the following error.

```
    scripttest.go:72: (command "* cmp healthserver-proxy.expected healthserver.after" failed, retrying in 500ms...)
        diff healthserver-proxy.expected healthserver.after
        --- healthserver-proxy.expected
        +++ healthserver.after
         Content-Type=application/json
         Date=<omitted>
         X-Content-Type-Options=nosniff
        -X-Load-Balancing-Endpoint-Weight=1
        +X-Load-Balancing-Endpoint-Weight=3
         ---
        -{"service":{"namespace":"test","name":"echo"},"localEndpoints":1}
        +{"service":{"namespace":"test","name":"echo"},"localEndpoints":3}
```

See https://github.com/cilium/cilium/actions/runs/21952595101/job/63407305531

Also reproduced locally when executing the test in a loop.

It seems that asynchronous (k8s) event processing can lead
to situations where the proxy redirection port (set with
`svc/set-proxy-redirect` test helper) is reset.
Even the retry to fetch and compare will always see the same
outdated data.

Therefore it seems to be safer to include the call to
`svc/set-proxy-redirect test/echo 1000` into the same
hive script test section so that it gets retried too
in case of a failure (`* `) prefix.

See https://docs.cilium.io/en/stable/contributing/development/hive/#command-reference
for more info.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/lb-healthserver-test-fix branch from 8e96168 to 10e94ad Compare February 12, 2026 18:24
@mhofstetter
Copy link
Copy Markdown
Member Author

mhofstetter commented Feb 12, 2026

/test

(10 runs of ci-integration succeeded: https://github.com/cilium/cilium/actions/runs/21959084432)

@mhofstetter mhofstetter marked this pull request as ready for review February 18, 2026 10:48
@mhofstetter mhofstetter requested a review from a team as a code owner February 18, 2026 10:48
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 19, 2026
@dylandreimerink dylandreimerink added this pull request to the merge queue Feb 19, 2026
Merged via the queue into cilium:main with commit 038d3ee Feb 19, 2026
80 of 81 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/lb-healthserver-test-fix branch February 19, 2026 11:05
@YutaroHayakawa YutaroHayakawa mentioned this pull request Feb 24, 2026
21 tasks
@YutaroHayakawa YutaroHayakawa added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Feb 24, 2026
@YutaroHayakawa YutaroHayakawa mentioned this pull request Feb 25, 2026
5 tasks
@YutaroHayakawa YutaroHayakawa added backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. and removed needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Feb 25, 2026
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake area/loadbalancing Impacts load-balancing and Kubernetes service implementations backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: TestScript/healthserver-proxy-redirect

4 participants