Skip to content

[inventory] record caboose SIGN value #8021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

karencfv
Copy link
Contributor

Cabooses for RoT archives and RoT bootloader archives (but not SP archives) contain a SIGN key that's a hash of the public key that the RoT needs its software signed by. Software that's updating the RoT or RoT bootloader needs this information to choose the appropriate Hubris archive.

This commit collects the value during inventory, so Reconfigurator will have it available.

Closes: #7914

@karencfv karencfv requested a review from davepacheco April 22, 2025 06:59
Copy link
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice -- that was fast! I have a question below about the database query.

The bigger thing is: do we want to have separate types (and maybe database constraints) where the sign field is not nullable? I mean: if we expect all RoT and RoT bootloader cabooses to have SIGN field but the others don't (is that right?), should we have separate types to reflect this so that when looking at an RoT/RoT bootloader caboose you don't have to check for this? What do you think @jgallagher?

Comment on lines 647 to 648
.and(dsl_sw_caboose::sign.eq(
found_caboose.caboose.sign.clone(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work regardless of whether found_caboose or the given row's caboose is NULL? I thought sometimes you needed to use IS NOT NULL and/or IS NULL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right. I read up on the documentation and it looks like need to change this.

comparisons with NULL using = or <> will result in NULL, not true or false. Use IS NULL or IS NOT NULL for such checks.

Sadly, because of diesel, the modified code ends up being really janky. I kept getting mistmatched arms/values so I ended up with this:

let selection_inner_join_on =  dsl_baseboard_id::part_number
    .eq(baseboard_id.part_number.clone())
    .and(
        dsl_baseboard_id::serial_number.eq(
            baseboard_id.serial_number.clone(),
        ),
    )
    .and(dsl_sw_caboose::board.eq(
        found_caboose.caboose.board.clone(),
    ))
    .and(
        dsl_sw_caboose::git_commit.eq(
            found_caboose
                .caboose
                .git_commit
                .clone(),
        ),
    )
    .and(
        dsl_sw_caboose::name.eq(found_caboose
            .caboose
            .name
            .clone()),
    )
    .and(dsl_sw_caboose::version.eq(
        found_caboose.caboose.version.clone(),
    )
);

let select_by = (
    dsl_baseboard_id::id,
    dsl_sw_caboose::id,
    db_collection_id
        .into_sql::<diesel::sql_types::Uuid>(),
    found_caboose
        .time_collected
        .into_sql::<diesel::sql_types::Timestamptz>(),
    found_caboose
        .source
        .clone()
        .into_sql::<diesel::sql_types::Text>(),
    db_which.into_sql::<CabooseWhichEnum>(),
);

let columns = (
    dsl_inv_caboose::hw_baseboard_id,
    dsl_inv_caboose::sw_caboose_id,
    dsl_inv_caboose::inv_collection_id,
    dsl_inv_caboose::time_collected,
    dsl_inv_caboose::source,
    dsl_inv_caboose::which,
);

match found_caboose.caboose.sign.clone() {
    None => {
        let selection = nexus_db_schema::schema::hw_baseboard_id::table.inner_join(
            nexus_db_schema::schema::sw_caboose::table.on(
                selection_inner_join_on
                .and(dsl_sw_caboose::sign.is_null())
            ),
        )
        .select(select_by);

        let _ = diesel::insert_into(nexus_db_schema::schema::inv_caboose::table)
        .values(selection)
        .into_columns(columns)
        .execute_async(&conn)
        .await?;
    },
    Some(_) => {
        let selection = nexus_db_schema::schema::hw_baseboard_id::table.inner_join(
            nexus_db_schema::schema::sw_caboose::table.on(
                selection_inner_join_on
                .and(dsl_sw_caboose::sign.is_not_null())
            ),
        )
        .select(select_by);

        let _ = diesel::insert_into(nexus_db_schema::schema::inv_caboose::table)
        .values(selection)
        .into_columns(columns)
        .execute_async(&conn)
        .await?;
    }
};

It's awful. Also, it would get even messier if another nullable field appears. Do you have any suggestions on how to clean this up?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooohhh very nice, thanks!

@davepacheco
Copy link
Collaborator

It'd be neat to see the output of omdb db inventory collections show latest sp from a racklette running this!

Copy link
Contributor Author

@karencfv karencfv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success! Thanks for the review @davepacheco, I think the output is as expected?

root@oxz_switch1:~# omdb db inventory collections show latest sp
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS server for subnet fd00:1122:3344::/48
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd00:1122:3344:102::3]:32221,[fd00:1122:3344:103::3]:32221,[fd00:1122:3344:104::4]:32221,[fd00:1122:3344:104::3]:32221,[fd00:1122:3344:101::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (139.0.0)
collection: 6a3d8864-e56d-4f52-bc54-db5d4e88d00c
collector:  d41629fe-37c6-4752-8698-3241f66c8399 (likely a Nexus instance)
started:    2025-04-23T03:33:40.613Z
done:       2025-04-23T03:33:52.322Z
errors:     0

Sled BRM42220036
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 14 (cubby 14)
    found at: 2025-04-23 03:33:41.761459 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Sled BRM42220062
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 15 (cubby 15)
    found at: 2025-04-23 03:33:44.027992 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 9ba01fc19057d6fa0618a5918b6b11d41cf724aba41f27dd48ec06f89aea7fed
    RoT: slot B SHA3-256: 1f511bd014845f30bff9b047afbaeef6734f9fda4315a1708b0b65821882c567

Sled BRM42220030
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 16 (cubby 16)
    found at: 2025-04-23 03:33:40.631552 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Sled BRM44220007
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 17 (cubby 17)
    found at: 2025-04-23 03:33:42.893452 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Power BRM11230017
    part number: 913-0000003
    power:    A2
    revision: 9
    MGS slot: Power 0
    found at: 2025-04-23 03:33:45.163019 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT BOARD NAME VERSION GIT_COMMIT SIGN 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAiAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAABIAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAABEAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAABIAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 17cf2709c1d55dcc839898e3073d9db0e37f540201f0cdb5bdae1ae0932327ac
    RoT: slot B SHA3-256: 42ccae12461701473cb2750e3b85bcfb3afaf8e881cfda711f625b33fb9eb932

Switch BRM31230004
    part number: 913-0000006
    power:    A0
    revision: 10
    MGS slot: Switch 0
    found at: 2025-04-23 03:33:47.631639 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT BOARD NAME VERSION GIT_COMMIT SIGN 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAiAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: ccd280614a9cce6919bc935e797ec8ff3a060745a2cab5a0fa7a69e66a3f336b
    RoT: slot B SHA3-256: c63635d08181e02ecd56eb3a29c42382b36ac327b68da2cce13eda255cde09fc

Switch BRM44220013
    part number: 913-0000006
    power:    A0
    revision: 4
    MGS slot: Switch 1
    found at: 2025-04-23 03:33:46.288474 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT BOARD NAME VERSION GIT_COMMIT SIGN 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: ccd280614a9cce6919bc935e797ec8ff3a060745a2cab5a0fa7a69e66a3f336b
    RoT: slot B SHA3-256: 09259c3a0255eb861b1119c3e61dd088416a41f7a6674c28364ef36e67cb70b7

Comment on lines 647 to 648
.and(dsl_sw_caboose::sign.eq(
found_caboose.caboose.sign.clone(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right. I read up on the documentation and it looks like need to change this.

comparisons with NULL using = or <> will result in NULL, not true or false. Use IS NULL or IS NOT NULL for such checks.

Sadly, because of diesel, the modified code ends up being really janky. I kept getting mistmatched arms/values so I ended up with this:

let selection_inner_join_on =  dsl_baseboard_id::part_number
    .eq(baseboard_id.part_number.clone())
    .and(
        dsl_baseboard_id::serial_number.eq(
            baseboard_id.serial_number.clone(),
        ),
    )
    .and(dsl_sw_caboose::board.eq(
        found_caboose.caboose.board.clone(),
    ))
    .and(
        dsl_sw_caboose::git_commit.eq(
            found_caboose
                .caboose
                .git_commit
                .clone(),
        ),
    )
    .and(
        dsl_sw_caboose::name.eq(found_caboose
            .caboose
            .name
            .clone()),
    )
    .and(dsl_sw_caboose::version.eq(
        found_caboose.caboose.version.clone(),
    )
);

let select_by = (
    dsl_baseboard_id::id,
    dsl_sw_caboose::id,
    db_collection_id
        .into_sql::<diesel::sql_types::Uuid>(),
    found_caboose
        .time_collected
        .into_sql::<diesel::sql_types::Timestamptz>(),
    found_caboose
        .source
        .clone()
        .into_sql::<diesel::sql_types::Text>(),
    db_which.into_sql::<CabooseWhichEnum>(),
);

let columns = (
    dsl_inv_caboose::hw_baseboard_id,
    dsl_inv_caboose::sw_caboose_id,
    dsl_inv_caboose::inv_collection_id,
    dsl_inv_caboose::time_collected,
    dsl_inv_caboose::source,
    dsl_inv_caboose::which,
);

match found_caboose.caboose.sign.clone() {
    None => {
        let selection = nexus_db_schema::schema::hw_baseboard_id::table.inner_join(
            nexus_db_schema::schema::sw_caboose::table.on(
                selection_inner_join_on
                .and(dsl_sw_caboose::sign.is_null())
            ),
        )
        .select(select_by);

        let _ = diesel::insert_into(nexus_db_schema::schema::inv_caboose::table)
        .values(selection)
        .into_columns(columns)
        .execute_async(&conn)
        .await?;
    },
    Some(_) => {
        let selection = nexus_db_schema::schema::hw_baseboard_id::table.inner_join(
            nexus_db_schema::schema::sw_caboose::table.on(
                selection_inner_join_on
                .and(dsl_sw_caboose::sign.is_not_null())
            ),
        )
        .select(select_by);

        let _ = diesel::insert_into(nexus_db_schema::schema::inv_caboose::table)
        .values(selection)
        .into_columns(columns)
        .execute_async(&conn)
        .await?;
    }
};

It's awful. Also, it would get even messier if another nullable field appears. Do you have any suggestions on how to clean this up?

@davepacheco
Copy link
Collaborator

@karencfv it seems like the SP caboose information is missing from that output. Did that get broken somehow?

@karencfv
Copy link
Contributor Author

@karencfv it seems like the SP caboose information is missing from that output. Did that get broken somehow?

@davepacheco, ha yes! Looks like the SPs did not have a sign value, and that's why they disappeared. I ran the latest code with @jgallagher's suggestion, and that issue was resolved. The SP caboose information shows up everywhere now.

I'm slightly concerned with Power BRM11230017, Switch BRM31230004 and Switch BRM44220013 though. They now only show SP caboose information, but nothing for RoT nor Stage. I'm a little confused as to why those would be missing that information, or is it expected from a raclette?

root@oxz_switch1:~# omdb db inventory collections show latest sp
note: database URL not specified.  Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS server for subnet fd00:1122:3344::/48
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd00:1122:3344:104::4]:32221,[fd00:1122:3344:102::3]:32221,[fd00:1122:3344:104::3]:32221,[fd00:1122:3344:101::3]:32221,[fd00:1122:3344:103::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (139.0.0)
collection: 4bf0ca98-d7c7-4fc1-9ee7-68251ee900db
collector:  656a766d-0c46-41cc-9f30-7bddf4713a63 (likely a Nexus instance)
started:    2025-04-24T02:45:03.140Z
done:       2025-04-24T02:45:14.984Z
errors:     0

Sled BRM42220036
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 14 (cubby 14)
    found at: 2025-04-24 02:45:04.462185 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        SpSlot0    gimlet-c    gimlet-c    1.0.36  a31b6acf6900c04978302b5a1dcc017e9b35e1fc n/a                                                              
        SpSlot1    gimlet-c    gimlet-c    1.0.34  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a                                                              
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Sled BRM42220062
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 15 (cubby 15)
    found at: 2025-04-24 02:45:06.719661 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        SpSlot0    gimlet-c    gimlet-c    1.0.36  a31b6acf6900c04978302b5a1dcc017e9b35e1fc n/a                                                              
        SpSlot1    gimlet-c    gimlet-c    1.0.34  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a                                                              
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 9ba01fc19057d6fa0618a5918b6b11d41cf724aba41f27dd48ec06f89aea7fed
    RoT: slot B SHA3-256: 1f511bd014845f30bff9b047afbaeef6734f9fda4315a1708b0b65821882c567

Sled BRM42220030
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 16 (cubby 16)
    found at: 2025-04-24 02:45:03.208444 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        SpSlot0    gimlet-c    gimlet-c    1.0.36  a31b6acf6900c04978302b5a1dcc017e9b35e1fc n/a                                                              
        SpSlot1    gimlet-c    gimlet-c    1.0.34  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a                                                              
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAE8AAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Sled BRM44220007
    part number: 913-0000019
    power:    A0
    revision: 6
    MGS slot: Sled 17 (cubby 17)
    found at: 2025-04-24 02:45:05.589204 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT       BOARD       NAME        VERSION GIT_COMMIT                               SIGN                                                             
        SpSlot0    gimlet-c    gimlet-c    1.0.36  a31b6acf6900c04978302b5a1dcc017e9b35e1fc n/a                                                              
        SpSlot1    gimlet-c    gimlet-c    1.0.32  fad1769684b1ca6e71398db03b685b2bd4d4dce8 n/a                                                              
        RotSlotA   oxide-rot-1 oxide-rot-1 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        RotSlotB   oxide-rot-1 oxide-rot-1 1.0.34  71e20463580a8e17b8b1eb8172cc3cdbece479a6 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0     oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
        Stage0Next oxide-rot-1 oxide-rot-1 1.3.3   95e79111096d7ec258d68a2c6840b6062efc7f54 11594bb5548a757e918e6fe056e2ad9e084297c9555417a025d8788eacf55daf 
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAGsAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 2a6a4b0c6494ae51ce4216de5d03a600d0cface267a1c6f854155ac4e41036fc
    RoT: slot B SHA3-256: 16b846eb11c9307d208624bddff21b3dc0797fe7b364feaac202eb4f92996e50

Power BRM11230017
    part number: 913-0000003
    power:    A2
    revision: 9
    MGS slot: Power 0
    found at: 2025-04-24 02:45:07.953357 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT    BOARD NAME  VERSION GIT_COMMIT                               SIGN 
        SpSlot0 psc-c psc-c 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a  
        SpSlot1 psc-c psc-c 1.0.33  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a  
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAiAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAABIAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAABEAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAABIAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: 17cf2709c1d55dcc839898e3073d9db0e37f540201f0cdb5bdae1ae0932327ac
    RoT: slot B SHA3-256: 42ccae12461701473cb2750e3b85bcfb3afaf8e881cfda711f625b33fb9eb932

Switch BRM31230004
    part number: 913-0000006
    power:    A0
    revision: 10
    MGS slot: Switch 0
    found at: 2025-04-24 02:45:11.429204 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT    BOARD     NAME      VERSION GIT_COMMIT                               SIGN 
        SpSlot0 sidecar-c sidecar-c 1.0.37  a31b6acf6900c04978302b5a1dcc017e9b35e1fc n/a  
        SpSlot1 sidecar-c sidecar-c 1.0.35  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a  
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAiAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot B
    RoT: persistent boot preference: slot B
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: ccd280614a9cce6919bc935e797ec8ff3a060745a2cab5a0fa7a69e66a3f336b
    RoT: slot B SHA3-256: c63635d08181e02ecd56eb3a29c42382b36ac327b68da2cce13eda255cde09fc

Switch BRM44220013
    part number: 913-0000006
    power:    A0
    revision: 4
    MGS slot: Switch 1
    found at: 2025-04-24 02:45:10.201652 UTC from http://[fd00:1122:3344:101::2]:12225
    cabooses:
        SLOT    BOARD     NAME      VERSION GIT_COMMIT                               SIGN 
        SpSlot0 sidecar-b sidecar-b 1.0.35  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a  
        SpSlot1 sidecar-b sidecar-b 1.0.35  441b09270d8715275d6b3c3b57d84dba539e34d0 n/a  
    RoT pages:
        SLOT         DATA_BASE64                         
        Cmpa         oAAAeAAAAAAAAAAAAAAAAP8CAP3/AgD9... 
        CfpaActive   AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaInactive AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
        CfpaScratch  AAAAACoAAAAAAAAAAAAAAAAAAAAAAAAA... 
    RoT: active slot: slot A
    RoT: persistent boot preference: slot A
    RoT: pending persistent boot preference: -
    RoT: transient boot preference: -
    RoT: slot A SHA3-256: ccd280614a9cce6919bc935e797ec8ff3a060745a2cab5a0fa7a69e66a3f336b
    RoT: slot B SHA3-256: 09259c3a0255eb861b1119c3e61dd088416a41f7a6674c28364ef36e67cb70b7

Comment on lines +263 to +265
// It is very unlikely that the sign hash will not be present.
// As far as we know, it will only be locally built BART signed images.
// We will be handling those edge cases by setting this field as an option.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right. As far as I've seen, standard SP images do not provide a value here. This is probably the most specific thing I can say:

The sign will generally be present for production RoT and RoT bootloader images. It's currently absent from SP images and could be absent from RoT images as well.

but somebody else might know better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

record caboose SIGN value in inventory
3 participants