Skip to content

Commit 391ed39

Browse files
committed
Add missing condition in amphora controller when octavia-api is not ready
When the octavia-api service is not ready or not available, the flavor creation fails, it triggers a RequeueAfter 60 sec without any explanations (condition or logs) Add a condition error to indicate the cause of the wait/failure.
1 parent 3102aab commit 391ed39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

controllers/amphoracontroller_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
271271

272272
defaultFlavorID, err := amphoracontrollers.EnsureFlavors(ctx, instance, &r.Log, helper)
273273
if err != nil {
274+
instance.Status.Conditions.Set(condition.FalseCondition(
275+
condition.InputReadyCondition,
276+
condition.ErrorReason,
277+
condition.SeverityWarning,
278+
condition.InputReadyErrorMessage,
279+
err.Error()))
274280
return ctrl.Result{RequeueAfter: time.Duration(60) * time.Second}, nil
275281
}
276282
r.Log.Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID))

0 commit comments

Comments
 (0)