Skip to content

Commit 63315ba

Browse files
leftwoAlan Hanson
andauthored
Use crucible-client-types instead of crucible (#1553)
Instead of including the entire crucible library, use the new crucible-client-types crate that exports only the things that the sled-agent needs. Update crucible and propolis versions. Update Cargo.toml comment for propolis-client and crucible-client-types Added new field for CrucibleOpts Co-authored-by: Alan Hanson <[email protected]>
1 parent d72a148 commit 63315ba

File tree

8 files changed

+76
-350
lines changed

8 files changed

+76
-350
lines changed

Cargo.lock

Lines changed: 54 additions & 331 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,18 @@ opt-level = 3
9090
panic = "abort"
9191

9292
#
93-
# It's common during development to use a local copy of dropshot, propolis
94-
# or steno in the parent directory. If you want to use those, uncomment
95-
# one of these blocks.
93+
# It's common during development to use a local copy of dropshot, propolis,
94+
# crucible, or steno in the parent directory. If you want to use those,
95+
# uncomment one of these blocks.
9696
#
9797
#[patch."https://github.com/oxidecomputer/dropshot"]
9898
#dropshot = { path = "../dropshot/dropshot" }
9999
#[patch."https://github.com/oxidecomputer/steno"]
100100
#steno = { path = "../steno" }
101101
#[patch."https://github.com/oxidecomputer/propolis"]
102-
#propolis-client = { path = "../propolis/client" }
103-
#propolis-server = { path = "../propolis/server" }
102+
#propolis-client = { path = "../propolis/lib/propolis-client" }
104103
#[patch."https://github.com/oxidecomputer/crucible"]
105-
#crucible = { path = "../crucible/upstairs" }
104+
#crucible-client-typess = { path = "../crucible/crucible-client-typess" }
106105

107106
#
108107
# Local client generation during development.

nexus/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ base64 = "0.13.0"
1515
bb8 = "0.8.0"
1616
clap = { version = "3.2", features = ["derive"] }
1717
cookie = "0.16"
18-
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "2add0de8489f1d4de901bfe98fc28b0a6efcc3ea" }
18+
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "1d67a53042f19ff7ca30dd20a04da94b7715ed7c" }
1919
diesel = { version = "2.0.0-rc.1", features = ["postgres", "r2d2", "chrono", "serde_json", "network-address", "uuid"] }
2020
diesel-dtrace = { git = "https://github.com/oxidecomputer/diesel-dtrace", rev = "b9262a79db59f0727ca28ca9baed6fc6e3cc31e7" }
2121
fatfs = "0.3.5"

nexus/src/app/sagas/disk_create.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ async fn sdc_regions_ensure(
489489
// TODO open a control socket for the whole volume, not
490490
// in the sub volumes
491491
control: None,
492+
read_only: false,
492493
},
493494
},
494495
],

openapi/sled-agent.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@
302302
"lossy": {
303303
"type": "boolean"
304304
},
305+
"read_only": {
306+
"type": "boolean"
307+
},
305308
"root_cert_pem": {
306309
"nullable": true,
307310
"type": "string"
@@ -316,6 +319,7 @@
316319
"required": [
317320
"id",
318321
"lossy",
322+
"read_only",
319323
"target"
320324
]
321325
},

package-manifest.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ zone = true
100100
# 3. Use type = "manual" instead of the "prebuilt"
101101
type = "prebuilt"
102102
repo = "crucible"
103-
commit = "2add0de8489f1d4de901bfe98fc28b0a6efcc3ea"
103+
commit = "1d67a53042f19ff7ca30dd20a04da94b7715ed7c"
104104
# The SHA256 digest is automatically posted to:
105105
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible.sha256.txt
106-
sha256 = "9940df1b070d4eb2305ad0b38380131b4a54cfc23b56e12ea1cbf9946b773fe9"
106+
sha256 = "d43fcfabc3f6402cfdbe3a0d31d49ae903f76b5ddec955dcee63236e4a60fdb0"
107107

108108
# Refer to
109109
# https://github.com/oxidecomputer/propolis/blob/master/package/README.md
@@ -114,10 +114,10 @@ zone = true
114114
[external_package.propolis-server.source]
115115
type = "prebuilt"
116116
repo = "propolis"
117-
commit = "13e23ff1ea51fc2b98f9e99099a46a40f805834e"
117+
commit = "c59b1ac246b19130bd489cdce217e40a4e51c094"
118118
# The SHA256 digest is automatically posted to:
119119
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/propolis/image/<commit>/propolis-server.sha256.txt
120-
sha256 = "866165e42cc8f969d0f5c758cc3d9971f27fa1f111091e0f2a33ea46b7f0af93"
120+
sha256 = "0e75d9a22f1ff14b90d04d91e5642d654563cc82f69e2e9cca5a983668d25764"
121121

122122
[external_package.maghemite]
123123
service_name = "mg-ddm"

sled-agent/Cargo.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ cfg-if = "1.0"
1414
chrono = { version = "0.4", features = [ "serde" ] }
1515
clap = { version = "3.2", features = ["derive"] }
1616
# Only used by the simulated sled agent.
17-
# TODO: This is probably overkill. We'd like to only depend on
18-
# the "crucible-agent-client", but the VolumeConstructionRequest object
19-
# does not exist there.
20-
crucible = { git = "https://github.com/oxidecomputer/crucible", rev = "2add0de8489f1d4de901bfe98fc28b0a6efcc3ea" }
21-
# Only used by the simulated sled agent.
22-
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "2add0de8489f1d4de901bfe98fc28b0a6efcc3ea" }
17+
crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "1d67a53042f19ff7ca30dd20a04da94b7715ed7c" }
18+
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "1d67a53042f19ff7ca30dd20a04da94b7715ed7c" }
2319
ddm-admin-client = { path = "../ddm-admin-client" }
2420
dropshot = { git = "https://github.com/oxidecomputer/dropshot", branch = "main", features = [ "usdt-probes" ] }
2521
futures = "0.3.21"
@@ -34,7 +30,7 @@ oximeter-producer = { version = "0.1.0", path = "../oximeter/producer" }
3430
p256 = "0.9.0"
3531
percent-encoding = "2.1.0"
3632
progenitor = { git = "https://github.com/oxidecomputer/progenitor" }
37-
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "a9399a8007f9876e31ce152848e6ecc2a9e14283" }
33+
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "c59b1ac246b19130bd489cdce217e40a4e51c094" }
3834
rand = { version = "0.8.5", features = ["getrandom"] }
3935
reqwest = { version = "0.11.8", default-features = false, features = ["rustls-tls", "stream"] }
4036
schemars = { version = "0.8.10", features = [ "chrono", "uuid1" ] }

sled-agent/src/sim/sled_agent.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ impl SledAgent {
102102
let target = DiskStateRequested::Attached(instance_id);
103103

104104
let id = match disk.volume_construction_request {
105-
crucible::VolumeConstructionRequest::Volume { id, .. } => id,
105+
crucible_client_types::VolumeConstructionRequest::Volume {
106+
id,
107+
..
108+
} => id,
106109
_ => panic!("Unexpected construction type"),
107110
};
108111
self.disks.sim_ensure(&id, initial_state, target).await?;

0 commit comments

Comments
 (0)