Skip to content

Commit c12d85a

Browse files
committed
fix: wait for pre-init job completion before cleanup, defer failure cleanup
Wait for seid to reach halt-height before cleaning up the pre-init Job, preventing premature termination mid-sync. Keep failure-path cleanup commented out until the flow is stable.
1 parent f8e7b8a commit c12d85a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/controller/node/pre_init.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func (r *SeiNodeReconciler) reconcilePreInitializing(ctx context.Context, node *
9494
}
9595

9696
if plan.Phase == seiv1alpha1.TaskPlanComplete {
97+
if !isJobComplete(job) {
98+
log.FromContext(ctx).Info("sidecar tasks complete, waiting for seid to reach halt-height", "job", job.Name)
99+
return ctrl.Result{RequeueAfter: taskPollInterval}, nil
100+
}
97101
if err := r.cleanupPreInit(ctx, node); err != nil {
98102
return ctrl.Result{}, fmt.Errorf("cleaning up pre-init resources: %w", err)
99103
}

0 commit comments

Comments
 (0)