Skip to content

tunnel/route_windows: fix locale-dependent parsing in route commands#22981

Open
carterpewpew wants to merge 1 commit into
kubernetes:masterfrom
carterpewpew:fix/tunnel-windows-locale
Open

tunnel/route_windows: fix locale-dependent parsing in route commands#22981
carterpewpew wants to merge 1 commit into
kubernetes:masterfrom
carterpewpew:fix/tunnel-windows-locale

Conversation

@carterpewpew
Copy link
Copy Markdown

On non-English Windows, minikube tunnel enters an endless retry loop because route_windows.go relies on English stdout strings that differ across locales.

Three call sites were affected:

  • EnsureRouteIsAdded compared stdout against " OK!\r\n". On Russian locale this is Cyrillic (" ОК!\r\n"), so it errored even when the route was successfully added (exit code 0).
  • parseTable waited for a "Network Destination" header before parsing rows. On localized Windows the header is translated, so the routing table was always empty and Inspect could never detect existing routes.
  • Cleanup had the same " OK!\r\n" check.

This PR replaces all three with the command exit code and uses net.ParseIP to naturally filter non-route lines in parseTable, matching the approach already used in route_linux.go. Also re-checks route existence after a failed route ADD to handle TOCTOU races gracefully.

Fixes #11645

EnsureRouteIsAdded, Cleanup, and parseTable relied on English stdout
strings (" OK!\r\n" and "Network Destination") that differ on localized
Windows. Use the command exit code and net.ParseIP filtering instead.

Also re-check route existence after a failed route ADD to handle
TOCTOU races gracefully.

Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @carterpewpew. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: carterpewpew
Once this PR has been reviewed and has the lgtm label, please assign prezha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from medyagh and nirs May 12, 2026 07:02
@minikube-bot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minikube tunnel is not working on Windows (endessly trying to add a route)

3 participants