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

[Bug] SIGHUP complains about ACL errors when no ACL is configured #2291

Closed
2 of 4 tasks
nblock opened this issue Dec 14, 2024 · 0 comments · Fixed by #2296
Closed
2 of 4 tasks

[Bug] SIGHUP complains about ACL errors when no ACL is configured #2291

nblock opened this issue Dec 14, 2024 · 0 comments · Fixed by #2296
Labels
bug Something isn't working policy 📝
Milestone

Comments

@nblock
Copy link
Collaborator

nblock commented Dec 14, 2024

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When no ACL is configured and headscale receives a SIGHUP it prints the following error message:

2024-12-14T19:42:19+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup
2024-12-14T19:42:19+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF"

Expected Behavior

Only process and print policy related errors on SIGHUP when a policy is configured.

Steps To Reproduce

  1. Use the following configuration (default):
policy:
  # The mode can be "file" or "database" that defines
  # where the ACL policies are stored and read from.
  mode: file
  # If the mode is set to "file", the path to a
  # HuJSON file containing ACL policies.
  path: ""
  1. Send SIGHUP: kill -HUP $(pidof headscale_0.24.0-beta.1_linux_amd64)
  2. Headscale logs:
024-12-14T19:45:24+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup
2024-12-14T19:45:24+01:00 ERR failed to set new policy error="parsing policy: parsing hujson, err: hujson: line 1, column 1: parsing value: unexpected EOF"

This works fine on Headscale 0.23.0: kill -HUP $(pidof headscale_0.23.0_linux_amd64):

2024-12-14T19:46:35+01:00 INF Received SIGHUP, reloading ACL and Config signal=hangup

Environment

- OS: Arch
- Headscale version: 0.24.0-beta.1
- Tailscale version: -

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

@nblock nblock added the bug Something isn't working label Dec 14, 2024
@kradalby kradalby added this to the v0.24.0 milestone Dec 15, 2024
kradalby added a commit to kradalby/headscale that referenced this issue Dec 15, 2024
Fixes juanfont#2291

Signed-off-by: Kristoffer Dalby <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working policy 📝
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants