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

Adding FD_SOCK2 -> FD_SOCK workaround #440

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions provision/minikube/keycloak/config/kcb-infinispan-cache-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
xsi:schemaLocation="urn:infinispan:config:14.0 https://www.infinispan.org/schemas/infinispan-config-14.0.xsd"
xmlns="urn:infinispan:config:14.0">

<!-- Workaround for https://github.com/keycloak/keycloak/issues/21092 -->
<jgroups>
<stack name="kubernetes-with-fdsock" extends="kubernetes">
<!-- When using an embedded stack, replacement is done by Infinispan which requires environment variables to be
prefixed with ".env", while JGroups falls back to environment variables without the prefix.
The Keycloak Operator passes this information in an enviornment variable `jgroups.dns.query`.
See https://github.com/keycloak/keycloak/issues/21830 for a discussion.
-->
<dns.DNS_PING dns_query="${env.jgroups.dns.query}" />
<!-- Workaround for problems with FD_SOCK2, which might fail when the other nodes are not ready yet.
See https://github.com/keycloak/keycloak/issues/21092 -->
<FD_SOCK stack.combine="REPLACE" stack.position="FD_SOCK2"/>
</stack>
</jgroups>

<!-- the statistics="true" attribute is not part of the original KC config and was added by Keycloak Benchmark -->
<cache-container name="keycloak" statistics="true">
<transport lock-timeout="60000"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
urn:infinispan:config:store:remote:14.0 https://www.infinispan.org/schemas/infinispan-cachestore-remote-config-14.0.xsd"
xmlns="urn:infinispan:config:14.0">

<!-- Workaround for https://github.com/keycloak/keycloak/issues/21092 -->
<jgroups>
<stack name="kubernetes-with-fdsock" extends="kubernetes">
<!-- When using an embedded stack, replacement is done by Infinispan which requires environment variables to be
prefixed with ".env", while JGroups falls back to environment variables without the prefix.
The Keycloak Operator passes this information in an enviornment variable `jgroups.dns.query`.
See https://github.com/keycloak/keycloak/issues/21830 for a discussion.
-->
<dns.DNS_PING dns_query="${env.jgroups.dns.query}" />
<!-- Workaround for problems with FD_SOCK2, which might fail when the other nodes are not ready yet.
See https://github.com/keycloak/keycloak/issues/21092 -->
<FD_SOCK stack.combine="REPLACE" stack.position="FD_SOCK2"/>
</stack>
</jgroups>

<!-- the statistics="true" attribute is not part of the original KC config and was added by Keycloak Benchmark -->
<cache-container name="keycloak" statistics="true">
<transport lock-timeout="60000" site="ISPN"/>
Expand Down
3 changes: 3 additions & 0 deletions provision/minikube/keycloak/templates/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
haproxy.router.openshift.io/disable_cookies: 'true'
{{end}}
additionalOptions:
# Workaround for https://github.com/keycloak/keycloak/issues/21092
- name: 'cache-stack'
value: kubernetes-with-fdsock
{{ if or (eq .Values.database "aurora-postgres") (eq .Values.database "postgres") (eq .Values.database "postgres+infinispan") }}
- name: db
value: postgres
Expand Down