Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Sep 28, 2023
1 parent f927d02 commit 9818c05
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 463 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions sled-agent/src/storage_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static KEY_MANAGER_READY: OnceLock<()> = OnceLock::new();
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error(transparent)]
DiskError(#[from] sled_hardware::DiskError),
DiskError(#[from] sled_hardware::PooledDiskError),

// TODO: We could add the context of "why are we doint this op", maybe?
#[error(transparent)]
Expand Down Expand Up @@ -610,7 +610,7 @@ impl StorageWorker {
&mut self,
unparsed_disk: UnparsedDisk,
queued_u2_drives: &mut Option<HashSet<QueuedDiskCreate>>,
) -> Result<Disk, sled_hardware::DiskError> {
) -> Result<Disk, sled_hardware::PooledDiskError> {
match sled_hardware::Disk::new(
&self.log,
unparsed_disk.clone(),
Expand All @@ -619,7 +619,7 @@ impl StorageWorker {
.await
{
Ok(disk) => Ok(disk),
Err(sled_hardware::DiskError::KeyManager(err)) => {
Err(sled_hardware::PooledDiskError::KeyManager(err)) => {
warn!(
self.log,
"Transient error: {err} - queuing disk {:?}", unparsed_disk
Expand All @@ -630,7 +630,7 @@ impl StorageWorker {
*queued_u2_drives =
Some(HashSet::from([unparsed_disk.into()]));
}
Err(sled_hardware::DiskError::KeyManager(err))
Err(sled_hardware::PooledDiskError::KeyManager(err))
}
Err(err) => {
error!(
Expand All @@ -651,7 +651,7 @@ impl StorageWorker {
&mut self,
zpool_name: ZpoolName,
queued_u2_drives: &mut Option<HashSet<QueuedDiskCreate>>,
) -> Result<(), sled_hardware::DiskError> {
) -> Result<(), sled_hardware::PooledDiskError> {
let synthetic_id = DiskIdentity {
vendor: "fake_vendor".to_string(),
serial: "fake_serial".to_string(),
Expand All @@ -666,7 +666,7 @@ impl StorageWorker {
.await
{
Ok(()) => Ok(()),
Err(sled_hardware::DiskError::KeyManager(err)) => {
Err(sled_hardware::PooledDiskError::KeyManager(err)) => {
warn!(
self.log,
"Transient error: {err} - queuing synthetic disk: {:?}",
Expand All @@ -678,7 +678,7 @@ impl StorageWorker {
*queued_u2_drives =
Some(HashSet::from([zpool_name.into()]));
}
Err(sled_hardware::DiskError::KeyManager(err))
Err(sled_hardware::PooledDiskError::KeyManager(err))
}
Err(err) => {
error!(
Expand Down
Loading

0 comments on commit 9818c05

Please sign in to comment.