From 927c3596934d53478ed5bd945ca9ca26862e422c Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Fri, 14 May 2021 04:54:01 -0300 Subject: [PATCH] [KEYCLOAK-18086] - cluster-stack setting not working (#8037) --- .../main/java/org/keycloak/configuration/PropertyMappers.java | 2 +- .../java/org/keycloak/provider/quarkus/ConfigurationTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java b/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java index 0f07ad7de2..9353cac10f 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java +++ b/quarkus/runtime/src/main/java/org/keycloak/configuration/PropertyMappers.java @@ -143,7 +143,7 @@ public final class PropertyMappers { createWithDefault("cluster", "kc.spi.connections-infinispan.quarkus.config-file", "default", (value, context) -> "cluster-" + value + ".xml", "Specifies clustering configuration. The specified value points to the infinispan configuration file prefixed with the 'cluster-` " + "inside the distribution configuration directory. Supported values out of the box are 'local' and 'cluster'. Value 'local' points to the file cluster-local.xml and " + "effectively disables clustering and use infinispan caches in the local mode. Value 'default' points to the file cluster-default.xml, which has clustering enabled for infinispan caches."); - create("cluster-stack", "kc.spi.connections-infinispan.default.stack", "Specified the default stack to use for cluster communication and node discovery. Possible values are: tcp, udp, kubernetes, ec2, azure, google."); + create("cluster-stack", "kc.spi.connections-infinispan.quarkus.stack", "Specified the default stack to use for cluster communication and node discovery. Possible values are: tcp, udp, kubernetes, ec2, azure, google."); } private static void configureHostnameProviderMappers() { diff --git a/quarkus/runtime/src/test/java/org/keycloak/provider/quarkus/ConfigurationTest.java b/quarkus/runtime/src/test/java/org/keycloak/provider/quarkus/ConfigurationTest.java index f2e0bc3b52..8d6412303d 100644 --- a/quarkus/runtime/src/test/java/org/keycloak/provider/quarkus/ConfigurationTest.java +++ b/quarkus/runtime/src/test/java/org/keycloak/provider/quarkus/ConfigurationTest.java @@ -249,6 +249,9 @@ public class ConfigurationTest { Assert.assertEquals("cluster-foo.xml", initConfig("connectionsInfinispan", "quarkus").get("configFile")); System.setProperty("kc.profile", "dev"); Assert.assertEquals("cluster-foo.xml", initConfig("connectionsInfinispan", "quarkus").get("configFile")); + + System.setProperty("kc.config.args", "--cluster-stack=foo"); + Assert.assertEquals("foo", initConfig("connectionsInfinispan", "quarkus").get("stack")); } private Config.Scope initConfig(String... scope) {