-
Notifications
You must be signed in to change notification settings - Fork 92
Add allow_ddm_traffic to port config in CRDB
#11117
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -603,7 +603,12 @@ impl super::Nexus { | |
|
|
||
| match self | ||
| .db_datastore | ||
| .switch_port_settings_create(opctx, &port_settings_params, None) | ||
| .switch_port_settings_create( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where the value from RSS is actually stored in the DB. |
||
| opctx, | ||
| &port_settings_params, | ||
| None, | ||
| uplink_config.allow_ddm_traffic, | ||
| ) | ||
| .await | ||
| { | ||
| Ok(_) | Err(Error::ObjectAlreadyExists { .. }) => Ok(()), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -229,5 +229,6 @@ fn port_input_from_db( | |
| post1: c.post1, | ||
| }) | ||
| .collect(), | ||
| allow_ddm_traffic: info.port.allow_ddm_traffic, | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE omicron.public.switch_port_settings_port_config | ||
| ADD COLUMN IF NOT EXISTS allow_ddm_traffic BOOL NOT NULL DEFAULT false; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3752,7 +3752,8 @@ CREATE TYPE IF NOT EXISTS omicron.public.switch_port_geometry AS ENUM ( | |
|
|
||
| CREATE TABLE IF NOT EXISTS omicron.public.switch_port_settings_port_config ( | ||
| port_settings_id UUID PRIMARY KEY, | ||
| geometry omicron.public.switch_port_geometry | ||
| geometry omicron.public.switch_port_geometry, | ||
| allow_ddm_traffic BOOL NOT NULL DEFAULT false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. Done in d3eb9c4
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah we generally set a default and then remove it in the next DDL in the migration.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait, I messed this up. I need to account for the migration. Thanks @sunshowers. I'll fix it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe I fixed this in fbcc5ce |
||
| ); | ||
|
|
||
| CREATE TYPE IF NOT EXISTS omicron.public.switch_link_fec AS ENUM ( | ||
|
|
@@ -9261,7 +9262,7 @@ INSERT INTO omicron.public.db_metadata ( | |
| version, | ||
| target_version | ||
| ) VALUES | ||
| (TRUE, NOW(), NOW(), '291.0.0', NULL) | ||
| (TRUE, NOW(), NOW(), '292.0.0', NULL) | ||
| ON CONFLICT DO NOTHING; | ||
|
|
||
| COMMIT; | ||
Uh oh!
There was an error while loading. Please reload this page.