[PR #754] [MERGED] Fix cli registration of expired machines #1621

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/754
Author: @Aluxima
Created: 8/19/2022
Status: Merged
Merged: 8/20/2022
Merged by: @juanfont

Base: mainHead: expired-machine-registration


📝 Commits (5)

  • c6ea9b4 Fix cli registration of expired machines
  • 0c66590 Update changelog
  • a31432e Fix changelog
  • fca33aa Fix rebased errors scope in machine.go
  • e855622 Switch to using nodeKey instead of machineKey for expired machines registration

📊 Changes

3 files changed (+18 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 api.go (+7 -0)
📝 machine.go (+10 -0)

📄 Description

Fixes the CLI registration of machines already present in DB:

  • Machines that logged out were not added to registration cache when joining again
  • If the machine was still in cache (<15min after the first registration), expiry was not updated
  • Registration cache was not cleaned up after successful machine registration

Checks that the machine is registered with the right namespace

  • 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

Fixes #522


🔄 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/754 **Author:** [@Aluxima](https://github.com/Aluxima) **Created:** 8/19/2022 **Status:** ✅ Merged **Merged:** 8/20/2022 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `expired-machine-registration` --- ### 📝 Commits (5) - [`c6ea9b4`](https://github.com/juanfont/headscale/commit/c6ea9b4b8042f53773bd19e1d63f10a938b12dce) Fix cli registration of expired machines - [`0c66590`](https://github.com/juanfont/headscale/commit/0c66590108e6b4084d299d9930f086bead86e1f9) Update changelog - [`a31432e`](https://github.com/juanfont/headscale/commit/a31432ee7bffd214013270759c6725f7a35c5d1e) Fix changelog - [`fca33aa`](https://github.com/juanfont/headscale/commit/fca33aacbe13ce54e3118eea599eef87fcb18abe) Fix rebased errors scope in machine.go - [`e855622`](https://github.com/juanfont/headscale/commit/e85562268d49323e878d0ac77c3fc1f0b5ce4725) Switch to using nodeKey instead of machineKey for expired machines registration ### 📊 Changes **3 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `api.go` (+7 -0) 📝 `machine.go` (+10 -0) </details> ### 📄 Description Fixes the CLI registration of machines already present in DB: * Machines that logged out were not added to registration cache when joining again * If the machine was still in cache (<15min after the first registration), expiry was not updated * Registration cache was not cleaned up after successful machine registration Checks that the machine is registered with the right namespace <!-- Please tick if the following things apply. You… --> - [X] read the [CONTRIBUTING guidelines](README.md#contributing) - [X] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] 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. --> Fixes #522 --- <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:58 +01:00
adam closed this issue 2025-12-29 02:30:58 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1621