route failover considers disabled routes as new primaries #619

Closed
opened 2025-12-29 02:21:15 +01:00 by adam · 0 comments
Owner

Originally created by @derelm on GitHub (Jan 31, 2024).

Bug description

Headscale doesn't look at the Enabled flag for any route failover candidates which can lead to setting the IsPrimary value to true on an otherwise disabled route, possibly breaking routing.

Environment

  • OS: Mac / Linux

  • Headscale version: v0.23.0-alpha3

  • Tailscale version: 1.58.2

  • Headscale is behind a (reverse) proxy

  • Headscale runs in a container

To Reproduce

  • Bring up two tailscale nodes (A and B) advertising the same route (eg 10.0.0.0/24). Enable A's advertised route in your headscale server. A will be primary. Test routing - it should be working fine at this point. B's route should be disabled and not primary.
  • Reboot / power down the tailscale node A with the Enabled & Primary route.
  • Check output of headscale routes ls - you should see B's disabled route get set to primary
  • Once you bring A back, test routing - it should fail at this point. B's route is still primary but disabled, A's route is enabled but not primary

I would expect that headscale doesn't consider disabled routes for new primary role/failover. Unfortunately i don't know how the official tailscale server handles this case.

Originally created by @derelm on GitHub (Jan 31, 2024). ## Bug description Headscale doesn't look at the `Enabled` flag for any route failover candidates which can lead to setting the `IsPrimary` value to true on an otherwise disabled route, possibly breaking routing. ## Environment - OS: Mac / Linux - Headscale version: v0.23.0-alpha3 - Tailscale version: 1.58.2 - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ## To Reproduce - Bring up two tailscale nodes (A and B) advertising the same route (eg 10.0.0.0/24). Enable A's advertised route in your headscale server. A will be primary. Test routing - it should be working fine at this point. B's route should be disabled and not primary. - Reboot / power down the tailscale node A with the Enabled & Primary route. - Check output of `headscale routes ls` - you should see B's disabled route get set to primary - Once you bring A back, test routing - it should fail at this point. B's route is still primary but disabled, A's route is enabled but not primary I would expect that headscale doesn't consider disabled routes for new primary role/failover. Unfortunately i don't know how the official tailscale server handles this case.
adam added the bug label 2025-12-29 02:21:15 +01:00
adam closed this issue 2025-12-29 02:21:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#619