Skip to content

Commit ebecdee

Browse files
committed
fix(roles/keycloak): Quarkus timeout property getting overridden by new transaction timeout variable in Keycloak 26.6.0+
1 parent 3aa104e commit ebecdee

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
### Fixed
1414

15+
* **role:keycloak**: Fix transaction timeout silently dropping from 3600s to 300s on Keycloak 26.6.0+ due to new `transaction-default-timeout` CLI option overriding the Quarkus property
1516
* **role:keycloak**: Fix MariaDB database encoding defaulting to deprecated `utf8` (`utf8mb3`) instead of `utf8mb4`, causing warnings in Keycloak 26.6.0+
1617
* **ci**: Fix pip installs by replacing `--require-hashes` with pinned versions to allow Dependabot updates
1718
* **role:mount**: Fix `when` condition for NFS/CIFS client package installation failing with multiple mounts and when `state` key is undefined

roles/keycloak/templates/etc/systemd/system/keycloak.service.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# {{ ansible_managed }}
2-
# 2025100101
2+
# 2026040801
33

44
[Unit]
55
Description=Keycloak Service
@@ -10,9 +10,17 @@ User=keycloak
1010
Group=keycloak
1111
EnvironmentFile=/etc/sysconfig/keycloak
1212
{% if keycloak__mode == 'production' %}
13+
{% if keycloak__version is version('26.6.0', '<') %}
1314
ExecStart=/opt/keycloak/bin/kc.sh start -Dquarkus.transaction-manager.default-transaction-timeout=3600
1415
{% else %}
16+
ExecStart=/opt/keycloak/bin/kc.sh start
17+
{% endif %}
18+
{% else %}
19+
{% if keycloak__version is version('26.6.0', '<') %}
1520
ExecStart=/opt/keycloak/bin/kc.sh start-dev -Dquarkus.transaction-manager.default-transaction-timeout=3600
21+
{% else %}
22+
ExecStart=/opt/keycloak/bin/kc.sh start-dev
23+
{% endif %}
1624
{% endif %}
1725
LimitNOFILE=131072
1826
WorkingDirectory=/opt/keycloak

roles/keycloak/templates/opt/keycloak/conf/keycloak.conf.j2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# {{ ansible_managed }}
2-
# 2026031501
2+
# 2026040801
33

44
# Basic settings for running in production. Change accordingly before deploying the server.
55

@@ -74,3 +74,9 @@ hostname-backchannel-dynamic={{ keycloak__hostname_backchannel_dynamic | string
7474
# Logs
7575
log={{ keycloak__log }}
7676
log-file={{ keycloak__log_file }}
77+
78+
{% if keycloak__version is version('26.6.0', '>=') %}
79+
# Transaction
80+
transaction-default-timeout=60m
81+
transaction-setup-timeout=60m
82+
{% endif %}

0 commit comments

Comments
 (0)