improve error message and document that the ipv6 prefix is now required #644

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

Originally created by @christian-heusel on GitHub (Feb 19, 2024).

Bug description

When missing the ipv6 section on the just relased v0.23.0-alpha5 a confusing error is printed:

Failed to get headscale configuration error="netip.ParsePrefix(\"\"): no '/'"

Environment

  • OS: deployed via docker
  • Headscale version: v0.23.0-alpha5

Old config:

ip_prefixes:
  - 100.64.0.0/10

New config:

prefixes:
  # errors without v6 or when v6 is empty
  v6: fd7a:115c:a1e0::/48
  v4: 100.64.0.0/10
  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

To Reproduce

Migrate the config ip prefix from the format pre v0.23.0-alpha4 to v0.23.0-alpha5.
With alpha5 it is required that a ipv6 shall be specified and after discussion on discord this was declared a feature. Now that it is required it should be documented and the the error message also could use some improvement so people who face this during migration are not too confused (kradalby said I should open an issue about this small improvement).

Originally created by @christian-heusel on GitHub (Feb 19, 2024). <!-- Before posting a bug report, discuss the behaviour you are expecting with the Discord community to make sure that it is truly a bug. The issue tracker is not the place to ask for support or how to set up Headscale. Bug reports without the sufficient information will be closed. Headscale is a multinational community across the globe. Our language is English. All bug reports needs to be in English. --> ## Bug description <!-- A clear and concise description of what the bug is. Describe the expected bahavior and how it is currently different. If you are unsure if it is a bug, consider discussing it on our Discord server first. --> When missing the ipv6 section on the just relased [v0.23.0-alpha5](https://github.com/juanfont/headscale/releases/tag/v0.23.0-alpha5) a confusing error is printed: ``` Failed to get headscale configuration error="netip.ParsePrefix(\"\"): no '/'" ``` ## Environment - OS: deployed via docker - Headscale version: v0.23.0-alpha5 Old config: ```yaml ip_prefixes: - 100.64.0.0/10 ``` New config: ```yaml prefixes: # errors without v6 or when v6 is empty v6: fd7a:115c:a1e0::/48 v4: 100.64.0.0/10 ``` <!-- We do not support running Headscale in a container nor behind a (reverse) proxy. If either of these are true for your environment, ask the community in Discord instead of filing a bug report. --> - [x] Headscale is behind a (reverse) proxy - [x] Headscale runs in a container ## To Reproduce Migrate the config ip prefix from the format pre v0.23.0-alpha4 to v0.23.0-alpha5. With alpha5 it is required that a ipv6 shall be specified and [after discussion on discord](https://discord.com/channels/896711691637780480/896711692120129540/1209133122566881360) this was declared a feature. Now that it is required it should be documented and the the error message also could use some improvement so people who face this during migration are not too confused (kradalby said I should open an issue about this small improvement).
adam added the bug label 2025-12-29 02:21:34 +01:00
adam closed this issue 2025-12-29 02:21:34 +01:00
Author
Owner

@mpldr commented on GitHub (Feb 29, 2024):

A migration guide would probably be a good section for the docs. After all its not unlikely that there will be at least some additional breaking changes in the future. (Bonus points for a sed command that auto-fixes the config :D)

@mpldr commented on GitHub (Feb 29, 2024): A migration guide would probably be a good section for the docs. After all its not unlikely that there will be at least some additional breaking changes in the future. (Bonus points for a sed command that auto-fixes the config :D)
Author
Owner

@x86dev commented on GitHub (Mar 3, 2024):

Thanks for bringing this bug up, was scratching my head as well what's wrong with my config ...yeah, that indeed should be documented or handled better.

@x86dev commented on GitHub (Mar 3, 2024): Thanks for bringing this bug up, was scratching my head as well what's wrong with my config ...yeah, that indeed should be documented or handled better.
Author
Owner

@BJorah commented on GitHub (Apr 1, 2024):

I also encountered this problem when I use "headscale namespace list"

@BJorah commented on GitHub (Apr 1, 2024): I also encountered this problem when I use "headscale namespace list"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#644