Skip to content

Commit

Permalink
cluster_controller: shift log error on cluster update to info level
Browse files Browse the repository at this point in the history
When scylla-operator is bringing cluster up on GKE it can raise "Failed to update cluster status, Operation cannot be fulfilled on"
This PR is to log this under INFO log level

Fixes  #217
  • Loading branch information
dkropachev authored and zimnx committed Nov 5, 2020
1 parent 7fa9b2a commit 99c40d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controllers/cluster/cluster_controller.go
Expand Up @@ -121,7 +121,11 @@ func (cc *ClusterReconciler) Reconcile(request ctrl.Request) (ctrl.Result, error
if !reflect.DeepEqual(c.Status, copy.Status) {
logger.Info(ctx, "Writing cluster status.")
if err := cc.Status().Update(ctx, copy); err != nil {
logger.Error(ctx, "Failed to update cluster status", "error", err)
if apierrors.IsConflict(err) {
logger.Info(ctx, "Failed to update cluster status", "error", err)
} else {
logger.Error(ctx, "Failed to update cluster status", "error", err)
}
return reconcile.Result{}, errors.WithStack(err)
}
}
Expand Down

0 comments on commit 99c40d4

Please sign in to comment.