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

Configurable kcadm config delay #24

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

arso
Copy link
Contributor

@arso arso commented Apr 19, 2022

This patch makes a configuration delay more flexible to avoid
unnecessary long delays on more powerful machines.

The delay can now be set using OVE property ie.

engine-setup --otopi-environment="OVESETUP_KEYCLOAK_CONFIG/configDelaySeconds=int:5"

Signed-off-by: Artur Socha asocha@redhat.com

@arso arso requested a review from mwperina as a code owner April 19, 2022 08:50
@arso arso requested a review from tinez April 19, 2022 08:50
@sandrobonazzola sandrobonazzola added this to the ovirt-4.5.1 milestone Apr 19, 2022
@arso arso self-assigned this Apr 19, 2022
@arso arso force-pushed the configurable_config_delay branch from cd86c5b to b36de55 Compare April 20, 2022 11:28
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

Can't we use some health check? For example https://github.com/thomasdarimont/keycloak-health-checks

@arso
Copy link
Contributor Author

arso commented Apr 21, 2022

Can't we use some health check? For example https://github.com/thomasdarimont/keycloak-health-checks

I am rather reluctant to use that 3rd party module. It might be working perfectly but from the support perspective this is additional responsibility and additional work. I would stick to anything provided 'out of the box' with official Keycloak distributions.
However, after a quick research I did not find it.
Some time ago I created an issue to track it #15. For now I don't think this whole thing is urgent enough to investigate it. I would stick with some sensible default or make it configurable (this PR) to test different values.
On my VMs I can easily use 5s delay and never get this to happen, however, on OST machines this delay might be bigger (not sure if it needs to be 30seconds like already hardcoded )

@michalskrivanek
Copy link
Member

Can't we use some health check? For example https://github.com/thomasdarimont/keycloak-health-checks
I am rather reluctant to use that 3rd party module. It might be working perfectly but from the support

right, please don't

perspective this is additional responsibility and additional work. I would stick to anything provided 'out of the box' with official Keycloak distributions. However, after a quick research I did not find it. Some time ago I created an issue to track it #15. For now I don't think this whole thing is urgent enough to investigate it. I would stick with some sensible default or make it configurable (this PR) to test different values. On my VMs I can easily use 5s delay and never get this to happen, however, on OST machines this delay might be bigger (not sure if it needs to be 30seconds like already hardcoded )

who starts it and where?

This patch makes a configuration delay more flexible to avoid
unnecessary long delays on more powerful machines.

The delay can now be set using OVE property ie.

engine-setup   --otopi-environment="OVESETUP_KEYCLOAK_CONFIG/configDelaySeconds=int:5"

Signed-off-by: Artur Socha <asocha@redhat.com>
@arso arso force-pushed the configurable_config_delay branch from b36de55 to 4d22dad Compare April 26, 2022 07:48
@arso
Copy link
Contributor Author

arso commented Apr 26, 2022

Can't we use some health check? For example https://github.com/thomasdarimont/keycloak-health-checks
I am rather reluctant to use that 3rd party module. It might be working perfectly but from the support

right, please don't

perspective this is additional responsibility and additional work. I would stick to anything provided 'out of the box' with official Keycloak distributions. However, after a quick research I did not find it. Some time ago I created an issue to track it #15. For now I don't think this whole thing is urgent enough to investigate it. I would stick with some sensible default or make it configurable (this PR) to test different values. On my VMs I can easily use 5s delay and never get this to happen, however, on OST machines this delay might be bigger (not sure if it needs to be 30seconds like already hardcoded )

who starts it and where?

The process is that keycloak module/app is 'registered' on wildfly/eap just like ovirt engine. During wildfly startup this application bootstraps itself if needed. For example it creates database schema. This keycloak app initial startup process might take a bit and is asynchronous for setup code. That is why a short delay is needed or in perfect world some sort of 'ready' endpoint would be even better. Unfortunately, up to my konwledge keycloak does not have anything like that. My initial idea was to implement re-try ... but simple sleep is much easier. Eventually, I would love to return to more legit approach (when other more pressing issues are resolved)

@arso arso marked this pull request as draft June 3, 2022 08:33
@sandrobonazzola sandrobonazzola removed this from the ovirt-4.5.2 milestone Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants