[PR #601] [MERGED] Allow ACLs to be reloaded with SIGHUP #1515

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/601
Author: @kradalby
Created: 5/31/2022
Status: Merged
Merged: 6/3/2022
Merged by: @kradalby

Base: mainHead: signals-reload-acl


📝 Commits (10+)

  • 0b4f59b Improve signal handling
  • 3e078f0 Fix logtail config function name
  • 5bfae22 Make config get function global
  • 24e4787 Make ACL policy part of the config struct
  • 6b1482d Use config object instead of viper for policy path
  • 0612927 Rename abspath function to describe what it does
  • 36dca35 Move Abspath function to headscale utils
  • 2feed18 Support reloading ACLs with SIGHUP
  • 6f32b80 Update changelog
  • f1db2d0 Merge branch 'main' into signals-reload-acl

📊 Changes

4 files changed (+100 additions, -39 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 app.go (+61 -13)
📝 cmd/headscale/cli/utils.go (+22 -26)
📝 utils.go (+16 -0)

📄 Description

This PR partially resolves https://github.com/juanfont/headscale/issues/173, allowing the users to send a reload signal (SIGHUP) to headscale to reload the ACL policies.

In addition, sending a SIGTERM, SIGINT etc, will now attempt to shutdown headscale gracefully.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/601 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 5/31/2022 **Status:** ✅ Merged **Merged:** 6/3/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `signals-reload-acl` --- ### 📝 Commits (10+) - [`0b4f59b`](https://github.com/juanfont/headscale/commit/0b4f59b82b158afc3533fa16b4660eb48f99781d) Improve signal handling - [`3e078f0`](https://github.com/juanfont/headscale/commit/3e078f04946f0bf58471727c78d9bffa03352c99) Fix logtail config function name - [`5bfae22`](https://github.com/juanfont/headscale/commit/5bfae22c8f52019e530c43b9d7bfe4f64ed3b9ef) Make config get function global - [`24e4787`](https://github.com/juanfont/headscale/commit/24e4787a64d05e93c0028b6055c2fb77791d11f1) Make ACL policy part of the config struct - [`6b1482d`](https://github.com/juanfont/headscale/commit/6b1482daee03482c90ac91392efbcc0a68f4b97b) Use config object instead of viper for policy path - [`0612927`](https://github.com/juanfont/headscale/commit/06129277ed2e45a101fb5223e1e8152ef3165e0c) Rename abspath function to describe what it does - [`36dca35`](https://github.com/juanfont/headscale/commit/36dca3516a36e29bdb17a408c7d730728d8c0c6a) Move Abspath function to headscale utils - [`2feed18`](https://github.com/juanfont/headscale/commit/2feed18b2838719bcd730b3dc8c2fb02831c424e) Support reloading ACLs with SIGHUP - [`6f32b80`](https://github.com/juanfont/headscale/commit/6f32b80b2b910dc59bb65846a4a73ef5cba43226) Update changelog - [`f1db2d0`](https://github.com/juanfont/headscale/commit/f1db2d0c8eb5fa8fc2dbdb949d1e88b1c4774ebf) Merge branch 'main' into signals-reload-acl ### 📊 Changes **4 files changed** (+100 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `app.go` (+61 -13) 📝 `cmd/headscale/cli/utils.go` (+22 -26) 📝 `utils.go` (+16 -0) </details> ### 📄 Description This PR partially resolves https://github.com/juanfont/headscale/issues/173, allowing the users to send a reload signal (SIGHUP) to headscale to reload the ACL policies. In addition, sending a SIGTERM, SIGINT etc, will now attempt to shutdown headscale gracefully. - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [x] added integration tests - [x] updated documentation if needed - [x] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:23 +01:00
adam closed this issue 2025-12-29 02:30:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1515