From 07493184939e28233a9868e590d4342e2b72580d Mon Sep 17 00:00:00 2001 From: Greg Colombo Date: Tue, 29 Oct 2024 19:56:22 +0000 Subject: [PATCH] fix instance build --- sled-agent/src/instance.rs | 16 +++++++++------- sled-agent/src/sim/sled_agent.rs | 6 ++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sled-agent/src/instance.rs b/sled-agent/src/instance.rs index be348cdbc3..4883918c36 100644 --- a/sled-agent/src/instance.rs +++ b/sled-agent/src/instance.rs @@ -418,6 +418,8 @@ struct InstanceRunner { // Properties visible to Propolis properties: propolis_client::types::InstanceProperties, + vcpus: u8, + memory_mib: u64, // The ID of the Propolis server (and zone) running this instance propolis_id: PropolisUuid, @@ -911,6 +913,8 @@ impl InstanceRunner { let request = propolis_client::types::InstanceEnsureRequest { properties: self.properties.clone(), + vcpus: self.vcpus, + memory: self.memory_mib, nics, disks: self .requested_disks @@ -1366,15 +1370,13 @@ impl Instance { id: id.into_untyped_uuid(), name: hardware.properties.hostname.to_string(), description: "Test description".to_string(), - image_id: Uuid::nil(), - bootrom_id: Uuid::nil(), - // TODO: Align the byte type w/propolis. - memory: hardware.properties.memory.to_whole_mebibytes(), - // TODO: we should probably make propolis aligned with - // InstanceCpuCount here, to avoid any casting... - vcpus: hardware.properties.ncpus.0 as u8, metadata, }, + // TODO: we should probably make propolis aligned with + // InstanceCpuCount here, to avoid any casting... + vcpus: hardware.properties.ncpus.0 as u8, + // TODO: Align the byte type w/propolis. + memory_mib: hardware.properties.memory.to_whole_mebibytes(), propolis_id, propolis_addr, vnic_allocator, diff --git a/sled-agent/src/sim/sled_agent.rs b/sled-agent/src/sim/sled_agent.rs index 321e9cc34f..4786e6839d 100644 --- a/sled-agent/src/sim/sled_agent.rs +++ b/sled-agent/src/sim/sled_agent.rs @@ -338,14 +338,12 @@ impl SledAgent { id: propolis_id.into_untyped_uuid(), name: hardware.properties.hostname.to_string(), description: "sled-agent-sim created instance".to_string(), - image_id: Uuid::default(), - bootrom_id: Uuid::default(), - memory: hardware.properties.memory.to_whole_mebibytes(), - vcpus: hardware.properties.ncpus.0 as u8, metadata, }; let body = propolis_client::types::InstanceEnsureRequest { properties, + memory: hardware.properties.memory.to_whole_mebibytes(), + vcpus: hardware.properties.ncpus.0 as u8, nics: vec![], disks: vec![], boot_settings: None,