Repository navigation
Implement basic multi-switch capability - #3262
Conversation
095a353 to
ee9d234
Compare
867a364 to
f1d57f5
Compare
rcgoodfellow
left a comment
There was a problem hiding this comment.
Thanks, Levon. Comments follow.
f1d57f5 to
aa041bc
Compare
Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml # ... rest of config [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml # ... rest of config [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" # uplink_vid = [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml # ... rest of config [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml # ... rest of config [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" # uplink_vid = [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
0c7da21 to
bd716fa
Compare
Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml # ... rest of config [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml # ... rest of config [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" # uplink_vid = [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
c2e405b to
478470d
Compare
|
Absent any CI errors, this PR is ready for final review. |
Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml # ... rest of config [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml # ... rest of config [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" # uplink_vid = [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
478470d to
1318e8b
Compare
luqmana
left a comment
There was a problem hiding this comment.
Thanks for tackling this Levon! Left some comments but looks mostly good
1318e8b to
a7b6e6e
Compare
luqmana
left a comment
There was a problem hiding this comment.
woo, thanks levon! some db index questions aside, mostly looks good to me!
| ) | ||
| ); | ||
|
|
||
| CREATE INDEX ON switch_port (port_settings_id); |
There was a problem hiding this comment.
Should this be a UNIQUE INDEX or can multiple switch port share the same port settings? (my guess would be no)
cc @davepacheco who's been looking at these recently.
There was a problem hiding this comment.
After revisting https://rfd.shared.oxide.computer/rfd/0267, it doesn't seem wrong to let switch_ports share port_settings, especially since we will allow the sharing of port_settings via groups.
There was a problem hiding this comment.
Port settings are designed to be shared, so common settings can be applied to multiple ports. Because port settings can themselves include other port settings, this makes it possible to have baseline settings that apply to a large group of ports in combination with more specific settings that apply to only a small number of ports or a single port.
rcgoodfellow
left a comment
There was a problem hiding this comment.
I've been able to run this in my multi-switch lab and the basics are working. Several seemingly unrelated issues are preventing me from doing all the testing I wanted to do, but I think think the right call for now is to get this PR merged and get some laps on a real test rack.
|
Awesome. I'll open some follow up issues for the remaining comments, then do a final rebase and merge. |
* allow control plane to manage an arbitrary number of dendrite clients * populate ports for multiple switches Enable multi-switch support for RSS This commit enables multi-switch support for RSS, allowing users to specify which switch should be used for the default uplink. * package `sp-sim` into switch zone for stub and softnpu targets * use mgs to discover switch slot managed by switch zone * discover dendrite zone addresses by inspecting DNS config in service plan * enable multiple uplinks to be specified in RSS. * during RSS, for all switches present in user-provided uplink configurations, inject switches addresses as targets for NAT configuration when bringing internal services online. Enable multi-switch for Nexus handoff * Enable automatic discovery of front facing ports * Populate uplink records based on which switch the user requested * Select switches for nat entry creation based on existence of routes * Initialize Nexus with multiple Dendrite clients, mapped to their respective switch slots [wicket] Support multiple uplink config entries (#3452) Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
b40463f to
b520fa5
Compare
* allow control plane to manage an arbitrary number of dendrite clients * populate ports for multiple switches Enable multi-switch support for RSS This commit enables multi-switch support for RSS, allowing users to specify which switch should be used for the default uplink. * package `sp-sim` into switch zone for stub and softnpu targets * use mgs to discover switch slot managed by switch zone * discover dendrite zone addresses by inspecting DNS config in service plan * enable multiple uplinks to be specified in RSS. * during RSS, for all switches present in user-provided uplink configurations, inject switches addresses as targets for NAT configuration when bringing internal services online. Enable multi-switch for Nexus handoff * Enable automatic discovery of front facing ports * Populate uplink records based on which switch the user requested * Select switches for nat entry creation based on existence of routes * Initialize Nexus with multiple Dendrite clients, mapped to their respective switch slots [wicket] Support multiple uplink config entries (#3452) Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
b520fa5 to
4aaa27f
Compare
Fleshes out the `wicket` bits for #3262: 1. The empty template returned by `setup get-config` now includes a sample uplink table: ```toml [rack_network_config] infra_ip_first = "" infra_ip_last = "" [[rack_network_config.uplinks]] switch = "" gateway_ip = "" uplink_port = "" uplink_port_speed = "" uplink_port_fec = "" uplink_ip = "" uplink_vid = 1234 # optional - remove if no VLAN id is needed ``` 2. The populated template returned by `setup get-config` is filled in with data: ```toml [rack_network_config] infra_ip_first = "172.20.26.1" infra_ip_last = "172.20.26.5" [[rack_network_config.uplinks]] switch = "switch0" gateway_ip = "1.2.3.4" uplink_port = "foo" uplink_port_speed = "speed10_g" uplink_port_fec = "none" uplink_ip = "2.3.4.5" [[rack_network_config.uplinks]] switch = "switch1" gateway_ip = "4.5.6.7" uplink_port = "bar" uplink_port_speed = "speed40_g" uplink_port_fec = "none" uplink_ip = "5.6.7.8" uplink_vid = 100 ``` 3. Multiple uplink configs can be displayed in the UI: 
closes #3014
Done
sp-siminto switch zone for stub and softnpu targetsDefer
rack_idandswitch_location? (still bike-shedding this) Associate switch port with switches #3359Issues Addressed
Closes #3014
Closes #2760