Skip to content
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

instance spec rework: flatten InstanceSpecV0 #767

Merged
merged 7 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/propolis-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ default = []
omicron-build = ["propolis/omicron-build"]

# Falcon builds require corresponding bits turned on in the dependency libs
falcon = ["propolis/falcon", "propolis_api_types/falcon"]
falcon = ["propolis/falcon"]
6 changes: 3 additions & 3 deletions bin/propolis-server/src/lib/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,9 +1009,9 @@ impl<'a> MachineInitializer<'a> {
info!(
self.log,
"Generating bootorder with order: {:?}",
self.spec.boot_order.as_ref()
self.spec.boot_settings.as_ref()
);
let Some(boot_names) = self.spec.boot_order.as_ref() else {
let Some(boot_names) = self.spec.boot_settings.as_ref() else {
return Ok(None);
};

Expand All @@ -1033,7 +1033,7 @@ impl<'a> MachineInitializer<'a> {
bdf
};

for boot_entry in boot_names.iter() {
for boot_entry in boot_names.order.iter() {
// Theoretically we could support booting from network devices by
// matching them here and adding their PCI paths, but exactly what
// would happen is ill-understood. So, only check disks here.
Expand Down
3 changes: 2 additions & 1 deletion bin/propolis-server/src/lib/migrate/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Checks for compatibility of two instance specs.
//! Associated functions for the [`crate::spec::Spec`] type that determine
//! whether two specs describe migration-compatible VMs.

use std::collections::HashMap;

Expand Down
8 changes: 5 additions & 3 deletions bin/propolis-server/src/lib/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ fn instance_spec_from_request(
}

if let Some(boot_settings) = request.boot_settings.as_ref() {
for item in boot_settings.order.iter() {
spec_builder.add_boot_option(item)?;
}
let order = boot_settings.order.clone();
spec_builder.add_boot_order(
"boot-settings".to_string(),
order.into_iter().map(Into::into),
)?;
}

if let Some(base64) = &request.cloud_init_bytes {
Expand Down
Loading
Loading