Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: attempt to fix race condition between pod/service deletion #18

Open
wants to merge 1 commit into
base: v1.1-criteo
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkg/controllers/cluster/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ func (cc *ClusterReconciler) sync(c *scyllav1.ScyllaCluster) error {
}
logger.Debug(ctx, "All StatefulSets are up-to-date!")

// Cleanup Cluster resources
/*// Cleanup Cluster resources
if err := cc.cleanup(ctx, c); err != nil {
cc.Recorder.Event(c, corev1.EventTypeWarning, naming.ErrSyncFailed, MessageCleanupFailed)
}
}*/

// Sync Headless Service for Cluster
if err := cc.syncClusterHeadlessService(ctx, c); err != nil {
Expand All @@ -68,6 +68,12 @@ func (cc *ClusterReconciler) sync(c *scyllav1.ScyllaCluster) error {
return errors.Wrap(err, "failed to sync member service")
}

// Criteo: moved from before "Sync Headless Service for Cluster" to here
// Cleanup Cluster resources
if err := cc.cleanup(ctx, c); err != nil {
cc.Recorder.Event(c, corev1.EventTypeWarning, naming.ErrSyncFailed, MessageCleanupFailed)
}

// Update Status
logger.Info(ctx, "Calculating cluster status...")
if err := cc.updateStatus(ctx, c); err != nil {
Expand Down