Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
christian-heusel opened this issue Feb 19, 2024 · 3 comments · Fixed by #1869
Closed
2 tasks done

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

christian-heusel opened this issue Feb 19, 2024 · 3 comments · Fixed by #1869
Labels
bug Something isn't working
Milestone

Comments

@christian-heusel
Copy link
Contributor

christian-heusel commented 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).

@christian-heusel christian-heusel added the bug Something isn't working label Feb 19, 2024
@mpldr
Copy link
Contributor

mpldr commented 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)

@x86dev
Copy link

x86dev commented 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.

@kradalby kradalby added this to the v0.23.0 milestone Mar 4, 2024
@BJorah
Copy link

BJorah commented Apr 1, 2024

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

kradalby added a commit to kradalby/headscale that referenced this issue Apr 12, 2024
Fixes juanfont#1785
Fixes juanfont#1827

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
kradalby added a commit to kradalby/headscale that referenced this issue Apr 15, 2024
Fixes juanfont#1785
Fixes juanfont#1827

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants