Skip to content

Commit

Permalink
cargo check --all-targets works
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Oct 24, 2023
1 parent 34903bc commit bbddcb4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions installinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ reqwest.workspace = true
serde.workspace = true
sha2.workspace = true
sled-hardware.workspace = true
sled-storage.workspace = true
slog.workspace = true
slog-async.workspace = true
slog-envlogger.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions installinator/src/hardware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ use anyhow::anyhow;
use anyhow::ensure;
use anyhow::Context;
use anyhow::Result;
use sled_hardware::Disk;
use sled_hardware::DiskVariant;
use sled_hardware::HardwareManager;
use sled_hardware::SledMode;
use sled_storage::disk::Disk;
use sled_storage::disk::RawDisk;
use slog::info;
use slog::Logger;

Expand All @@ -28,7 +29,8 @@ impl Hardware {
anyhow!("failed to create HardwareManager: {err}")
})?;

let disks = hardware.disks();
let disks: Vec<RawDisk> =
hardware.disks().into_iter().map(|disk| disk.into()).collect();

info!(
log, "found gimlet hardware";
Expand Down
5 changes: 3 additions & 2 deletions installinator/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ impl WriteDestination {
);

let zpool_name = disk.zpool_name().clone();
let control_plane_dir = zpool_name
.dataset_mountpoint(sled_hardware::INSTALL_DATASET);
let control_plane_dir = zpool_name.dataset_mountpoint(
sled_storage::dataset::INSTALL_DATASET,
);

match drives.entry(slot) {
Entry::Vacant(entry) => {
Expand Down
2 changes: 1 addition & 1 deletion sled-agent/src/bootstrap/secret_retriever.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl LrtqOrHardcodedSecretRetriever {
///
/// The local retriever only returns keys for epoch 0
#[derive(Debug)]
pub struct HardcodedSecretRetriever {}
struct HardcodedSecretRetriever {}

#[async_trait]
impl SecretRetriever for HardcodedSecretRetriever {
Expand Down
7 changes: 7 additions & 0 deletions sled-storage/src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ impl RawDisk {
pub fn is_real(&self) -> bool {
!self.is_synthetic()
}

pub fn devfs_path(&self) -> &Utf8PathBuf {
match self {
Self::Real(disk) => disk.devfs_path(),
Self::Synthetic(_) => unreachable!(),
}
}
}

/// A physical [`PooledDisk`] or a [`SyntheticDisk`] that contains or is backed
Expand Down

0 comments on commit bbddcb4

Please sign in to comment.