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] Hostname changes are not reflected #2140

Closed
4 tasks done
Proxymiity opened this issue Sep 19, 2024 · 2 comments · Fixed by #2199
Closed
4 tasks done

[Bug] Hostname changes are not reflected #2140

Proxymiity opened this issue Sep 19, 2024 · 2 comments · Fixed by #2199
Labels
bug Something isn't working
Milestone

Comments

@Proxymiity
Copy link

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

Changing the hostname of a node is not reflected on headscale.

Using tailscale set --hostname hello still keeps the hostname that the node originally came with.

Expected Behavior

Changing the hostname of a node on the node itself should reflect it on the node list in headscale.
This is the current behavior with 0.22.3.

Steps To Reproduce

  1. Start 0.23.0 (either upgraded from 0.22.3 or a fresh install)
  2. Register a new node on the server
  3. Note its hostname
  4. Change the hostname. On desktop, tailscale set --hostname something. On mobile, it is located in the settings of the app.
  5. Note that the hostname stayed the same

Environment

- OS: Docker 27.0.3 (Host: Debian 12.6)
- Headscale version: 0.23.0
- Tailscale version: 1.74.1 (ccd6bf2f4ee6421c23789b64e6e63c2ccbe87e08)
- Tailscale version (phone): iOS 18.0 // TS 1.74.0 (TestFlight beta 101.74.0)

Runtime environment

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

Anything else?

No response

@Proxymiity Proxymiity added the bug Something isn't working label Sep 19, 2024
@kradalby kradalby added this to the Next milestone Sep 19, 2024
@msarsha
Copy link

msarsha commented Sep 23, 2024

Having the same issue. restarting both node and server does not help.
@kradalby want to point me to where this should be implemented? I could have a look and check if do-able for me.

@kradalby
Copy link
Collaborator

@msarsha It would probably be in this function: https://github.com/juanfont/headscale/blob/main/hscontrol/poll.go#L454

You probably want to look at the logic in Rename node to ensure there is no collision, I have not had too much time to think about this yet, but will look closer if you post a PR.

If you dont have time, let me know and I'll look at it later.

hopleus added a commit to hopleus/headscale that referenced this issue Oct 15, 2024
hopleus added a commit to hopleus/headscale that referenced this issue Oct 15, 2024
hopleus added a commit to hopleus/headscale that referenced this issue Oct 15, 2024
kradalby pushed a commit that referenced this issue Oct 17, 2024
* #2140 Fixed updating of hostname and givenName when it is updated in HostInfo

* #2140 Added integration tests

* #2140 Fix unit tests

* Changed IsAutomaticNameMode to GivenNameHasBeenChanged. Fixed errors in files according to golangci-lint rules
hopleus added a commit to hopleus/headscale that referenced this issue Oct 25, 2024
* juanfont#2140 Fixed updating of hostname and givenName when it is updated in HostInfo

* juanfont#2140 Added integration tests

* juanfont#2140 Fix unit tests

* Changed IsAutomaticNameMode to GivenNameHasBeenChanged. Fixed errors in files according to golangci-lint rules
@nblock nblock modified the milestones: Next, v0.24.0 Nov 21, 2024
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
@kradalby @nblock @msarsha @Proxymiity and others