Skip to content

Commit

Permalink
Added/modified test-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekdwivedi3060 committed Nov 30, 2023
1 parent 2989ad5 commit ba3bb6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion controllers/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ func (r *SingleClusterReconciler) cleanupDanglingPodsRack(sts *appsv1.StatefulSe

// getIgnorablePods returns pods:
// 1. From racksToDelete that are currently not running and can be ignored in stability checks.
// 2. User given pods in ignorePodList that are currently not running and can be ignored from stability checks.
// 2. Failed/pending pods identified using maxIgnorablePods field and can be ignored from stability checks.
func (r *SingleClusterReconciler) getIgnorablePods(racksToDelete []asdbv1.Rack, configureRacks []RackState) (
sets.Set[string], error,
) {
Expand Down
9 changes: 4 additions & 5 deletions controllers/rack.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,11 @@ func (r *SingleClusterReconciler) upgradeOrRollingRestartRack(found *appsv1.Stat
}
}

podList, err := r.getOrderedRackPodList(rackState.Rack.ID)
if err != nil {
return found, reconcileError(fmt.Errorf("failed to list pods: %v", err))
}

if r.aeroCluster.Spec.RackConfig.MaxIgnorablePods != nil {
podList, err := r.getOrderedRackPodList(rackState.Rack.ID)
if err != nil {
return found, reconcileError(fmt.Errorf("failed to list pods: %v", err))
}
// Filter ignoredPods to update their dirtyVolumes in the status.
// IgnoredPods are skipped from upgrade/rolling restart, and as a result in case of device removal, dirtyVolumes
// are not updated in their pod status. This makes devices un-reusable as they cannot be cleaned up during init phase.
Expand Down

0 comments on commit ba3bb6e

Please sign in to comment.