Skip to content

Commit

Permalink
reconcile err process (#991)
Browse files Browse the repository at this point in the history
Signed-off-by: huiwq1990 <[email protected]>
  • Loading branch information
huiwq1990 authored Jun 13, 2022
1 parent f8f90c3 commit 54043e5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (r *ReconcileUnitedDeployment) Reconcile(_ context.Context, request reconci
klog.Errorf("Fail to get Subsets of UnitedDeployment %s/%s: %s", instance.Namespace, instance.Name, err)
r.recorder.Event(instance.DeepCopy(), corev1.EventTypeWarning, fmt.Sprintf("Failed %s",
eventTypeFindSubsets), err.Error())
return reconcile.Result{}, nil
return reconcile.Result{}, err
}

nextReplicas, err := GetAllocatedReplicas(nameToSubset, instance)
Expand All @@ -219,7 +219,7 @@ func (r *ReconcileUnitedDeployment) Reconcile(_ context.Context, request reconci
instance.Namespace, instance.Name, err.Error())
r.recorder.Eventf(instance.DeepCopy(), corev1.EventTypeWarning, fmt.Sprintf("Failed %s",
eventTypeSpecifySubbsetReplicas), "Specified subset replicas is ineffective: %s", err.Error())
return reconcile.Result{}, nil
return reconcile.Result{}, err
}

nextPartitions := calcNextPartitions(instance, nextReplicas)
Expand All @@ -229,6 +229,7 @@ func (r *ReconcileUnitedDeployment) Reconcile(_ context.Context, request reconci
if err != nil {
klog.Errorf("Fail to update UnitedDeployment %s/%s: %s", instance.Namespace, instance.Name, err)
r.recorder.Event(instance.DeepCopy(), corev1.EventTypeWarning, fmt.Sprintf("Failed%s", eventTypeSubsetsUpdate), err.Error())
return reconcile.Result{}, err
}

return r.updateStatus(instance, newStatus, oldStatus, nameToSubset, nextReplicas, nextPartitions, currentRevision, updatedRevision, collisionCount, control)
Expand Down

0 comments on commit 54043e5

Please sign in to comment.