Skip to content

Commit 44f4e93

Browse files
committed
Cleaner handling of monorail component reset
1 parent 3a686ca commit 44f4e93

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gateway-sp-comms/src/single_sp.rs

+10
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ impl SingleSp {
919919
) -> Result<()> {
920920
// If the SP has an update pending, then try to use the watchdog reset
921921
let mut use_watchdog = !disable_watchdog
922+
&& matches!(component, SpComponent::SP_ITSELF)
922923
&& matches!(
923924
self.update_status(component).await?,
924925
UpdateStatus::Complete(..)
@@ -1022,6 +1023,15 @@ impl SingleSp {
10221023
SpError::ResetComponentTriggerWithoutPrepare
10231024
| SpError::Monorail(MonorailError::ManagementNetworkLocked),
10241025
)) if component == SpComponent::SP_ITSELF => Ok(()),
1026+
1027+
// If we reset the Monorail subsystem, then (depending on which port
1028+
// we're using to talk to the SP) it may not be able to reply; we'll
1029+
// keep sending the Trigger command, and will expect to receive this
1030+
// error once the network comes back up.
1031+
Err(CommunicationError::SpError(
1032+
SpError::ResetComponentTriggerWithoutPrepare,
1033+
)) if component == SpComponent::MONORAIL => Ok(()),
1034+
10251035
Err(other) => Err(other),
10261036
};
10271037

0 commit comments

Comments
 (0)