[Bug] Inconsistency ‘givenName’ in node #817

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

Originally created by @hopleus on GitHub (Oct 7, 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

Host name where the error occurs - MacBook-Pro
(This is the real hostname of my machine)

When registering a node on the network, hostname as well as givenName is stored in its original form from tailcfg.Hostname - MacBook-Pro, without making it based on FQDN rules.
When renaming a node (changing the givenName), the logic checks the new name for FQDN compliance (CheckForFQDNRules) and does not allow the MacBook-Pro name to be saved, requiring lowercase i.e. macbook-pro.

Expected Behavior

When a node is registered on the network, the givenName is stored subject to FQDN rules.

Steps To Reproduce

  1. Register node
  2. Show givenName in DB
  3. Try changing the node name to the same
  4. Receive an FQDN error
  5. Save the new node name taking into account the FQDN rules
  6. It's OK, the new name is saved

Environment

- OS: MacOS 15
- Headscale version: 0.22.3
- Tailscale version: 1.74.0

Runtime environment

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

Anything else?

No response

Originally created by @hopleus on GitHub (Oct 7, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Host name where the error occurs - `MacBook-Pro` **(This is the real hostname of my machine)** When registering a node on the network, `hostname` as well as `givenName` is stored in its original form from `tailcfg.Hostname` - `MacBook-Pro`, without making it based on FQDN rules. When renaming a node (changing the `givenName`), the logic checks the new name for FQDN compliance (`CheckForFQDNRules`) and does not allow the `MacBook-Pro` name to be saved, requiring lowercase i.e. `macbook-pro`. ### Expected Behavior When a node is registered on the network, the givenName is stored subject to FQDN rules. ### Steps To Reproduce 1. Register node 2. Show givenName in DB 3. Try changing the node name to the same 4. Receive an FQDN error 5. Save the new node name taking into account the FQDN rules 6. It's OK, the new name is saved ### Environment ```markdown - OS: MacOS 15 - Headscale version: 0.22.3 - Tailscale version: 1.74.0 ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:24:23 +01:00
adam closed this issue 2025-12-29 02:24: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#817