From a68d462d189a3dce27231a88bd140b959fe693e4 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Tue, 15 Oct 2024 20:32:21 +0000 Subject: [PATCH 1/2] Add switch/sled metadata to ddm/mgd related timeseries Includes: - timeseries cleanup/migration --- .../replicated/15/timeseries-to-delete.txt | 53 +++++++++ .../single-node/15/timeseries-to-delete.txt | 53 +++++++++ oximeter/db/src/model/mod.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 | 58 ++++++++- oximeter/oximeter/schema/mg-lower.toml | 54 ++++++++- .../schema/static-routing-config.toml | 54 ++++++++- oximeter/oximeter/schema/switch-rib.toml | 60 +++++++++- sled-agent/src/services.rs | 110 ++++++++++++++++-- test-utils/src/dev/maghemite.rs | 4 +- 12 files changed, 590 insertions(+), 26 deletions(-) create mode 100644 oximeter/db/schema/replicated/15/timeseries-to-delete.txt create mode 100644 oximeter/db/schema/single-node/15/timeseries-to-delete.txt diff --git a/oximeter/db/schema/replicated/15/timeseries-to-delete.txt b/oximeter/db/schema/replicated/15/timeseries-to-delete.txt new file mode 100644 index 00000000000..3cf58f9f594 --- /dev/null +++ b/oximeter/db/schema/replicated/15/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/15/timeseries-to-delete.txt b/oximeter/db/schema/single-node/15/timeseries-to-delete.txt new file mode 100644 index 00000000000..3cf58f9f594 --- /dev/null +++ b/oximeter/db/schema/single-node/15/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/src/model/mod.rs b/oximeter/db/src/model/mod.rs index aabab099c70..2944f2faefa 100644 --- a/oximeter/db/src/model/mod.rs +++ b/oximeter/db/src/model/mod.rs @@ -19,4 +19,4 @@ pub mod to_block; /// - [`crate::Client::initialize_db_with_version`] /// - [`crate::Client::ensure_schema`] /// - The `clickhouse-schema-updater` binary in this crate -pub const OXIMETER_VERSION: u64 = 14; +pub const OXIMETER_VERSION: u64 = 15; diff --git a/oximeter/oximeter/schema/bfd-session.toml b/oximeter/oximeter/schema/bfd-session.toml index a7bdcf52e97..a6e0643641b 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] }, ] [[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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC running the BFD session" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC running the BFD session" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC running the BFD session" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC running the BFD session" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC running the BFD session" diff --git a/oximeter/oximeter/schema/bgp-session.toml b/oximeter/oximeter/schema/bgp-session.toml index 093560beea8..04670b1fe5b 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] } ] [[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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC on which our BGP peer is running" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC on which our BGP peer is running" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC on which our BGP peer is running" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC on which our BGP peer is running" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC on which our BGP peer is running" diff --git a/oximeter/oximeter/schema/ddm-router.toml b/oximeter/oximeter/schema/ddm-router.toml index 2cb0851852b..32233a42021 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] }, ] [[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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC running the DDM router" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC running the DDM router" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC running the DDM router" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC running the DDM router" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC running the DDM router" diff --git a/oximeter/oximeter/schema/ddm-session.toml b/oximeter/oximeter/schema/ddm-session.toml index 89f67515244..08fc0e2fdaa 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] }, ] [[metrics]] @@ -129,8 +129,60 @@ description = "The host interface on which the DDM session is running" [fields.rack_id] type = "uuid" -description = "ID of the rack running the DDM router" +description = "ID of the rack on which the DDM session is running" [fields.sled_id] type = "uuid" -description = "ID of the sled running the DDM router" +description = "ID of the sled on which the DDM session is running" + +[fields.sled_model] +type = "string" +description = "Model number of the sled on which the DDM session is running" + +[fields.sled_revision] +type = "u32" +description = "Revision number of the sled on which the DDM session is running" + +[fields.sled_serial] +type = "string" +description = "Serial number of the sled on which the DDM session is running" + +[fields.switch_id] +type = "uuid" +description = "ID of the switch on which the DDM session is running" + +[fields.switch_model] +type = "string" +description = "Model number of the switch on which the DDM session is running" + +[fields.switch_revision] +type = "u32" +description = "Revision number of the switch on which the DDM session is running" + +[fields.switch_serial] +type = "string" +description = "Serial number of the switch on which the DDM session is running" + +[fields.switch_slot] +type = "u16" +description = "Slot number of the switch on which the DDM session is running" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC on which the DDM session is running" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC on which the DDM session is running" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC on which the DDM session is running" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC on which the DDM session is running" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC on which the DDM session is running" diff --git a/oximeter/oximeter/schema/mg-lower.toml b/oximeter/oximeter/schema/mg-lower.toml index bcdbbc0d027..153faef61e0 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] }, ] [[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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC running the router" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC running the router" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC running the router" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC running the router" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC running the router" diff --git a/oximeter/oximeter/schema/static-routing-config.toml b/oximeter/oximeter/schema/static-routing-config.toml index ad60da2680f..9093086c6a7 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_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] }, ] [[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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC running the router" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC running the router" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC running the router" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC running the router" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC running the router" diff --git a/oximeter/oximeter/schema/switch-rib.toml b/oximeter/oximeter/schema/switch-rib.toml index 7cbf020e252..ee8ca45337f 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", "sled_id", "rack_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_model", "switch_revision", "switch_serial", "switch_slot","asic_fab", "asic_lot", "asic_wafer", "asic_wafer_loc_x", "asic_wafer_loc_y" ] } ] [[metrics]] @@ -19,12 +19,64 @@ versions = [ [fields.hostname] type = "string" -description = "Name of the host running the Oxide router" +description = "Name of the host running the router" [fields.rack_id] type = "uuid" -description = "ID of the rack of the sled running the Oxide router" +description = "ID of the rack of the sled running the router" [fields.sled_id] type = "uuid" -description = "ID of the sled running the Oxide router" +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_model] +type = "string" +description = "Model number of the 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" + +[fields.asic_fab] +type = "string" +description = "Fabrication plant identifier of the switch ASIC running the router" + +[fields.asic_lot] +type = "string" +description = "Lot identifier of the switch ASIC running the router" + +[fields.asic_wafer] +type = "u8" +description = "Wafer identifier of the switch ASIC running the router" + +[fields.asic_wafer_loc_x] +type = "i16" +description = "X-coordinate wafer location of the switch ASIC running the router" + +[fields.asic_wafer_loc_y] +type = "i16" +description = "Y-coordinate wafer location of the switch ASIC running the router" diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index 4775cc113c2..8f4d7f32df8 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -3064,7 +3064,7 @@ impl ServiceManager { if let Some(i) = info { mgd_config = mgd_config .add_property( - "sled_uuid", + "sled_id", "astring", &i.config .sled_identifiers @@ -3072,9 +3072,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(), ); } @@ -3113,7 +3137,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 @@ -3121,9 +3145,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(), ); } @@ -4589,13 +4637,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 { @@ -4632,13 +4703,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 7e2d8953299..bf08be03f79 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(), ]; From 2139a2677c323adc604e0cbd0e1d3804cec4871f Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Fri, 14 Feb 2025 18:59:49 +0000 Subject: [PATCH 2/2] [maghemite] update manifest/tools --- package-manifest.toml | 12 ++++++------ tools/maghemite_ddm_openapi_version | 2 +- tools/maghemite_mg_openapi_version | 2 +- tools/maghemite_mgd_checksums | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 42eb9cb5fac..23f9c8292ee 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -638,10 +638,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 = "93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" +source.commit = "eb929bd62c30445e193311117b1511a8929dec75" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm-gz.sha256.txt -source.sha256 = "5265f638b0ad4bd640113d4c8a30215388c695e7084db9c6cc113f5e350086fb" +source.sha256 = "dcdf496dcd7653704758ef35d55b2d4e4a9ffe44da20f7216ce75187abba4b17" output.type = "tarball" [package.mg-ddm] @@ -654,10 +654,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 = "93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" +source.commit = "eb929bd62c30445e193311117b1511a8929dec75" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mg-ddm.sha256.txt -source.sha256 = "b0b1b96d76cf179313305aa85857e469dd76d90e1c075305b72bd3675ef9538e" +source.sha256 = "c5ca22f7e40f930cd2330b36e5c3aa049e0742ac92ceabb922378e74d83a1bca" output.type = "zone" output.intermediate_only = true @@ -669,10 +669,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 = "93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" +source.commit = "eb929bd62c30445e193311117b1511a8929dec75" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image//mgd.sha256.txt -source.sha256 = "9db633384abe06f23c2b396c4beda3e34ec9bf74d538a914eb57198f6ba8992e" +source.sha256 = "0d28a4cd802341d53ab8d2e905534e98f6e2cf80d54af88624e48fee4ef9300e" output.type = "zone" output.intermediate_only = true diff --git a/tools/maghemite_ddm_openapi_version b/tools/maghemite_ddm_openapi_version index c27cad916d7..b78309e9f26 100644 --- a/tools/maghemite_ddm_openapi_version +++ b/tools/maghemite_ddm_openapi_version @@ -1,2 +1,2 @@ -COMMIT="93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" +COMMIT="eb929bd62c30445e193311117b1511a8929dec75" SHA2="007bfb717ccbc077c0250dee3121aeb0c5bb0d1c16795429a514fa4f8635a5ef" diff --git a/tools/maghemite_mg_openapi_version b/tools/maghemite_mg_openapi_version index 6d0710f45af..79f75aebff8 100644 --- a/tools/maghemite_mg_openapi_version +++ b/tools/maghemite_mg_openapi_version @@ -1,2 +1,2 @@ -COMMIT="93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" +COMMIT="eb929bd62c30445e193311117b1511a8929dec75" SHA2="b24ab6aacc2a40421ff1bbf4983121209d8079f1656a6f986e8f92d55e0dade1" diff --git a/tools/maghemite_mgd_checksums b/tools/maghemite_mgd_checksums index 63b07c35445..72977950a8e 100644 --- a/tools/maghemite_mgd_checksums +++ b/tools/maghemite_mgd_checksums @@ -1,2 +1,2 @@ -CIDL_SHA256="9db633384abe06f23c2b396c4beda3e34ec9bf74d538a914eb57198f6ba8992e" -MGD_LINUX_SHA256="bf83bf460c21a3734b3fdaf0820efa641bbbc93a66ec29caa681ee4e488390a3" \ No newline at end of file +CIDL_SHA256="0d28a4cd802341d53ab8d2e905534e98f6e2cf80d54af88624e48fee4ef9300e" +MGD_LINUX_SHA256="0c1496f10cf9c7041a0177d73fa9a1ebc2f32d7a5379575f889b52203f7c6c1b" \ No newline at end of file