(&self, reason: impl Into<String>)
| 155 | } |
| 156 | |
| 157 | pub fn to_failed(&self, reason: impl Into<String>) { |
| 158 | let reason = reason.into(); |
| 159 | let detail = format!("failed: {reason}"); |
| 160 | self.transition(ClusterLifecycleState::Failed { reason }, &detail); |
| 161 | } |
| 162 | |
| 163 | /// Shared implementation: swap the state, log at INFO, push the |
| 164 | /// status string to systemd. |