Skip to content

Commit 2ed7d8e

Browse files
committed
Retry on provisioning failures after 5s
If the provisioning grpc call fails, then we don't wait the default requeue duration but requeue after 5s to retry the provisioning call faster.
1 parent 7917ca2 commit 2ed7d8e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/controllers/restatecluster/controller.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,18 @@ impl RestateCluster {
285285
"False".into(),
286286
)
287287
}
288+
Err(Error::ProvisioningFailed(ref message)) => {
289+
// Retry provisioning failures after 5 seconds - transient gRPC failures
290+
// should recover quickly once the pod's gRPC server is fully initialized
291+
warn!("Cluster provisioning failed, will retry: {message}");
292+
293+
(
294+
Ok(Action::requeue(Duration::from_secs(5))),
295+
format!("Provisioning failed: {message}"),
296+
"ProvisioningFailed".into(),
297+
"False".into(),
298+
)
299+
}
288300
Err(err) => {
289301
let message = err.to_string();
290302
(

0 commit comments

Comments
 (0)