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

Rework hostname handling #560

Merged
merged 44 commits into from
May 31, 2022
Merged

Rework hostname handling #560

merged 44 commits into from
May 31, 2022

Conversation

kradalby
Copy link
Collaborator

@kradalby kradalby commented Apr 24, 2022

This PR builds on the work of @bravechamp, and implements the suggested changes from the comments.

It replaces #498

Changes:

  • Machines can have nicknames Machines now has a separate name used for DNS (settable by users)
  • Added "friendly name" on nodes list output
  • New command nodes rename to rename nodes
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md
  • GivenName needs to be unique (DB constraint)
  • GivenName sanitise should have a tiny hash when registering, to avoid collisions)

grpcv1.go Outdated Show resolved Hide resolved
Copy link
Contributor

@restanrm restanrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a good PR in my opinion

@kradalby kradalby mentioned this pull request May 1, 2022
6 tasks
@kradalby kradalby marked this pull request as ready for review May 17, 2022 10:42
@kradalby kradalby requested a review from juanfont as a code owner May 17, 2022 10:42
@kradalby
Copy link
Collaborator Author

Please take another look @restanrm @juanfont

juanfont
juanfont previously approved these changes May 17, 2022
Copy link
Owner

@juanfont juanfont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is is a go!

@restanrm
Copy link
Contributor

Ok for me too !

github-actions bot and others added 6 commits May 30, 2022 13:35
This commit makes isOutdated validate a nodes necessity to update
against all namespaces, and not just the nodes own namespace (which made
more sense before).

getLastStateChange is now uses the passed namespaces as a filter,
meaning that not requesting any namespace will give you the total last
updated state.

In addition, the sync.Map is exchanged for a variant that uses generics
which allows us to remove some casting logic.
@@ -17,6 +17,8 @@
- Add the ability to rename a nodes name [#560](https://github.com/juanfont/headscale/pull/560)
- Node DNS names are now unique, a random suffix will be added when a node joins
- This change contains database changes, remember to **backup** your database before upgrading
- Add option to enable/disable logtail (Tailscale's logging infrastructure) [#596](https://github.com/juanfont/headscale/pull/596)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@kradalby kradalby merged commit be25bbc into juanfont:main May 31, 2022
@kradalby kradalby deleted the rename-fixess branch May 31, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants