Skip to content

Commit

Permalink
Update crucible and propolis revs (#1368)
Browse files Browse the repository at this point in the history
Bring in the changes to create all volumes with an ID. Flatten the
current volume topologies a little bit. Update to the latest propolis
rev (which matches this crucible rev).
  • Loading branch information
jmpesp authored Jul 7, 2022
1 parent be46344 commit 0fd5545
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 88 deletions.
67 changes: 8 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ base64 = "0.13.0"
bb8 = "0.8.0"
clap = { version = "3.2", features = ["derive"] }
cookie = "0.16"
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "8314eeddd228ec0d76cefa40c4a41d3e2611ac18" }
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "fed3e8ca7762130ee146fc516a4ef6eed2b91629" }
diesel = { version = "2.0.0-rc.0", features = ["postgres", "r2d2", "chrono", "serde_json", "network-address", "uuid"] }
diesel-dtrace = { git = "https://github.com/oxidecomputer/diesel-dtrace" }
fatfs = "0.3.5"
Expand Down
41 changes: 19 additions & 22 deletions nexus/src/app/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,14 @@ impl super::Nexus {
message: format!("block_size is invalid: {}", e),
})?;

let volume_construction_request = sled_agent_client::types::VolumeConstructionRequest::Volume {
block_size: db_block_size.to_bytes().into(),
sub_volumes: vec![
sled_agent_client::types::VolumeConstructionRequest::Url {
block_size: db_block_size.to_bytes().into(),
url: url.clone(),
}
],
read_only_parent: None,
};
let global_image_id = Uuid::new_v4();

let volume_construction_request =
sled_agent_client::types::VolumeConstructionRequest::Url {
id: global_image_id,
block_size: db_block_size.to_bytes().into(),
url: url.clone(),
};

