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

Introduce systemd unit restart behavior #81

Merged
merged 1 commit into from
May 22, 2023

Conversation

hwo-wd
Copy link
Collaborator

@hwo-wd hwo-wd commented May 12, 2023

Introduce a flag variable that allows to setup systemd restart behaviour, and additional variables to fine-tune it:

Variable Description Default
keycloak_service_restart_on_failure systemd restart-on-failure behavior activation True
keycloak_service_startlimitintervalsec systemd StartLimitIntervalSec 300 if keycloak_service_restart_on_failure else ``
keycloak_service_startlimitburst systemd StartLimitBurst 5 if keycloak_service_restart_on_failure else ``
keycloak_service_restartsec systemd RestartSec 10s if keycloak_service_restart_on_failure else ``

Fix #80

@guidograzioli
Copy link
Member

Hello, great contribution; would you update the PR with new variables to tune the restart behaviour?

@guidograzioli guidograzioli added the minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix label May 19, 2023
@hwo-wd
Copy link
Collaborator Author

hwo-wd commented May 22, 2023

Can do, but let me know your thoughts, Guido:

  1. do you want to have a basic keycloak_service_restart_on_failure boolean flag (defaults to true) or
  2. do you want to have all introduced settings configurable, that is 'StartLimitIntervalSec', 'StartLimitBurst', 'RestartSec' with sane defaults
  3. or both, which would lead introduce 4 new (optional) variables

@guidograzioli
Copy link
Member

I'd eventually go with option 3, but it's up to you how much of it to include in this PR (whether it is only 1, or 2, or 3, thanks!)

@hwo-wd
Copy link
Collaborator Author

hwo-wd commented May 22, 2023

As suggested, I went for 3., but the CI build is complaining on files I didn't change (thus I guess it has been doing so for a while already) - could you please check and let me know your thought? Thanks!

@guidograzioli
Copy link
Member

Don't mind the linting issues, ansible-lint has been updated with new rules and they eventually break the CI. I'll merge this now, and update the linter settings in another commit.
Thank you very much for the contribution

@guidograzioli guidograzioli changed the title Close #80 - introduce systemd restart behavior Introduce systemd unit restart behavior May 22, 2023
@guidograzioli guidograzioli merged commit 0cf7b3a into ansible-middleware:main May 22, 2023
1 check failed
@hwo-wd hwo-wd deleted the fix/80 branch June 1, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keycloak: Introduce systemd restart behavior in keycloak.service.j2
2 participants