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

client id's are too similar #2534

Closed
clinta opened this issue Apr 7, 2017 · 4 comments · Fixed by #2541
Closed

client id's are too similar #2534

clinta opened this issue Apr 7, 2017 · 4 comments · Fixed by #2541

Comments

@clinta
Copy link
Contributor

clinta commented Apr 7, 2017

Nomad version

Nomad v0.5.6

Operating system and Environment details

Ubuntu 16.04
5 node cluster on identical physical servers.

Issue

The UUIDs for each node is very similar, and the first 8 characters, which are all that is displayed in the nomad, interface is identical.

Reproduction steps

Use hardware where the first 8 characters in /sys/class/dmi/id/product_uuid are identical. Since the first bytes of the UUID are a timestamp, I believe this can be expected on hardware who's bios chips were manufactured in the same batch and manufactured at nearly the same time.

Possible fix

Hash the host UUID before using it to generate the nomad client-id. This will result in a random distribution of UUIDs where it will be unlikely to have a collision in the first 8 characters, while preserving the deterministic advantages of using the system UUID.

If this is a reasonable solution, I'd be happy to implement it and submit a PR.

@clinta
Copy link
Contributor Author

clinta commented Apr 7, 2017

I'm currently working around this by setting no_host_uuid to true in the client config. But I think the ability to use a deterministic but randomly distributed UUID would be nice.

@dadgar
Copy link
Contributor

dadgar commented Apr 7, 2017

Hey @clinta,

What are you suggesting? We have the deterministic ID through the host's UUID and give a way to have a random ID as you have discovered.

@clinta
Copy link
Contributor Author

clinta commented Apr 7, 2017

I like the deterministic id, but I can't use it in our cluster because the first 8 characters of the system UUID are the same on all of the servers in our cluster. This is not unexpected, because the first bytes of the UUID are a timestamp of when the bios chip was burned, and we purchased a batch of identical hardware.

Since the nomad interface only exposes the first 8 characters, this makes the interface unusable.

Hasing the system UUID gives the best of both worlds. Deterministic, and randomly distributed so that the first 8 characters of the client-id will be unique.

dadgar added a commit that referenced this issue Apr 10, 2017
This PR takes the host ID and runs it through a hash so that it is well
distributed. This makes it so that machines that report similar host IDs
are easily distinguished.

Instances of similar IDs occur on EC2 where the ID is prefixed and on
motherboards created in the same batch.

Fixes #2534
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants