-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use hostname for Baseboard::Pc::identifier field #4937
Conversation
Doing this allows easier testbed setup and usage since we identify new sleds to add via their baseboard. In case we can't get a hostname we revert to using a UUID, as in the prior version of code.
I don't know enough to know if this change would create any problems. I think all the stuff I've done explicitly ignores non-Oxide hardware so I don't think that'll care. But it seems like this punts the uniqueness requirement to the deployer, who needs to ensure that hostnames are set properly and unique. I wonder if @jmpesp or @smklein has an opinion here? |
sled-hardware/Cargo.toml
Outdated
@@ -10,6 +10,7 @@ anyhow.workspace = true | |||
camino.workspace = true | |||
cfg-if.workspace = true | |||
futures.workspace = true | |||
gethostname = "0.4.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat shocked that this isn't built in. Would it be better to use to use nix's implementation (since we're already using nix
I think)?
Either way, I'd think we'd want to add this to the workspace-level deps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I'll use nix's impl!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out we are not using nix. It is a transitive dep though.
I think you probably want to try and use the SMBIOS UUID for this?
It is often a unique property of the physical or virtual system on which you are running. |
@jclulow we can't today due to it missing from Propolis (oxidecomputer/propolis#628). Which means that Falcon and co. don't have it. |
Ah! Very well. |
I tagged @jmpesp because he does the same thing for his petfood cluster in northern america. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐶 🥫 approved
Doing this allows easier testbed setup and usage since we identify new sleds to add via their baseboard. In case we can't get a hostname we revert to using a UUID, as in the prior version of code.