From bd0ce7383dcb96ac9ed94a0bf88af8da8075bbd2 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 7 Oct 2024 17:58:35 +0000 Subject: [PATCH 1/8] 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/8] 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/8] 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/8] 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/8] 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 ab1f3779636d3b2ada924eb100005589d26c9a63 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 21 Oct 2024 23:49:34 +0000 Subject: [PATCH 6/8] expunge dendrite ts and fix ts name --- oximeter/db/schema/replicated/13/timeseries-to-delete.txt | 3 ++- oximeter/db/schema/single-node/13/timeseries-to-delete.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/oximeter/db/schema/replicated/13/timeseries-to-delete.txt b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt index 6dae365b89..da3f1d6376 100644 --- a/oximeter/db/schema/replicated/13/timeseries-to-delete.txt +++ b/oximeter/db/schema/replicated/13/timeseries-to-delete.txt @@ -16,9 +16,10 @@ 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: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 +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..da3f1d6376 100644 --- a/oximeter/db/schema/single-node/13/timeseries-to-delete.txt +++ b/oximeter/db/schema/single-node/13/timeseries-to-delete.txt @@ -16,9 +16,10 @@ 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: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 +dendrite:sample_collection_duration From 6a928644fcf945422486747bc06043600af77a45 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Tue, 15 Oct 2024 20:32:21 +0000 Subject: [PATCH 7/8] Add tfport-data-link timeseries schema and SMF config adds. Related to https://github.com/oxidecomputer/dendrite/pull/1033. New timeseries (from sled-data-link) as we've added switch information in the metadata. --- common/src/address.rs | 2 +- .../oximeter/schema/tfport-data-link.toml | 132 ++++++++++++++++++ package-manifest.toml | 12 +- sled-agent/src/metrics.rs | 16 +-- sled-agent/src/services.rs | 114 +++++++++++++-- tools/dendrite_openapi_version | 4 +- tools/dendrite_stub_checksums | 6 +- 7 files changed, 257 insertions(+), 29 deletions(-) create mode 100644 oximeter/oximeter/schema/tfport-data-link.toml diff --git a/common/src/address.rs b/common/src/address.rs index 7cf00d5228..8d2e9108df 100644 --- a/common/src/address.rs +++ b/common/src/address.rs @@ -48,7 +48,7 @@ pub const MGS_PORT: u16 = 12225; pub const WICKETD_PORT: u16 = 12226; pub const BOOTSTRAP_ARTIFACT_PORT: u16 = 12227; pub const CRUCIBLE_PANTRY_PORT: u16 = 17000; - +pub const TFPORTD_PORT: u16 = 12231; pub const NEXUS_INTERNAL_PORT: u16 = 12221; /// The port on which Nexus exposes its external API on the underlay network. diff --git a/oximeter/oximeter/schema/tfport-data-link.toml b/oximeter/oximeter/schema/tfport-data-link.toml new file mode 100644 index 0000000000..6492733227 --- /dev/null +++ b/oximeter/oximeter/schema/tfport-data-link.toml @@ -0,0 +1,132 @@ +format_version = 1 + +[target] +name = "tfport_data_link" +description = "A network data link on a tfport interface" +authz_scope = "fleet" + +versions = [ + { version = 1, fields = [ "kind", "link_name", "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" ] }, +] + +[fields.kind] +type = "string" +description = "The kind or class of the data link" + +[fields.link_name] +type = "string" +description = "Name of the data link" + +[fields.rack_id] +type = "uuid" +description = "ID for the link's rack" + +[fields.sled_id] +type = "uuid" +description = "ID for the link's sled" + +[fields.sled_model] +type = "string" +description = "Model number of the link's sled" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch the link is on" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier of 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" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch the link is on" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch the link is on" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch the link is on" + +[[metrics]] +name = "bytes_sent" +description = "Number of bytes sent on the link" +units = "bytes" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] + +[[metrics]] +name = "bytes_received" +description = "Number of bytes received on the link" +units = "bytes" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] + +[[metrics]] +name = "packets_sent" +description = "Number of packets sent on the link" +units = "count" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] + +[[metrics]] +name = "packets_received" +description = "Number of packets received on the link" +units = "count" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] + +[[metrics]] +name = "errors_sent" +description = "Number of errors encountered when sending on the link" +units = "count" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] + +[[metrics]] +name = "errors_received" +description = "Number of errors encountered when receiving on the link" +units = "count" +datum_type = "cumulative_u64" +versions = [ + { added_in = 1, fields = [] } +] diff --git a/package-manifest.toml b/package-manifest.toml index a3f69dcd57..3e345de35b 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 = "b425a6c783b3081613ffa00407f271cae06568c4" -source.sha256 = "5acb29662fa052fc7805716cf761c39bf0cef168c1e33d9fdb259104503203e5" +source.commit = "a442c5b3c999a91aa2d4d1ec853a7ef127f303cb" +source.sha256 = "48ace58394523dc6cccd6b33a673e356c965f5c2d41a3f6173a58917fa719fef" 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 = "b425a6c783b3081613ffa00407f271cae06568c4" -source.sha256 = "2c1f901ac96028264fd904fb197d1aaef522432ad16097d3606321101813dfde" +source.commit = "a442c5b3c999a91aa2d4d1ec853a7ef127f303cb" +source.sha256 = "10fbc392284a41f4761efb6fa8912eecdc8d86edb24db480241da4cd74dc60eb" 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 = "b425a6c783b3081613ffa00407f271cae06568c4" -source.sha256 = "94d1231d5b4ba5ea3cd7ce90ea0c46d43c87bfdd3e694cc99a78f8578ba1b9f7" +source.commit = "a442c5b3c999a91aa2d4d1ec853a7ef127f303cb" +source.sha256 = "d13f846edabb2d631a545470f1e44a310de62825fd2a78a0854bdea534eaf215" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/src/metrics.rs b/sled-agent/src/metrics.rs index ef9edd9a07..d07abb94ad 100644 --- a/sled-agent/src/metrics.rs +++ b/sled-agent/src/metrics.rs @@ -223,15 +223,15 @@ async fn remove_datalink( Ok(_) => { debug!( log, - "Removed VNIC from tracked links"; + "removed VNIC from tracked links"; "link_name" => name, ); } Err(err) => { error!( log, - "Failed to remove VNIC from kstat sampler, \ - metrics may still be produced for it"; + "failed to remove VNIC from kstat sampler, \ + metrics may still be produced for it"; "link_name" => name, "error" => ?err, ); @@ -263,7 +263,7 @@ async fn add_datalink( Ok(id) => { debug!( log, - "Added new link to kstat sampler"; + "added new link to kstat sampler"; "link_name" => entry.key(), "link_kind" => %link.kind(), "zone_name" => %link.zone_name(), @@ -273,8 +273,8 @@ async fn add_datalink( Err(err) => { error!( log, - "Failed to add VNIC to kstat sampler, \ - no metrics will be collected for it"; + "failed to add VNIC to kstat sampler, \ + no metrics will be collected for it"; "link_name" => entry.key(), "link_kind" => %link.kind(), "zone_name" => %link.zone_name(), @@ -310,14 +310,14 @@ async fn sync_sled_datalinks( Ok(_) => { debug!( log, - "Updated link already tracked by kstat sampler"; + "updated link already tracked by kstat sampler"; "link_name" => link_name, ); } Err(err) => { error!( log, - "Failed to update link already tracked by kstat sampler"; + "failed to update link already tracked by kstat sampler"; "link_name" => link_name, "error" => ?err, ); diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index 9d23638c9e..91c5e0809e 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -77,6 +77,7 @@ use omicron_common::address::LLDP_PORT; use omicron_common::address::MGS_PORT; use omicron_common::address::RACK_PREFIX; use omicron_common::address::SLED_PREFIX; +use omicron_common::address::TFPORTD_PORT; use omicron_common::address::WICKETD_NEXUS_PROXY_PORT; use omicron_common::address::WICKETD_PORT; use omicron_common::address::{ @@ -2852,17 +2853,68 @@ impl ServiceManager { SwitchService::Tfport { pkt_source, asic } => { info!(self.inner.log, "Setting up tfport service"); let mut tfport_config = - PropertyGroupBuilder::new("config") + PropertyGroupBuilder::new("config"); + + tfport_config = tfport_config + .add_property( + "host", + "astring", + &format!("[{}]", Ipv6Addr::LOCALHOST), + ) + .add_property( + "port", + "astring", + &format!("{}", DENDRITE_PORT), + ); + + if let Some(i) = info { + tfport_config = tfport_config + .add_property( + "rack_id", + "astring", + &i.rack_id.to_string(), + ) + .add_property( + "sled_id", + "astring", + &i.config + .sled_identifiers + .sled_id + .to_string(), + ) + .add_property( + "sled_model", + "astring", + &i.config + .sled_identifiers + .model + .to_string(), + ) .add_property( - "host", + "sled_revision", "astring", - &format!("[{}]", Ipv6Addr::LOCALHOST), + &i.config + .sled_identifiers + .revision + .to_string(), ) .add_property( - "port", + "sled_serial", "astring", - &format!("{}", DENDRITE_PORT), + &i.config + .sled_identifiers + .serial + .to_string(), ); + } + + for address in addresses { + tfport_config = tfport_config.add_property( + "address", + "astring", + &format!("[{}]:{}", address, TFPORTD_PORT), + ); + } let is_gimlet = is_gimlet().map_err(|e| { Error::Underlay( @@ -4426,7 +4478,7 @@ impl ServiceManager { } else { info!( self.inner.log, - "no rack_id/sled_id available yet" + "no sled info available yet" ); } smfh.delpropvalue_default_instance( @@ -4501,9 +4553,53 @@ impl ServiceManager { info!(self.inner.log, "refreshed lldpd service with new configuration") } SwitchService::Tfport { .. } => { - // Since tfport and dpd communicate using localhost, - // the tfport service shouldn't need to be - // restarted. + info!(self.inner.log, "configuring tfport service"); + if let Some(info) = self.inner.sled_info.get() { + smfh.setprop_default_instance( + "config/rack_id", + info.rack_id, + )?; + smfh.setprop_default_instance( + "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!( + self.inner.log, + "no sled info available yet" + ); + } + smfh.delpropvalue_default_instance( + "config/address", + "*", + )?; + for address in &request.addresses { + smfh.addpropvalue_type_default_instance( + "config/address", + &format!("[{}]:{}", address, TFPORTD_PORT), + "astring", + )?; + } + smfh.refresh()?; + info!(self.inner.log, "refreshed tfport service with new configuration") } SwitchService::Pumpkind { .. } => { // Unless we want to plumb through the "only log diff --git a/tools/dendrite_openapi_version b/tools/dendrite_openapi_version index eabe11c065..725d3a6ea1 100755 --- a/tools/dendrite_openapi_version +++ b/tools/dendrite_openapi_version @@ -1,2 +1,2 @@ -COMMIT="b425a6c783b3081613ffa00407f271cae06568c4" -SHA2="20567cfb7028ab9ca08ce9423c9818f9151519dea789c3cb3016bc4cbb3927a4" +COMMIT="a442c5b3c999a91aa2d4d1ec853a7ef127f303cb" +SHA2="b1bcf5ad3c2ce556d861367aa2942340a7ccfe592c83e96dd06923cc151ac26b" diff --git a/tools/dendrite_stub_checksums b/tools/dendrite_stub_checksums index 2b24e4502c..f0ea404d37 100644 --- a/tools/dendrite_stub_checksums +++ b/tools/dendrite_stub_checksums @@ -1,3 +1,3 @@ -CIDL_SHA256_ILLUMOS="5acb29662fa052fc7805716cf761c39bf0cef168c1e33d9fdb259104503203e5" -CIDL_SHA256_LINUX_DPD="78c5f9d3a71767e1b1de44ad289ccef5ae79faed8a19e4791f6b32f3f948b4c1" -CIDL_SHA256_LINUX_SWADM="731abee76a514f677bcbd58af42efca3ecdbdd25d03e45419e6b32e3dc04000d" +CIDL_SHA256_ILLUMOS="48ace58394523dc6cccd6b33a673e356c965f5c2d41a3f6173a58917fa719fef" +CIDL_SHA256_LINUX_DPD="0e528d4fe9631a9b075594d496e7aaca78dabdefd3e05351b21f5a814a435505" +CIDL_SHA256_LINUX_SWADM="cce690cba4bd585c0257bdc95cc257d04534c6b695d154341c9915cebd8124f9" From 24c967f68413228880ef7b9f9a6bcd12862d19b0 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Tue, 15 Oct 2024 20:32:21 +0000 Subject: [PATCH 8/8] Add switch/sled metadata to ddm/mgd related timeseries --- .../replicated/14/timeseries-to-delete.txt | 53 +++++++++ .../single-node/14/timeseries-to-delete.txt | 39 +++++++ oximeter/db/src/model.rs | 2 +- oximeter/oximeter/schema/bfd-session.toml | 60 +++++++++- oximeter/oximeter/schema/bgp-session.toml | 54 ++++++++- oximeter/oximeter/schema/ddm-router.toml | 54 ++++++++- oximeter/oximeter/schema/ddm-session.toml | 54 ++++++++- oximeter/oximeter/schema/mg-lower.toml | 54 ++++++++- .../schema/static-routing-config.toml | 54 ++++++++- oximeter/oximeter/schema/switch-rib.toml | 54 ++++++++- package-manifest.toml | 12 +- sled-agent/src/services.rs | 110 ++++++++++++++++-- test-utils/src/dev/maghemite.rs | 4 +- tools/maghemite_ddm_openapi_version | 2 +- tools/maghemite_mg_openapi_version | 2 +- tools/maghemite_mgd_checksums | 4 +- 16 files changed, 581 insertions(+), 31 deletions(-) create mode 100644 oximeter/db/schema/replicated/14/timeseries-to-delete.txt create mode 100644 oximeter/db/schema/single-node/14/timeseries-to-delete.txt diff --git a/oximeter/db/schema/replicated/14/timeseries-to-delete.txt b/oximeter/db/schema/replicated/14/timeseries-to-delete.txt new file mode 100644 index 0000000000..3cf58f9f59 --- /dev/null +++ b/oximeter/db/schema/replicated/14/timeseries-to-delete.txt @@ -0,0 +1,53 @@ +bgp_session:active_connections_accepted +bgp_session:connection_retries +bgp_session:hold_timer_expirations +bgp_session:idle_hold_timer_expirations +bgp_session:keepalive_send_failures +bgp_session:keepalives_received +bgp_session:keepalives_sent +bgp_session:notification_send_failures +bgp_session:open_handle_failures +bgp_session:open_send_failures +bgp_session:opens_received +bgp_session:opens_sent +bgp_session:passive_connections_accepted +bgp_session:prefixes_advertised +bgp_session:prefixes_imported +bgp_session:transition_to_active +bgp_session:transition_to_connect +bgp_session:transition_to_established +bgp_session:transition_to_idle +bgp_session:transition_to_open_confirm +bgp_session:transition_to_open_sent +bgp_session:transition_to_session_setup +bgp_session:unexpected_keepalive_messages +bgp_session:unexpected_open_messages +bgp_session:unexpected_update_messages +bgp_session:update_nexthop_missing +bgp_session:update_send_failures +bgp_session:updates_received +bgp_session:updates_sent +bfd_session:control_packet_send_failures +bfd_session:control_packets_sent +bfd_session:control_packets_received +bfd_session:message_receive_error +bfd_session:timeout_expired +bfd_session:transition_to_down +bfd_session:transition_to_init +bfd_session:transition_to_up +mg_lower:routes_blocked_by_link_state +switch_rib:active_routes +ddm_session:advertisements_received +ddm_session:advertisements_sent +ddm_session:imported_tunnel_endpoints +ddm_session:imported_underlay_prefixes +ddm_session:peer_address_changes +ddm_session:peer_expirations +ddm_session:peer_sessions_established +ddm_session:solicitations_received +ddm_session:solicitations_sent +ddm_session:update_send_fail +ddm_session:updates_received +ddm_session:updates_sent +ddm_router:originated_tunnel_endpoints +ddm_router:originated_underlay_prefixes diff --git a/oximeter/db/schema/single-node/14/timeseries-to-delete.txt b/oximeter/db/schema/single-node/14/timeseries-to-delete.txt new file mode 100644 index 0000000000..379b699275 --- /dev/null +++ b/oximeter/db/schema/single-node/14/timeseries-to-delete.txt @@ -0,0 +1,39 @@ +bgp_session:active_connections_accepted +bgp_session:connection_retries +bgp_session:hold_timer_expirations +bgp_session:idle_hold_timer_expirations +bgp_session:keepalive_send_failures +bgp_session:keepalives_received +bgp_session:keepalives_sent +bgp_session:notification_send_failures +bgp_session:open_handle_failures +bgp_session:open_send_failures +bgp_session:opens_received +bgp_session:opens_sent +bgp_session:passive_connections_accepted +bgp_session:prefixes_advertised +bgp_session:prefixes_imported +bgp_session:transition_to_active +bgp_session:transition_to_connect +bgp_session:transition_to_established +bgp_session:transition_to_idle +bgp_session:transition_to_open_confirm +bgp_session:transition_to_open_sent +bgp_session:transition_to_session_setup +bgp_session:unexpected_keepalive_messages +bgp_session:unexpected_open_messages +bgp_session:unexpected_update_messages +bgp_session:update_nexthop_missing +bgp_session:update_send_failures +bgp_session:updates_received +bgp_session:updates_sent +bfd_session:control_packet_send_failures +bfd_session:control_packets_sent +bfd_session:control_packets_received +bfd_session:message_receive_error +bfd_session:timeout_expired +bfd_session:transition_to_down +bfd_session:transition_to_init +bfd_session:transition_to_up +mg_lower:routes_blocked_by_link_state +switch_rib:active_routes diff --git a/oximeter/db/src/model.rs b/oximeter/db/src/model.rs index 5f4db1e156..035f0c4a42 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 = 13; +pub const OXIMETER_VERSION: u64 = 14; // Wrapper type to represent a boolean in the database. // diff --git a/oximeter/oximeter/schema/bfd-session.toml b/oximeter/oximeter/schema/bfd-session.toml index a7bdcf52e9..a2fa46671d 100644 --- a/oximeter/oximeter/schema/bfd-session.toml +++ b/oximeter/oximeter/schema/bfd-session.toml @@ -5,7 +5,7 @@ name = "bfd_session" description = "A Bidirectional Forwarding Protocol (BFD) session" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "rack_id", "sled_id", "peer" ] }, + { version = 1, fields = [ "hostname", "peer", "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]] @@ -88,6 +88,10 @@ versions = [ type = "string" description = "The hostname of the machine running the BFD session" +[fields.peer] +type = "ip_addr" +description = "Address of the BFD session peer" + [fields.rack_id] type = "uuid" description = "ID of the rack running the BFD session" @@ -96,6 +100,54 @@ description = "ID of the rack running the BFD session" type = "uuid" description = "ID of the sled running the BFD session" -[fields.peer] -type = "ip_addr" -description = "Address of the BFD session peer" +[fields.sled_model] +type = "string" +description = "Model number of the sled running the BFD session" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the BFD session" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the BFD session" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the BFD session" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier of the switch running the BFD session" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the BFD session" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the BFD session" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the BFD session" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the BFD session" + +[fields.switch_model] +type = "string" +description = "The model number switch running the BFD session" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the BFD session" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the BFD session" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the BFD session" diff --git a/oximeter/oximeter/schema/bgp-session.toml b/oximeter/oximeter/schema/bgp-session.toml index 093560beea..e80359abe4 100644 --- a/oximeter/oximeter/schema/bgp-session.toml +++ b/oximeter/oximeter/schema/bgp-session.toml @@ -5,7 +5,7 @@ name = "bgp_session" description = "A peer-to-peer session of the Border Gateway Protocol" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "local_asn", "peer", "rack_id", "sled_id" ] } + { version = 1, fields = [ "hostname", "local_asn", "peer", "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]] @@ -291,3 +291,55 @@ description = "ID of the rack on which our BGP peer is running" [fields.sled_id] type = "uuid" description = "ID of the sled on which our BGP peer is running" + +[fields.sled_model] +type = "string" +description = "Model number of the sled on which our BGP peer is running" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled on which our BGP peer is running" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled on which our BGP peer is running" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch on which our BGP peer is running" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch on which our BGP peer is running" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch on which our BGP peer is running" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch on which our BGP peer is running" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch on which our BGP peer is running" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch on which our BGP peer is running" + +[fields.switch_model] +type = "string" +description = "The model number switch on which our BGP peer is running" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch on which our BGP peer is running" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch on which our BGP peer is running" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch on which our BGP peer is running" diff --git a/oximeter/oximeter/schema/ddm-router.toml b/oximeter/oximeter/schema/ddm-router.toml index 2cb0851852..589162cb10 100644 --- a/oximeter/oximeter/schema/ddm-router.toml +++ b/oximeter/oximeter/schema/ddm-router.toml @@ -5,7 +5,7 @@ name = "ddm_router" description = "A Delay-Driven Multipath (DDM) router" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "rack_id", "sled_id" ] }, + { version = 1, fields = [ "hostname", "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]] @@ -37,3 +37,55 @@ description = "ID of the rack running the DDM router" [fields.sled_id] type = "uuid" description = "ID of the sled running the DDM router" + +[fields.sled_model] +type = "string" +description = "Model number of the sled running the DDM router" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the DDM router" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the DDM router" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the DDM router" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch running the DDM router" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the DDM router" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the DDM router" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the DDM router" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the DDM router" + +[fields.switch_model] +type = "string" +description = "The model number switch running the DDM router" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the DDM router" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the DDM router" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the DDM router" diff --git a/oximeter/oximeter/schema/ddm-session.toml b/oximeter/oximeter/schema/ddm-session.toml index 89f6751524..62feabb99d 100644 --- a/oximeter/oximeter/schema/ddm-session.toml +++ b/oximeter/oximeter/schema/ddm-session.toml @@ -5,7 +5,7 @@ name = "ddm_session" description = "A session in a Delay-Driven Multipath (DDM) router" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "interface", "rack_id", "sled_id" ] }, + { version = 1, fields = [ "hostname", "interface", "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]] @@ -134,3 +134,55 @@ description = "ID of the rack running the DDM router" [fields.sled_id] type = "uuid" description = "ID of the sled running the DDM router" + +[fields.sled_model] +type = "string" +description = "Model number of the sled running the DDM router" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the DDM router" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the DDM router" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the DDM router" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch running the DDM router" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the DDM router" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the DDM router" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the DDM router" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the DDM router" + +[fields.switch_model] +type = "string" +description = "The model number switch running the DDM router" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the DDM router" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the DDM router" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the DDM router" diff --git a/oximeter/oximeter/schema/mg-lower.toml b/oximeter/oximeter/schema/mg-lower.toml index bcdbbc0d02..55149636d3 100644 --- a/oximeter/oximeter/schema/mg-lower.toml +++ b/oximeter/oximeter/schema/mg-lower.toml @@ -11,7 +11,7 @@ exchanging information with peers.\ """ authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "rack_id", "sled_id" ] }, + { version = 1, fields = [ "hostname", "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]] @@ -38,3 +38,55 @@ description = "ID of the rack running the router" [fields.sled_id] type = "uuid" description = "ID of the sled running the router" + +[fields.sled_model] +type = "string" +description = "Model number of the sled running the router" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the router" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the router" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the router" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch running the router" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the router" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the router" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the router" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the router" + +[fields.switch_model] +type = "string" +description = "The model number switch running the router" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the router" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the router" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the router" diff --git a/oximeter/oximeter/schema/static-routing-config.toml b/oximeter/oximeter/schema/static-routing-config.toml index ad60da2680..70a023fa3d 100644 --- a/oximeter/oximeter/schema/static-routing-config.toml +++ b/oximeter/oximeter/schema/static-routing-config.toml @@ -5,7 +5,7 @@ name = "static_routing_config" description = "Static routing configuration used by the Oxide routing daemons" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "rack_id", "sled_id" ] }, + { version = 1, fields = [ "hostname", "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]] @@ -40,3 +40,55 @@ description = "ID of the rack running the router" [fields.sled_id] type = "uuid" description = "ID of the sled running the router" + + [fields.sled_model] +type = "string" +description = "Model number of the sled running the router" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the router" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the router" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the router" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch running the router" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the router" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the router" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the router" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the router" + +[fields.switch_model] +type = "string" +description = "The model number switch running the router" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the router" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the router" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the router" diff --git a/oximeter/oximeter/schema/switch-rib.toml b/oximeter/oximeter/schema/switch-rib.toml index 7cbf020e25..1372d9cd26 100644 --- a/oximeter/oximeter/schema/switch-rib.toml +++ b/oximeter/oximeter/schema/switch-rib.toml @@ -5,7 +5,7 @@ name = "switch_rib" description = "Maghemite router routing information base" authz_scope = "fleet" versions = [ - { version = 1, fields = [ "hostname", "sled_id", "rack_id" ] } + { version = 1, fields = [ "hostname", "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]] @@ -28,3 +28,55 @@ description = "ID of the rack of the sled running the Oxide router" [fields.sled_id] type = "uuid" description = "ID of the sled running the Oxide router" + +[fields.sled_model] +type = "string" +description = "Model number of the sled running the Oxide router" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled running the Oxide router" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled running the Oxide router" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch running the Oxide router" + +[fields.switch_fab] +type = "string" +description = "Fabrication plant identifier on of the switch running the Oxide router" + +[fields.switch_lot] +type = "string" +description = "Lot number of the switch running the Oxide router" + +[fields.switch_wafer] +type = "u8" +description = "Wafer number of the switch running the Oxide router" + +[fields.switch_wafer_loc_x] +type = "i8" +description = "X-coordinate wafer location of the switch running the Oxide router" + +[fields.switch_wafer_loc_y] +type = "i8" +description = "Y-coordinate wafer location of the switch running the Oxide router" + +[fields.switch_model] +type = "string" +description = "The model number switch running the Oxide router" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch running the Oxide router" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch running the Oxide router" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch running the Oxide router" diff --git a/package-manifest.toml b/package-manifest.toml index 3e345de35b..e9e6c84371 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -635,10 +635,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "056283eb02b6887fbf27f66a215662520f7c159c" +source.commit = "dc9211904ae76f62c7c6ca5e7f8f810d4c8e0eae" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm-gz.sha256.txt -source.sha256 = "973fc43ed3b0727d72e3493339e1fdb69e7cb2767ee4aa27f65c4a2da8f8126b" +source.sha256 = "390b4a37731bf8841511dc4a4e87d097f655d929c045d6447ac0aaabef6b20bd" output.type = "tarball" [package.mg-ddm] @@ -651,10 +651,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "056283eb02b6887fbf27f66a215662520f7c159c" +source.commit = "dc9211904ae76f62c7c6ca5e7f8f810d4c8e0eae" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "ed60620a32a35a6885064e7c777369d5092455cd5c1aa240672dfaac05c31f56" +source.sha256 = "b95eb69600c7935c36351cfe35af6db902169166d7ba5240a7b28129ff230429" output.type = "zone" output.intermediate_only = true @@ -666,10 +666,10 @@ source.repo = "maghemite" # `tools/maghemite_openapi_version`. Failing to do so will cause a failure when # building `ddm-admin-client` (which will instruct you to update # `tools/maghemite_openapi_version`). -source.commit = "056283eb02b6887fbf27f66a215662520f7c159c" +source.commit = "dc9211904ae76f62c7c6ca5e7f8f810d4c8e0eae" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mgd.sha256.txt -source.sha256 = "7c10ac7d284ce78e70e652ad91bebf3fee7a2274ee403a09cc986c6ee73cf1eb" +source.sha256 = "c7c690ee8601f1735e0a3c6bc6321355867342f66ea7fa97be9c78726fc7b28b" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index 91c5e0809e..499426b3f4 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -3066,7 +3066,7 @@ impl ServiceManager { if let Some(i) = info { mgd_config = mgd_config .add_property( - "sled_uuid", + "sled_id", "astring", &i.config .sled_identifiers @@ -3074,9 +3074,33 @@ impl ServiceManager { .to_string(), ) .add_property( - "rack_uuid", + "rack_id", "astring", &i.rack_id.to_string(), + ) + .add_property( + "sled_model", + "astring", + &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(), ); } @@ -3115,7 +3139,7 @@ impl ServiceManager { if let Some(i) = info { mg_ddm_config = mg_ddm_config .add_property( - "sled_uuid", + "sled_id", "astring", &i.config .sled_identifiers @@ -3123,9 +3147,33 @@ impl ServiceManager { .to_string(), ) .add_property( - "rack_uuid", + "rack_id", "astring", &i.rack_id.to_string(), + ) + .add_property( + "sled_model", + "astring", + &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(), ); } @@ -4621,13 +4669,36 @@ impl ServiceManager { )?; if let Some(info) = self.inner.sled_info.get() { smfh.setprop_default_instance( - "config/rack_uuid", + "config/rack_id", info.rack_id, )?; smfh.setprop_default_instance( - "config/sled_uuid", + "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!( + self.inner.log, + "no sled info available yet" + ); } for address in &request.addresses { if *address != Ipv6Addr::LOCALHOST { @@ -4664,13 +4735,36 @@ impl ServiceManager { )?; if let Some(info) = self.inner.sled_info.get() { smfh.setprop_default_instance( - "config/rack_uuid", + "config/rack_id", info.rack_id, )?; smfh.setprop_default_instance( - "config/sled_uuid", + "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!( + self.inner.log, + "no sled info available yet" + ); } smfh.delpropvalue_default_instance( "config/dns_servers", diff --git a/test-utils/src/dev/maghemite.rs b/test-utils/src/dev/maghemite.rs index 7e2d895329..bf08be03f7 100644 --- a/test-utils/src/dev/maghemite.rs +++ b/test-utils/src/dev/maghemite.rs @@ -47,9 +47,9 @@ impl MgdInstance { "--no-bgp-dispatcher".into(), "--data-dir".into(), temp_dir.path().display().to_string(), - "--rack-uuid".into(), + "--rack-id".into(), uuid::Uuid::new_v4().to_string(), - "--sled-uuid".into(), + "--sled-id".into(), uuid::Uuid::new_v4().to_string(), ]; diff --git a/tools/maghemite_ddm_openapi_version b/tools/maghemite_ddm_openapi_version index 920e67ac5b..4a02438772 100644 --- a/tools/maghemite_ddm_openapi_version +++ b/tools/maghemite_ddm_openapi_version @@ -1,2 +1,2 @@ -COMMIT="056283eb02b6887fbf27f66a215662520f7c159c" +COMMIT="dc9211904ae76f62c7c6ca5e7f8f810d4c8e0eae" SHA2="007bfb717ccbc077c0250dee3121aeb0c5bb0d1c16795429a514fa4f8635a5ef" diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 0811251c05..7dc13347bb 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="056283eb02b6887fbf27f66a215662520f7c159c" +COMMIT="dc9211904ae76f62c7c6ca5e7f8f810d4c8e0eae" SHA2="28389b4a5fb5d9767b518aacdd09470135aefa2f6704a3b3fb05cd71b21613ae" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index 42465a5a34..ccaaf88076 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="7c10ac7d284ce78e70e652ad91bebf3fee7a2274ee403a09cc986c6ee73cf1eb" -MGD_LINUX_SHA256="be4c6f7375ff3e619102783513348e8769579bd011a85e33779b690759fd0868" +CIDL_SHA256="c7c690ee8601f1735e0a3c6bc6321355867342f66ea7fa97be9c78726fc7b28b" +MGD_LINUX_SHA256="bd63dfda97af885b029a326778ab8aa57f74cfecce6c15db8cf1c026a28b0742" \ No newline at end of file