From bd0ce7383dcb96ac9ed94a0bf88af8da8075bbd2 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 7 Oct 2024 17:58:35 +0000 Subject: [PATCH 1/6] Update SMF properties for Dendrite to include sled identifiers Includes: - package-manifest update to match the properties added to dpd - removal of client call to get sled idenifier information (no longer used) - switch_slot added to oximeter schemas for dendrite/switch-data-link --- clients/sled-agent-client/src/lib.rs | 30 ------- oximeter/oximeter/schema/dendrite.toml | 6 +- .../oximeter/schema/switch-data-link.toml | 6 +- package-manifest.toml | 12 +-- sled-agent/src/services.rs | 87 ++++++++++++++++--- sled-agent/src/sled_agent.rs | 8 +- tools/dendrite_openapi_version | 4 +- tools/dendrite_stub_checksums | 6 +- 8 files changed, 98 insertions(+), 61 deletions(-) diff --git a/clients/sled-agent-client/src/lib.rs b/clients/sled-agent-client/src/lib.rs index dfa89f4cc6..85ea041141 100644 --- a/clients/sled-agent-client/src/lib.rs +++ b/clients/sled-agent-client/src/lib.rs @@ -389,36 +389,6 @@ impl From } } -impl From - for types::SledIdentifiers -{ - fn from( - value: omicron_common::api::internal::shared::SledIdentifiers, - ) -> Self { - Self { - model: value.model, - rack_id: value.rack_id, - revision: value.revision, - serial: value.serial, - sled_id: value.sled_id, - } - } -} - -impl From - for omicron_common::api::internal::shared::SledIdentifiers -{ - fn from(value: types::SledIdentifiers) -> Self { - Self { - model: value.model, - rack_id: value.rack_id, - revision: value.revision, - serial: value.serial, - sled_id: value.sled_id, - } - } -} - /// Exposes additional [`Client`] interfaces for use by the test suite. These /// are bonus endpoints, not generated in the real client. #[async_trait] diff --git a/oximeter/oximeter/schema/dendrite.toml b/oximeter/oximeter/schema/dendrite.toml index e822069a2f..251a0cccee 100644 --- a/oximeter/oximeter/schema/dendrite.toml +++ b/oximeter/oximeter/schema/dendrite.toml @@ -18,7 +18,7 @@ versions = [ # switch for its statistics, which is why these fields are included. # Dendrite may eventually report statistics about itself, or other aspects # not related to the switch, so they belong here, not the target. - { added_in = 1, fields = [ "switch_model", "switch_revision", "switch_id", "switch_serial" ] } + { added_in = 1, fields = [ "switch_model", "switch_revision", "switch_id", "switch_serial", "switch_slot" ] } ] [fields.rack_id] @@ -56,3 +56,7 @@ description = "ID of the switch being managed" [fields.switch_serial] type = "string" description = "Serial number of the switch being managed" + +[fields.switch_slot] +type = "u32" +description = "Slot number of the switch the link is on" diff --git a/oximeter/oximeter/schema/switch-data-link.toml b/oximeter/oximeter/schema/switch-data-link.toml index d6744e8c7f..c7543c7193 100644 --- a/oximeter/oximeter/schema/switch-data-link.toml +++ b/oximeter/oximeter/schema/switch-data-link.toml @@ -5,7 +5,7 @@ name = "switch_data_link" description = "A network data link on an Oxide switch" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_model", "switch_revision", "switch_serial" ] }, + { version = 1, fields = [ "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] }, ] [[metrics]] @@ -263,6 +263,10 @@ description = "Revision number of the switch the link is on" type = "string" description = "Serial number of the switch the link is on" +[fields.switch_slot] +type = "u32" +description = "Slot number of the switch the link is on" + [fields.port_id] type = "string" description = "Physical switch port the link is on" diff --git a/package-manifest.toml b/package-manifest.toml index e724486e77..35b86052e5 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -717,8 +717,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f3810e7bc1f0d746b5e95b3aaff32e52b02dfdfa" -source.sha256 = "c1506f6f818327523e6ff3102432a2038d319338b883235664b34f9132ff676a" +source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" +source.sha256 = "7dbd752327234d6321ae9b06fb1eb72874bd3bcf0122ee545f60fe2579d9746c" output.type = "zone" output.intermediate_only = true @@ -744,8 +744,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f3810e7bc1f0d746b5e95b3aaff32e52b02dfdfa" -source.sha256 = "061d40085e733e60d7c53ebfd2a4cf64f54a856e7eb5fd4b82ac65ec6a5b847b" +source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" +source.sha256 = "12d02211398203d56b48bfe5dbcad1a4e968a5627e94bd1093b45d77181038fe" output.type = "zone" output.intermediate_only = true @@ -764,8 +764,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f3810e7bc1f0d746b5e95b3aaff32e52b02dfdfa" -source.sha256 = "c6cb4c077f0ddfc78ab06e07316d1312657f95526ced60c2b8e7baf1c73ae24a" +source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" +source.sha256 = "b128356fd2986344b393ca178ee7e7fc7aa82c08a85b4088e3df61ab057263f3" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index 36360ddeae..9d23638c9e 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -87,7 +87,7 @@ use omicron_common::address::{AZ_PREFIX, OXIMETER_PORT}; use omicron_common::address::{BOOTSTRAP_ARTIFACT_PORT, COCKROACH_ADMIN_PORT}; use omicron_common::api::external::Generation; use omicron_common::api::internal::shared::{ - HostPortConfig, RackNetworkConfig, + HostPortConfig, RackNetworkConfig, SledIdentifiers, }; use omicron_common::backoff::{ retry_notify, retry_policy_internal_service_aggressive, BackoffError, @@ -379,15 +379,18 @@ fn display_zone_init_errors(errors: &[(String, Box)]) -> String { /// Configuration parameters which modify the [`ServiceManager`]'s behavior. pub struct Config { /// Identifies the sled being configured - pub sled_id: Uuid, + pub sled_identifiers: SledIdentifiers, /// Identifies the revision of the sidecar to be used. pub sidecar_revision: SidecarRevision, } impl Config { - pub fn new(sled_id: Uuid, sidecar_revision: SidecarRevision) -> Self { - Self { sled_id, sidecar_revision } + pub fn new( + sled_identifiers: SledIdentifiers, + sidecar_revision: SidecarRevision, + ) -> Self { + Self { sled_identifiers, sidecar_revision } } } @@ -973,6 +976,7 @@ impl ServiceManager { .get() .expect("sled agent not started") .config + .sled_identifiers .sled_id } @@ -2685,15 +2689,42 @@ impl ServiceManager { if let Some(i) = info { dendrite_config = dendrite_config + .add_property( + "rack_id", + "astring", + &i.rack_id.to_string(), + ) .add_property( "sled_id", "astring", - &i.config.sled_id.to_string(), + &i.config + .sled_identifiers + .sled_id + .to_string(), ) .add_property( - "rack_id", + "sled_model", "astring", - &i.rack_id.to_string(), + &i.config + .sled_identifiers + .model + .to_string(), + ) + .add_property( + "sled_serial", + "astring", + &i.config + .sled_identifiers + .serial + .to_string(), + ) + .add_property( + "sled_revision", + "astring", + &i.config + .sled_identifiers + .revision + .to_string(), ); } @@ -2985,7 +3016,10 @@ impl ServiceManager { .add_property( "sled_uuid", "astring", - &i.config.sled_id.to_string(), + &i.config + .sled_identifiers + .sled_id + .to_string(), ) .add_property( "rack_uuid", @@ -3031,7 +3065,10 @@ impl ServiceManager { .add_property( "sled_uuid", "astring", - &i.config.sled_id.to_string(), + &i.config + .sled_identifiers + .sled_id + .to_string(), ) .add_property( "rack_uuid", @@ -4366,7 +4403,25 @@ impl ServiceManager { )?; smfh.setprop_default_instance( "config/sled_id", - info.config.sled_id, + info.config.sled_identifiers.sled_id, + )?; + smfh.setprop_default_instance( + "config/sled_model", + info.config + .sled_identifiers + .model + .to_string(), + )?; + smfh.setprop_default_instance( + "config/sled_revision", + info.config.sled_identifiers.revision, + )?; + smfh.setprop_default_instance( + "config/sled_serial", + info.config + .sled_identifiers + .serial + .to_string(), )?; } else { info!( @@ -4475,7 +4530,7 @@ impl ServiceManager { )?; smfh.setprop_default_instance( "config/sled_uuid", - info.config.sled_id, + info.config.sled_identifiers.sled_id, )?; } for address in &request.addresses { @@ -4518,7 +4573,7 @@ impl ServiceManager { )?; smfh.setprop_default_instance( "config/sled_uuid", - info.config.sled_id, + info.config.sled_identifiers.sled_id, )?; } smfh.delpropvalue_default_instance( @@ -4961,7 +5016,13 @@ mod illumos_tests { fn make_config(&self) -> Config { Config { - sled_id: Uuid::new_v4(), + sled_identifiers: SledIdentifiers { + rack_id: Uuid::new_v4(), + sled_id: Uuid::new_v4(), + model: "fake-gimlet".to_string(), + revision: 1, + serial: "fake-serial".to_string(), + }, sidecar_revision: SidecarRevision::Physical( "rev_whatever_its_a_test".to_string(), ), diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index 4a4be08f76..0d38746b16 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -451,7 +451,7 @@ impl SledAgent { serial: baseboard.identifier().to_string(), }; let metrics_manager = - MetricsManager::new(&log, identifiers, *sled_address.ip())?; + MetricsManager::new(&log, identifiers.clone(), *sled_address.ip())?; // Start tracking the underlay physical links. for link in underlay::find_chelsio_links(&config.data_links)? { @@ -497,10 +497,8 @@ impl SledAgent { }; let updates = UpdateManager::new(update_config); - let svc_config = services::Config::new( - request.body.id.into_untyped_uuid(), - config.sidecar_revision.clone(), - ); + let svc_config = + services::Config::new(identifiers, config.sidecar_revision.clone()); // Get our rack network config from the bootstore; we cannot proceed // until we have this, as we need to know which switches have uplinks to diff --git a/tools/dendrite_openapi_version b/tools/dendrite_openapi_version index 75c57e9d29..a23ac9fdde 100755 --- a/tools/dendrite_openapi_version +++ b/tools/dendrite_openapi_version @@ -1,2 +1,2 @@ -COMMIT="f3810e7bc1f0d746b5e95b3aaff32e52b02dfdfa" -SHA2="3a54305ab4b1270c9a5fb0603f481fce199f3767c174a03559ff642f7f44687e" +COMMIT="f79076d4630895a0177839ea041c355e2589b9c1" +SHA2="d1a503d99fe7e12dfe20f83031a8ce718a28d5caa88c41d2ceb298ed287acb4e" diff --git a/tools/dendrite_stub_checksums b/tools/dendrite_stub_checksums index fe420e299e..9647265428 100644 --- a/tools/dendrite_stub_checksums +++ b/tools/dendrite_stub_checksums @@ -1,3 +1,3 @@ -CIDL_SHA256_ILLUMOS="c1506f6f818327523e6ff3102432a2038d319338b883235664b34f9132ff676a" -CIDL_SHA256_LINUX_DPD="fc9ea4dc22e761dce3aa4d252983360f799426a0c23ea8f347653664d3e2b55a" -CIDL_SHA256_LINUX_SWADM="9da0dd6c972206338971a90144b1c35e101d69aaacf26240a45cef45d828b090" +CIDL_SHA256_ILLUMOS="7dbd752327234d6321ae9b06fb1eb72874bd3bcf0122ee545f60fe2579d9746c" +CIDL_SHA256_LINUX_DPD="6ffcebe792c268754352c29436d032027123ff33ee45fc9dfa4fe284e5eb0cec" +CIDL_SHA256_LINUX_SWADM="d6d9c42411cead6d823f21ba3082001595a4b47c7b8ec35f323bbe22eb8fa40a" From 7d2763240101b633c9e425049e0325a1314d21e0 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 14 Oct 2024 23:14:55 +0000 Subject: [PATCH 2/6] schema updates: new switch identifiers & formatting --- oximeter/oximeter/schema/dendrite.toml | 22 +++++++++++++++++- .../oximeter/schema/switch-data-link.toml | 23 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/oximeter/oximeter/schema/dendrite.toml b/oximeter/oximeter/schema/dendrite.toml index 251a0cccee..e92b180971 100644 --- a/oximeter/oximeter/schema/dendrite.toml +++ b/oximeter/oximeter/schema/dendrite.toml @@ -18,7 +18,7 @@ versions = [ # switch for its statistics, which is why these fields are included. # Dendrite may eventually report statistics about itself, or other aspects # not related to the switch, so they belong here, not the target. - { added_in = 1, fields = [ "switch_model", "switch_revision", "switch_id", "switch_serial", "switch_slot" ] } + { added_in = 1, fields = [ "switch_id", "switch_fab", "switch_lot", "switch_wafer", "switch_wafer_loc_x", "switch_wafer_loc_y", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] } ] [fields.rack_id] @@ -53,6 +53,26 @@ description = "Revision number of the switch being managed" type = "uuid" description = "ID of the switch being managed" +[fields.switch_fab] +type = "string" +description = "Fabric the switch the link is on" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch the link is on" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch the link is on" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch the link is on" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch the link is on" + [fields.switch_serial] type = "string" description = "Serial number of the switch being managed" diff --git a/oximeter/oximeter/schema/switch-data-link.toml b/oximeter/oximeter/schema/switch-data-link.toml index c7543c7193..11373a9928 100644 --- a/oximeter/oximeter/schema/switch-data-link.toml +++ b/oximeter/oximeter/schema/switch-data-link.toml @@ -4,8 +4,9 @@ format_version = 1 name = "switch_data_link" description = "A network data link on an Oxide switch" authz_scope = "fleet" + versions = [ - { version = 1, fields = [ "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] }, + { version = 1, fields = [ "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_fab", "switch_lot", "switch_wafer", "switch_wafer_loc_x", "switch_wafer_loc_y", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] }, ] [[metrics]] @@ -251,6 +252,26 @@ description = "Serial number of the sled managing the link's switch" type = "uuid" description = "ID of the switch the link is on" +[fields.switch_fab] +type = "string" +description = "Fabric the switch the link is on" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch the link is on" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch the link is on" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch the link is on" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch the link is on" + [fields.switch_model] type = "string" description = "The model number switch the link is on" From 915f7e459d3d75657178e4df972c224f2dbf19e3 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Wed, 9 Oct 2024 21:10:11 +0000 Subject: [PATCH 3/6] update dendrite --- package-manifest.toml | 12 ++++++------ tools/dendrite_openapi_version | 4 ++-- tools/dendrite_stub_checksums | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 35b86052e5..a3f69dcd57 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -717,8 +717,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" -source.sha256 = "7dbd752327234d6321ae9b06fb1eb72874bd3bcf0122ee545f60fe2579d9746c" +source.commit = "b425a6c783b3081613ffa00407f271cae06568c4" +source.sha256 = "5acb29662fa052fc7805716cf761c39bf0cef168c1e33d9fdb259104503203e5" output.type = "zone" output.intermediate_only = true @@ -744,8 +744,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" -source.sha256 = "12d02211398203d56b48bfe5dbcad1a4e968a5627e94bd1093b45d77181038fe" +source.commit = "b425a6c783b3081613ffa00407f271cae06568c4" +source.sha256 = "2c1f901ac96028264fd904fb197d1aaef522432ad16097d3606321101813dfde" output.type = "zone" output.intermediate_only = true @@ -764,8 +764,8 @@ only_for_targets.image = "standard" # the other `source.*` keys. source.type = "prebuilt" source.repo = "dendrite" -source.commit = "f79076d4630895a0177839ea041c355e2589b9c1" -source.sha256 = "b128356fd2986344b393ca178ee7e7fc7aa82c08a85b4088e3df61ab057263f3" +source.commit = "b425a6c783b3081613ffa00407f271cae06568c4" +source.sha256 = "94d1231d5b4ba5ea3cd7ce90ea0c46d43c87bfdd3e694cc99a78f8578ba1b9f7" output.type = "zone" output.intermediate_only = true diff --git a/tools/dendrite_openapi_version b/tools/dendrite_openapi_version index a23ac9fdde..eabe11c065 100755 --- a/tools/dendrite_openapi_version +++ b/tools/dendrite_openapi_version @@ -1,2 +1,2 @@ -COMMIT="f79076d4630895a0177839ea041c355e2589b9c1" -SHA2="d1a503d99fe7e12dfe20f83031a8ce718a28d5caa88c41d2ceb298ed287acb4e" +COMMIT="b425a6c783b3081613ffa00407f271cae06568c4" +SHA2="20567cfb7028ab9ca08ce9423c9818f9151519dea789c3cb3016bc4cbb3927a4" diff --git a/tools/dendrite_stub_checksums b/tools/dendrite_stub_checksums index 9647265428..2b24e4502c 100644 --- a/tools/dendrite_stub_checksums +++ b/tools/dendrite_stub_checksums @@ -1,3 +1,3 @@ -CIDL_SHA256_ILLUMOS="7dbd752327234d6321ae9b06fb1eb72874bd3bcf0122ee545f60fe2579d9746c" -CIDL_SHA256_LINUX_DPD="6ffcebe792c268754352c29436d032027123ff33ee45fc9dfa4fe284e5eb0cec" -CIDL_SHA256_LINUX_SWADM="d6d9c42411cead6d823f21ba3082001595a4b47c7b8ec35f323bbe22eb8fa40a" +CIDL_SHA256_ILLUMOS="5acb29662fa052fc7805716cf761c39bf0cef168c1e33d9fdb259104503203e5" +CIDL_SHA256_LINUX_DPD="78c5f9d3a71767e1b1de44ad289ccef5ae79faed8a19e4791f6b32f3f948b4c1" +CIDL_SHA256_LINUX_SWADM="731abee76a514f677bcbd58af42efca3ecdbdd25d03e45419e6b32e3dc04000d" From 86b02d6a331c159446186dc25982c5acd0bf586e Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 21 Oct 2024 23:16:43 +0000 Subject: [PATCH 4/6] expunge old time series and switch slot type --- .../replicated/13/timeseries-to-delete.txt | 24 +++++++++++++++++++ .../single-node/13/timeseries-to-delete.txt | 24 +++++++++++++++++++ oximeter/db/src/model.rs | 2 +- .../oximeter/schema/switch-data-link.toml | 4 ++-- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 oximeter/db/schema/replicated/13/timeseries-to-delete.txt create mode 100644 oximeter/db/schema/single-node/13/timeseries-to-delete.txt diff --git a/oximeter/db/schema/replicated/13/timeseries-to-delete.txt b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt new file mode 100644 index 0000000000..6dae365b89 --- /dev/null +++ b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt @@ -0,0 +1,24 @@ +switch_data_link:bytes_sent +switch_data_link:bytes_received +switch_data_link:errors_sent +switch_data_link:errors_received +switch_data_link:receive_crc_error_drops +switch_data_link:receive_buffer_full_drops +switch_data_link:packets_sent +switch_data_link:packets_received +switch_data_link:link_up +switch_data_link:link_enabled +switch_data_link:link_fsm +switch_data_link:pcs_bad_sync_headers +switch_data_link:pcs_errored_blocks +switch_data_link:pcs_block_lock_loss +switch_data_link:pcs_high_ber +switch_data_link:pcs_valid_errors +switch_data_link:pcs_invalid_errors +switch_data_link:pcs_unknown_errors +switch_data_link::pcs_sync_loss +switch_data_link:fec_high_symbol_errors +switch_data_link:fec_sync_aligned +switch_data_link:fec_corrected_blocks +switch_data_link:fec_uncorrected_blocks +switch_data_link:fec_symbol_errors diff --git a/oximeter/db/schema/single-node/13/timeseries-to-delete.txt b/oximeter/db/schema/single-node/13/timeseries-to-delete.txt new file mode 100644 index 0000000000..6dae365b89 --- /dev/null +++ b/oximeter/db/schema/single-node/13/timeseries-to-delete.txt @@ -0,0 +1,24 @@ +switch_data_link:bytes_sent +switch_data_link:bytes_received +switch_data_link:errors_sent +switch_data_link:errors_received +switch_data_link:receive_crc_error_drops +switch_data_link:receive_buffer_full_drops +switch_data_link:packets_sent +switch_data_link:packets_received +switch_data_link:link_up +switch_data_link:link_enabled +switch_data_link:link_fsm +switch_data_link:pcs_bad_sync_headers +switch_data_link:pcs_errored_blocks +switch_data_link:pcs_block_lock_loss +switch_data_link:pcs_high_ber +switch_data_link:pcs_valid_errors +switch_data_link:pcs_invalid_errors +switch_data_link:pcs_unknown_errors +switch_data_link::pcs_sync_loss +switch_data_link:fec_high_symbol_errors +switch_data_link:fec_sync_aligned +switch_data_link:fec_corrected_blocks +switch_data_link:fec_uncorrected_blocks +switch_data_link:fec_symbol_errors diff --git a/oximeter/db/src/model.rs b/oximeter/db/src/model.rs index d57819b0d0..5f4db1e156 100644 --- a/oximeter/db/src/model.rs +++ b/oximeter/db/src/model.rs @@ -45,7 +45,7 @@ use uuid::Uuid; /// - [`crate::Client::initialize_db_with_version`] /// - [`crate::Client::ensure_schema`] /// - The `clickhouse-schema-updater` binary in this crate -pub const OXIMETER_VERSION: u64 = 12; +pub const OXIMETER_VERSION: u64 = 13; // Wrapper type to represent a boolean in the database. // diff --git a/oximeter/oximeter/schema/switch-data-link.toml b/oximeter/oximeter/schema/switch-data-link.toml index 11373a9928..8919ff45a0 100644 --- a/oximeter/oximeter/schema/switch-data-link.toml +++ b/oximeter/oximeter/schema/switch-data-link.toml @@ -254,7 +254,7 @@ description = "ID of the switch the link is on" [fields.switch_fab] type = "string" -description = "Fabric the switch the link is on" +description = "Fabrication plant identifier of the switch the link is on" [fields.switch_lot] type = "string" @@ -285,7 +285,7 @@ type = "string" description = "Serial number of the switch the link is on" [fields.switch_slot] -type = "u32" +type = "u16" description = "Slot number of the switch the link is on" [fields.port_id] From bfffdf5c94fdc04efe8d0304ae04b141ca108c61 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 21 Oct 2024 23:28:08 +0000 Subject: [PATCH 5/6] toml consistency --- oximeter/oximeter/schema/dendrite.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oximeter/oximeter/schema/dendrite.toml b/oximeter/oximeter/schema/dendrite.toml index e92b180971..400514c4e4 100644 --- a/oximeter/oximeter/schema/dendrite.toml +++ b/oximeter/oximeter/schema/dendrite.toml @@ -55,7 +55,7 @@ description = "ID of the switch being managed" [fields.switch_fab] type = "string" -description = "Fabric the switch the link is on" +description = "Fabrication plant identifier of the switch the link is on" [fields.switch_lot] type = "string" @@ -78,5 +78,5 @@ type = "string" description = "Serial number of the switch being managed" [fields.switch_slot] -type = "u32" +type = "u16" description = "Slot number of the switch the link is on" From f02e00366cdb78d5f049699edd7bc9ba81265d0e Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 21 Oct 2024 23:49:34 +0000 Subject: [PATCH 6/6] expunge dendrite ts --- oximeter/db/schema/replicated/13/timeseries-to-delete.txt | 1 + oximeter/db/schema/single-node/13/timeseries-to-delete.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/oximeter/db/schema/replicated/13/timeseries-to-delete.txt b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt index 6dae365b89..8f72c151f5 100644 --- a/oximeter/db/schema/replicated/13/timeseries-to-delete.txt +++ b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt @@ -22,3 +22,4 @@ switch_data_link:fec_sync_aligned switch_data_link:fec_corrected_blocks switch_data_link:fec_uncorrected_blocks switch_data_link:fec_symbol_errors +dendrite:sample_collection_duration diff --git a/oximeter/db/schema/single-node/13/timeseries-to-delete.txt b/oximeter/db/schema/single-node/13/timeseries-to-delete.txt index 6dae365b89..8f72c151f5 100644 --- a/oximeter/db/schema/single-node/13/timeseries-to-delete.txt +++ b/oximeter/db/schema/single-node/13/timeseries-to-delete.txt @@ -22,3 +22,4 @@ switch_data_link:fec_sync_aligned switch_data_link:fec_corrected_blocks switch_data_link:fec_uncorrected_blocks switch_data_link:fec_symbol_errors +dendrite:sample_collection_duration