Skip to content

Commit 2066efa

Browse files
committed
Use include all when using the global synchronization mode
1 parent 7325f22 commit 2066efa

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

controllers/remove_process_groups.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,16 @@ func includeProcessGroup(ctx context.Context, logger logr.Logger, r *FoundationD
321321
return err
322322
}
323323

324-
// TODO (johscheuer): What if multiple addresses are excluded for a process, e.g. because the pod was recreated during
325-
// the exclusion and IPs are used for exclusion.
326-
// Since we are here, we should be able to do a "include all", this would clean up all exclusion entries. Since this operator instance
327-
// has the lock and all process groups that are marked for removal are ready to be included, this should be a safe option. The only
328-
// risk would be exclusions that are not done with the operator.
329-
fdbProcessesToInclude = coordination.GetAddressesFromStatus(logger, status, readyForInclusion, true, true)
324+
// Since we are here, we are able to do an "include all", this will clean up all exclusion entries. Since this operator instance
325+
// has the lock and all process groups that are marked for removal are ready to be included, this will be a safe option.
326+
// The only risk would be exclusions that are not done by the operator. Without the `include all` we might miss exclusions based on
327+
// IP addresses as those are not present anymore (the pods hosting those processes where removed and we would need to keep track
328+
// of those excluded IPs).
329+
fdbProcessesToInclude = []fdbv1beta2.ProcessAddress{
330+
{
331+
StringAddress: "all",
332+
},
333+
}
330334
}
331335

332336
r.Recorder.Event(cluster, corev1.EventTypeNormal, "IncludingProcesses", fmt.Sprintf("Including removed processes: %v", fdbProcessesToInclude))

0 commit comments

Comments
 (0)