let volume_data =
serde_json::to_string(&volume_construction_request)?;
Expand Down Expand Up @@ -196,7 +194,7 @@ impl super::Nexus {

db::model::GlobalImage {
identity: db::model::GlobalImageIdentity::new(
Uuid::new_v4(),
global_image_id,
params.identity.clone(),
),
volume_id: volume.id(),
Expand All @@ -223,16 +221,15 @@ impl super::Nexus {
let db_block_size = db::model::BlockSize::Traditional;
let block_size: u64 = db_block_size.to_bytes() as u64;

let volume_construction_request = sled_agent_client::types::VolumeConstructionRequest::Volume {
block_size,
sub_volumes: vec![
sled_agent_client::types::VolumeConstructionRequest::File {
block_size,
path: "/opt/oxide/propolis-server/blob/alpine.iso".into(),
}
],
read_only_parent: None,
};
let global_image_id = Uuid::new_v4();

let volume_construction_request =
sled_agent_client::types::VolumeConstructionRequest::File {
id: global_image_id,
block_size,
path: "/opt/oxide/propolis-server/blob/alpine.iso"
.into(),
};

let volume_data =
serde_json::to_string(&volume_construction_request)?;
Expand All @@ -255,7 +252,7 @@ impl super::Nexus {

db::model::GlobalImage {
identity: db::model::GlobalImageIdentity::new(
Uuid::new_v4(),
global_image_id,
params.identity.clone(),
),
volume_id: volume.id(),
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/app/sagas/disk_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ async fn sdc_regions_ensure(
sagactx: ActionContext<SagaDiskCreate>,
) -> Result<String, ActionError> {
let log = sagactx.user_data().log();
let disk_id = sagactx.lookup::<Uuid>("disk_id")?;

let datasets_and_regions = sagactx
.lookup::<Vec<(db::model::Dataset, db::model::Region)>>(
"datasets_and_regions",
Expand Down Expand Up @@ -417,13 +419,15 @@ async fn sdc_regions_ensure(
let mut rng = StdRng::from_entropy();
let volume_construction_request =
sled_agent_client::types::VolumeConstructionRequest::Volume {
id: disk_id,
block_size,
sub_volumes: vec![
sled_agent_client::types::VolumeConstructionRequest::Region {
block_size,
// gen of 0 is here, these regions were just allocated.
gen: 0,
opts: sled_agent_client::types::CrucibleOpts {
id: disk_id,
target: datasets_and_regions
.iter()
.map(|(dataset, region)| {
Expand Down
20 changes: 20 additions & 0 deletions openapi/sled-agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@
"format": "uint32",
"minimum": 0
},
"id": {
"type": "string",
"format": "uuid"
},
"key": {
"nullable": true,
"type": "string"
Expand Down Expand Up @@ -318,6 +322,7 @@
}
},
"required": [
"id",
"lossy",
"target"
]
Expand Down Expand Up @@ -1259,6 +1264,10 @@
"format": "uint64",
"minimum": 0
},
"id": {
"type": "string",
"format": "uuid"
},
"read_only_parent": {
"nullable": true,
"allOf": [
Expand All @@ -1282,6 +1291,7 @@
},
"required": [
"block_size",
"id",
"sub_volumes",
"type"
]
Expand All @@ -1294,6 +1304,10 @@
"format": "uint64",
"minimum": 0
},
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"type": "string",
"enum": [
Expand All @@ -1306,6 +1320,7 @@
},
"required": [
"block_size",
"id",
"type",
"url"
]
Expand Down Expand Up @@ -1348,6 +1363,10 @@
"format": "uint64",
"minimum": 0
},
"id": {
"type": "string",
"format": "uuid"
},
"path": {
"type": "string"
},
Expand All @@ -1360,6 +1379,7 @@
},
"required": [
"block_size",
"id",
"path",
"type"
]
Expand Down
8 changes: 4 additions & 4 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ zone = true
# 3. Use type = "manual" instead of the "prebuilt"
type = "prebuilt"
repo = "crucible"
commit = "8314eeddd228ec0d76cefa40c4a41d3e2611ac18"
commit = "fed3e8ca7762130ee146fc516a4ef6eed2b91629"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible.sha256.txt
sha256 = "73ee7befea2d7709fe3baa358abc11faf6922d315a33b26e752363c5abcff91c"
sha256 = "050c94ff6f21bfcbaa2594f0f11922027822d8617e1a465484f92745d4b0fc12"

# Refer to
# https://github.com/oxidecomputer/propolis/blob/master/package/README.md
Expand All @@ -105,10 +105,10 @@ zone = true
[external_package.propolis-server.source]
type = "prebuilt"
repo = "propolis"
commit = "d2b8184d11d5d5f56424fe0bee13ca03d576604e"
commit = "23a38f4a1df4afcba3905f94ebbf312d0d187c7d"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/propolis/image/<commit>/propolis-server.sha256.txt
sha256 = "b192fbaaee850e63adaf9f7fe5ff2054a9de338d70198b1d1670285057a047be"
sha256 = "9c1f23c8db27c6fe114ae05358f76d88a8be803e622ad8d09a6c654692c2ffb8"

[external_package.maghemite]
service_name = "mg-ddm"
Expand Down
4 changes: 2 additions & 2 deletions sled-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cfg-if = "1.0"
chrono = { version = "0.4", features = [ "serde" ] }
clap = { version = "3.2", features = ["derive"] }
# Only used by the simulated sled agent.
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "8314eeddd228ec0d76cefa40c4a41d3e2611ac18" }
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "fed3e8ca7762130ee146fc516a4ef6eed2b91629" }
ddm-admin-client = { path = "../ddm-admin-client" }
dropshot = { git = "https://github.com/oxidecomputer/dropshot", branch = "main", features = [ "usdt-probes" ] }
futures = "0.3.21"
Expand All @@ -27,7 +27,7 @@ omicron-common = { path = "../common" }
p256 = "0.9.0"
percent-encoding = "2.1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "d2b8184d11d5d5f56424fe0bee13ca03d576604e" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "23a38f4a1df4afcba3905f94ebbf312d0d187c7d" }
rand = { version = "0.8.5", features = ["getrandom"] }
reqwest = { version = "0.11.8", default-features = false, features = ["rustls-tls", "stream"] }
schemars = { version = "0.8.10", features = [ "chrono", "uuid1" ] }
Expand Down

0 comments on commit 0fd5545

Please sign in to comment.