-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add amphora image tag configuration #383
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: weinimo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8932b8f
to
27b7674
Compare
pkg/amphoracontrollers/flavors.go
Outdated
@@ -230,7 +238,7 @@ 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 { | |||
return "", err | |||
return "", fmt.Errorf("error creating flavor profiles: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to have a fallback when a flavorprofile cannot be created (for instance if the image tag doesn't exist).
we could ignore the error and continue, or maybe report an error only if none of the flavors were created successfully.
Right now, this patch will block the promotion pipeline with upstream content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I've pushed an update that should implement that idea.
529f783
to
c3b4d38
Compare
pkg/amphoracontrollers/flavors.go
Outdated
flavorSuccess = true | ||
} | ||
if !flavorSuccess { | ||
return "", fmt.Errorf("none of the Octavia flavors could be configured because of errors. last error: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't seem to work as expected:
error while creating flavors: none of the Octavia flavors could be configured because of errors. last error: %!w(<nil>)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with this PR is that it floods the output with errors and backtraces until an image is uploaded.
A solution would be to create the amphora flavor profile without amp_image_tag, it would pass and use the default tag from octavia.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try that. Also I set ctrl.Result{RequeueAfter: time.Duration(180) * time.Second}, nil
to avoid flooding the output with errors should they occur.
pkg/amphoracontrollers/flavors.go
Outdated
@@ -230,7 +239,12 @@ 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 { | |||
return "", err | |||
errFmt := fmt.Errorf("error creating flavor profile: %w", err) | |||
log.Error(errFmt, fmt.Sprintf("Amphora image might be missing or not "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a log.Warning would be more appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Logger does not seem to have a warning level. I change this to Info. https://pkg.go.dev/github.com/go-logr/[email protected]#hdr-Usage
Added hold tag label as we are soft-frozen except for blockers/critical for the time being. |
0d72724
to
1719bd2
Compare
/retest |
/retest different error this time |
@weinimo: The
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/retest |
/retest |
0590f56
to
e8f893c
Compare
/lgtm |
/retest |
/retest |
This configures the cloud to use the amphora image with vertical scaling optimization when using a compute flavor with multiple vCPUs. JIRA: https://issues.redhat.com/browse/OSPRH-8446
Return error only if none of the flavors could be configured.
Return error only if none of the flavors could be configured.
e8f893c
to
5db75f1
Compare
/lgtm |
This configures the cloud to use the amphora
image with vertical scaling optimization when
using a compute flavor with multiple vCPUs.
https://issues.redhat.com/browse/OSPRH-8446