diff --git a/controllers/amphoracontroller_controller.go b/controllers/amphoracontroller_controller.go index ce0b634e..6f43322e 100644 --- a/controllers/amphoracontroller_controller.go +++ b/controllers/amphoracontroller_controller.go @@ -271,7 +271,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context defaultFlavorID, err := amphoracontrollers.EnsureFlavors(ctx, instance, &r.Log, helper) if err != nil { - return ctrl.Result{}, err + return ctrl.Result{RequeueAfter: time.Duration(60) * time.Second}, nil } r.Log.Info(fmt.Sprintf("Using default flavor \"%s\"", defaultFlavorID)) diff --git a/pkg/amphoracontrollers/flavors.go b/pkg/amphoracontrollers/flavors.go index 5a873a82..a0d17b15 100644 --- a/pkg/amphoracontrollers/flavors.go +++ b/pkg/amphoracontrollers/flavors.go @@ -220,9 +220,7 @@ func ensureFlavors(osclient *openstack.OpenStack, log *logr.Logger, instance *oc ComputeFlavorID: amphoraFlavors[flavorOpts.Name].ID, } - if amphoraFlavors[flavorOpts.Name].VCPUs == 1 { - flavorProfileData.AmpImageTag = octavia.AmphoraImageTag - } else { + if amphoraFlavors[flavorOpts.Name].VCPUs > 1 { flavorProfileData.AmpImageTag = octavia.AmphoraImageVertTag } @@ -239,8 +237,8 @@ func ensureFlavors(osclient *openstack.OpenStack, log *logr.Logger, instance *oc log.Info(fmt.Sprintf("Creating Octavia flavor profile \"%s\"", flavorProfileCreateOpts.Name)) fp, err := flavorprofiles.Create(lbClient, flavorProfileCreateOpts).Extract() if err != nil { - errFmt := fmt.Errorf("error creating flavor profile: %w", err) - log.Error(errFmt, fmt.Sprintf("Amphora image might be missing or not "+ + log.Info(fmt.Sprintf("Warning: Could not create flavor profile. "+ + "Amphora image might be missing or not "+ "tagged correctly. Skipping configuration of octavia "+ "flavor profile %s and octavia flavor %s.", flavorProfileCreateOpts.Name, name)) @@ -266,7 +264,7 @@ func ensureFlavors(osclient *openstack.OpenStack, log *logr.Logger, instance *oc flavorSuccess = true } if !flavorSuccess { - return "", fmt.Errorf("none of the Octavia flavors could be configured because of errors. last error: %w", err) + return "", fmt.Errorf("none of the Octavia flavors could be configured") } return defaultFlavorID, nil }