-
Notifications
You must be signed in to change notification settings - Fork 67
Enable wicket to configure the rack subnet #9653
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
Conversation
jgallagher
left a comment
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.
Looks reasonable to me - just a couple minor questions.
Have you given this a spin on a racklette? (Can we, before merging?)
| if rack_subnet_address.octets()[6] == 0x00 { | ||
| return Err("rack number (seventh octet) cannot be 0".into()); | ||
| }; | ||
|
|
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.
Do we want to check that the low 72 bits are all 0? That's guaranteed for our random ones, and converting the subnet address into an Ipv6Net<56> will do that, but it may indicate some confusion if an operator asks for it?
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 think that's a reasonable check to add, as it does make things a bit clearer in terms of what we expect (and what the system will do if you set the lower bits of the address)
wicket/src/ui/panes/rack_setup.rs
Outdated
| rack_network_config.as_ref().map_or("".into(), |c| { | ||
| match c.rack_subnet_address { | ||
| Some(v) => v.to_string(), | ||
| None => "".to_string(), |
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.
Do we want something like "(will be chosen randomly)" instead of leaving it blank?
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 think this is also a good idea
I'll do that today! |
jgallagher
left a comment
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.
LGTM, assuming the racklette testing went well
| |c| { | ||
| match c.rack_subnet_address { | ||
| Some(v) => v.to_string(), | ||
| None => "(chosen randomly)".to_string(), |
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.
Tiny nit - why is this string different from the one a few lines up?
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 figured we wanted it to say "will be chosen randomly" if the user hasn't provided a ipv6 subnet address and we are still uninitialzed, but it should say "chosen randomly` once we are initialized.
This is how it looks when None maps to "will be chosen randomly"

It seems like it could be a little confusing to users if we left it that way.
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.
Ahh, got it. Yeah that works for me 👍
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.
help rustfmt with long strings :D Co-authored-by: John Gallagher <john@oxidecomputer.com>



To pave the way for a multi-rack world, we are replacing the static
fd00:1122:3344::01prefix with a randomly generated one or a user specified one, that way racks can have unique addresses once they start talking to each other.fd/56Related
#9501