Skip to content

Commit f73c5ec

Browse files
Merge pull request #626 from abays/missing_memcache_warn
Make missing Memcached a warning instead of info
2 parents 73e23fe + 0ebe0d1 commit f73c5ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

controllers/keystoneapi_controller.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,15 @@ func (r *KeystoneAPIReconciler) reconcileNormal(
867867
if err != nil {
868868
if k8s_errors.IsNotFound(err) {
869869
// Memcached should be automatically created by the encompassing OpenStackControlPlane,
870-
// so if it is missing at this point, we treat it as an info (because the user is not
871-
// responsible for manually creating it).
870+
// but we don't propagate its name into the "memcachedInstance" field of other sub-resources,
871+
// so if it is missing at this point, it *could* be because there's a mismatch between the
872+
// name of the Memcached CR and the name of the Memcached instance referenced by this CR.
873+
// Since that situation would block further reconciliation, we treat it as a warning.
872874
Log.Info(fmt.Sprintf("memcached %s not found", instance.Spec.MemcachedInstance))
873875
instance.Status.Conditions.Set(condition.FalseCondition(
874876
condition.MemcachedReadyCondition,
875-
condition.RequestedReason,
876-
condition.SeverityInfo,
877+
condition.ErrorReason,
878+
condition.SeverityWarning,
877879
condition.MemcachedReadyWaitingMessage))
878880
return ctrl.Result{RequeueAfter: 10 * time.Second}, nil
879881
}

0 commit comments

Comments
 (0)