Skip to content
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

Added a parameter 'apiTimeout' to allow customization #891

Conversation

mrkisaolamb
Copy link
Contributor

Added a parameter 'apiTimeout' to allow customization to the Apache timeout.
The default is set to 120s which we do set for
HAProxy timeouts currently.

To be able to change the HAProxy value based on the apiTimeout with any update (and not just the first time) the code adds a custom annotation "api.neutron.openstack.org/timeout" with the value that was initially set, this way flags it as being set by the nova-operator.

Timeout is global for both api and metadata and they are set from nova lvl

There will be follow up patch in openstack-operator to utilize the method 'SetDefaultRouteAnnotations' to set these default route annotations in openstack-operator

Resolve: https://issues.redhat.com/browse/OSPRH-10955

@openshift-ci openshift-ci bot requested review from abays and jamepark4 November 8, 2024 10:14
@openshift-ci openshift-ci bot added the approved label Nov 8, 2024
@SeanMooney
Copy link
Contributor

im kind of -1 on this.

we expclitly said we should not be adding tunabel like this for each config option to the CRDs

i wonder is the there a way we can use DefaultConfigOverwrite or similar to allow a similar config override mechanism for apache

does it support dropin files?

if not we may need to do this but to me the is a code smell in the CRD.

@@ -57,6 +57,11 @@ spec:
description: APIDatabaseHostname - hostname to use when accessing
the API DB
type: string
apiTimeout:
default: 600
description: APITimeout for Route and Apache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt the route timeout be condired by the existing service override?

Copy link
Contributor

@bogdando bogdando Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is likely another timeout, or how would that help to have it shown up in templates/novametadata/config/httpd.conf ?

Copy link
Contributor

@bogdando bogdando Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

however, we need to document that timouts set for APIs and haproxy configs in routes/ingress must match

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I go with same timeout like it was done in cinder, glance etc openstack-k8s-operators/openstack-operator#830 also after this pr I will also creat openstak-operator pr for nova and placement

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/fe7dbf316c584e8ead6cd928abb16d63

openstack-meta-content-provider FAILURE in 12m 07s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

Added a parameter 'apiTimeout' to allow customization
to the Apache timeout.
The default is set to 60s which we do set for
HAProxy timeouts currently.

To be able to change the HAProxy value based on the apiTimeout with
any update (and not just the first time) the code adds a custom
annotation "api.nova.openstack.org/timeout" with the value that was
initially set, this way flags it as being set by the nova-operator.

Timeout is global for both api and metadata and they are set from nova lvl

There will be follow up patch in openstack-operator
to utilize the method 'SetDefaultRouteAnnotations' to set
these default route annotations in openstack-operator
mrkisaolamb added a commit to mrkisaolamb/openstack-operator that referenced this pull request Dec 11, 2024
Copy link
Contributor

@gibizer gibizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

The logic keeps the httpd timeout in sync with the haproxy timeout in the route if no override is specified by the deployer on the route.

It is couple of lines of CRD size increase, no nested structs are introduced. It is following an existing pattern. The not choose alternative would be to make the httpd conf overridable via a customeServiceOverride type of field. However we don't have such example in other operators today.

Copy link
Contributor

openshift-ci bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gibizer, mrkisaolamb

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:
  • OWNERS [gibizer,mrkisaolamb]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gibizer
Copy link
Contributor

gibizer commented Dec 20, 2024

Looks good to me.

The logic keeps the httpd timeout in sync with the haproxy timeout in the route if no override is specified by the deployer on the route.

It is couple of lines of CRD size increase, no nested structs are introduced. It is following an existing pattern. The not choose alternative would be to make the httpd conf overridable via a customeServiceOverride type of field. However we don't have such example in other operators today.

@dprince I approved this API change but I wanted to also notify you that it is coming.

@openshift-merge-bot openshift-merge-bot bot merged commit d7e33fc into openstack-k8s-operators:main Dec 20, 2024
7 checks passed
mrkisaolamb added a commit to mrkisaolamb/openstack-operator that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants