Skip to content

[server] restore SMBIOS type 1 input on instance ensure - #1200

Open
zeeshanlakhani wants to merge 2 commits into
masterfrom
spec-smbios-type1-fix
Open

[server] restore SMBIOS type 1 input on instance ensure#1200
zeeshanlakhani wants to merge 2 commits into
masterfrom
spec-smbios-type1-fix

Conversation

@zeeshanlakhani

@zeeshanlakhani zeeshanlakhani commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

An ensure request with an explicit SMBIOS Type 1 input silently got Propolis's defaults (Oxide/OxVM) instead. This issue came up in voxel and a4x2 testing, where the manufacturer string is used for how those infra stacks select hardware, and the product-name and serial are used to carry the sled's configured BaseboardId during the bootstrapping process.

We ran into this after #1178 made it to the mainline, which moved API-to-internal conversion into per-version SpecBuilder paths and dropped the smbios -> smbios_type1_input assignment along the way.

This PR keeps smbios in latest_to_spec_builder, where all the versioned paths go through.

The instance spec versioning rework in #1178 moved the API-to-internal
conversion into per-version `SpecBuilder` paths, but dropped the
assignment of the API spec's `smbios` field to the internal spec's
`smbios_type1_input`.

As a result, ensure requests with an explicit SMBIOS Type 1 input
silently receive Propolis's default Type 1 values (`Oxide`/`OxVM`)
instead. This breaks consumers of programmable SMBIOS (#977), like
voxel and a4x2, where the SMBIOS manufacturer selects a4x2 hardware
and the product and serial values identify the sled's configured
`BaseboardId` during bootstrap.

This change preserves `smbios` in `latest_to_spec_builder`, the common
funnel for the versioned instance-spec conversion paths, and adds a
regression test.
@zeeshanlakhani
zeeshanlakhani requested a review from iximeow August 22, 2026 05:46
@zeeshanlakhani zeeshanlakhani added the bug Something that isn't working. label Aug 22, 2026
@sion42x

sion42x commented Aug 26, 2026

Copy link
Copy Markdown

This looks great and I've verified it works right with voxel. Do we plan on updating the falcon pin from February? I've got some other propolis work I'll be making a PR for soon that would depend on this.

@zeeshanlakhani

Copy link
Copy Markdown
Contributor Author

This looks great and I've verified it works right with voxel. Do we plan on updating the falcon pin from February? I've got some other propolis work I'll be making a PR for soon that would depend on this.

we should, though not sure what the proper ordering of deps updates should be.

@sion42x sion42x left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Confirmed this fixes the regression and will allow falcon to use a current propolis again. Recommend adding this to #1204 for softnpu performance as well.

@zeeshanlakhani

Copy link
Copy Markdown
Contributor Author

@iximeow thoughts on this btw?

@sion42x

sion42x commented Aug 29, 2026

Copy link
Copy Markdown

@zeeshanlakhani would you be open to SmbiosType1Input growing the remaining SMBIOS Type 1 fields? sku_number and family (and arguably uuid). We may be able to use this for softnpu detection (similar to tofino::get_tofino_from_devinfo()). See oxidecomputer/omicron#11202 for details on where this matters.

@zeeshanlakhani

zeeshanlakhani commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@zeeshanlakhani would you be open to SmbiosType1Input growing the remaining SMBIOS Type 1 fields? sku_number and family (and arguably uuid). We may be able to use this for softnpu detection (similar to tofino::get_tofino_from_devinfo()). See oxidecomputer/omicron#11202 for details on where this matters.

That totally makes sense. Want me to add it? Or, do you want to extend this. I'd also like someone working on propolis to take a gander here. We decided against the additional work.

@zeeshanlakhani

Copy link
Copy Markdown
Contributor Author

@iximeow @papertigers thoughts on this btw? We've kept the scope small vs what @sion42x was looking at in terms of including a larger portion of the spec.

@zeeshanlakhani zeeshanlakhani self-assigned this Sep 3, 2026

@iximeow iximeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sorry about the bug. this makes sense though I'd like to understand how I missed this in the refactor, particularly since there wasn't a set_smbios_type1_input before.

I'll convince myself of what happened there, probably push a commit that adjusts the test, and pull this in for the sake of getting this fixed for you; I realize this is an issue for voxel/a4x2/etc

Comment on lines +253 to +267
smbios: Some(SmbiosType1Input {
manufacturer: "a4x2".to_string(),
product_name: "913-0000019".to_string(),
serial_number: "2FAKE000".to_string(),
version: 2,
}),
};

let spec = latest_to_spec_builder(api_spec).unwrap().finish();
let smbios =
spec.smbios_type1_input.expect("SMBIOS type 1 input preserved");
assert_eq!(smbios.manufacturer, "a4x2");
assert_eq!(smbios.product_name, "913-0000019");
assert_eq!(smbios.serial_number, "2FAKE000");
assert_eq!(smbios.version, 2);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fwiw i'd throw a PartialEq on SmbiosType1Input and just make sure the original input is the same as the one we got back out. mostly so that if someone (hi Steve :) ) does add new type 1 fields later this correctly tests that those fields don't get set to some novel different default or something later on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, I can definitely do that.

also get a little more exhaustive about the test conversions and which
should succeed, which should fail, and how newer specs should be
converted to older.
@zeeshanlakhani

Copy link
Copy Markdown
Contributor Author

Other than clippy's issues, I like the additional testing here @iximeow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something that isn't working.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants