Skip to content
Draft
Show file tree
Hide file tree
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
28 changes: 28 additions & 0 deletions src/dell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,13 @@ impl Redfish for Bmc {
})
}

fn reset_storage_config<'a>(
&'a self,
controller_id: &'a str,
) -> crate::RedfishFuture<'a, Result<Option<String>, RedfishError>> {
Box::pin(async move { Ok(Some(self.reset_controller_config(controller_id).await?)) })
}

fn is_boot_order_setup<'a>(
&'a self,
boot_interface_mac: &'a str,
Expand Down Expand Up @@ -2414,6 +2421,27 @@ impl Bmc {
}
}

/// TEMPORARY WORKAROUND for STOR060 on Dell PowerEdge R770 (iDRAC10).
/// After a ControllerDrivesDecommission, newer iDRAC firmware rejects volume
/// creation on the BOSS controller until its configuration is reset. Issues
/// DellRaidService.ResetConfig for the given controller; the reset takes
/// effect after a host reboot, after which volume creation succeeds.
/// Returns the job ID for the reset operation.
/// Remove once Dell ships a fixed iDRAC firmware.
async fn reset_controller_config(&self, controller_id: &str) -> Result<String, RedfishError> {
// wait for the lifecycle controller status to become Ready before resetting the controller
self.lifecycle_controller_is_ready().await?;

let url: String = "Systems/System.Embedded.1/Oem/Dell/DellRaidService/Actions/DellRaidService.ResetConfig".to_string();
let mut arg = HashMap::new();
arg.insert("TargetFQDD", controller_id);

match self.s.client.post(&url, arg).await? {
(_, Some(headers)) => self.parse_job_id_from_response_headers(&url, headers).await,
(_, None) => Err(RedfishError::NoHeader),
}
}

async fn get_storage_drives(&self, controller_id: &str) -> Result<Value, RedfishError> {
let url = format!("Systems/System.Embedded.1/Storage/{controller_id}");
let (_status_code, body): (_, HashMap<String, serde_json::Value>) =
Expand Down
22 changes: 22 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,28 @@ pub trait Redfish: Send + Sync + 'static {
volume_name: &'a str,
) -> RedfishFuture<'a, Result<Option<String>, RedfishError>>;

// Only applicable to Dells.
//
// TEMPORARY WORKAROUND: On Dell PowerEdge R770 (iDRAC10, firmware
// 1.30.10.50) volume creation on a BOSS controller fails with STOR060
// ("Configuration operations are not supported on the specified storage
// controller") after a ControllerDrivesDecommission. Resetting the
// controller configuration via DellRaidService.ResetConfig (followed by a
// host reboot) clears the condition and lets volume creation succeed.
// Dell is investigating; remove this once a fixed iDRAC firmware ships.
//
// Returns the job ID for the reset operation, if one was created.
fn reset_storage_config<'a>(
&'a self,
_controller_id: &'a str,
) -> RedfishFuture<'a, Result<Option<String>, RedfishError>> {
Box::pin(async move {
Err(RedfishError::NotSupported(
"reset_storage_config".to_string(),
))
})
}

fn ac_powercycle_supported_by_power(&self) -> bool;

/// Check if the boot order is configured as we expect (Network boot)
Expand Down
Loading