Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,7 @@ async fn cmd_db_disk_info(
propolis_zone: String,
volume_id: String,
disk_state: String,
import_address: String,
}

// The rows describing the downstairs regions for this disk/volume
Expand Down Expand Up @@ -2156,34 +2157,49 @@ async fn cmd_db_disk_info(
.await
.context("failed to look up sled")?;

let import_address = match disk.pantry_address {
Some(ref pa) => pa.clone().to_string(),
None => "-".to_string(),
};
UpstairsRow {
host_serial: my_sled.serial_number().to_string(),
disk_name,
instance_name,
propolis_zone: format!("oxz_propolis-server_{}", propolis_id),
volume_id: disk.volume_id().to_string(),
disk_state: disk.runtime_state.disk_state.to_string(),
import_address,
}
} else {
let import_address = match disk.pantry_address {
Some(ref pa) => pa.clone().to_string(),
None => "-".to_string(),
};
UpstairsRow {
host_serial: NOT_ON_SLED_MSG.to_string(),
disk_name,
instance_name,
propolis_zone: NO_ACTIVE_PROPOLIS_MSG.to_string(),
volume_id: disk.volume_id().to_string(),
disk_state: disk.runtime_state.disk_state.to_string(),
import_address,
}
}
} else {
// If the disk is not attached to anything, just print empty
// fields.
let import_address = match disk.pantry_address {
Some(ref pa) => pa.clone().to_string(),
None => "-".to_string(),
};
UpstairsRow {
host_serial: "-".to_string(),
disk_name: disk.name().to_string(),
instance_name: "-".to_string(),
propolis_zone: "-".to_string(),
volume_id: disk.volume_id().to_string(),
disk_state: disk.runtime_state.disk_state.to_string(),
import_address,
}
};
rows.push(usr);
Expand Down
Loading