The transport stack defined in the cache XML should take precedence over internal jdbc-ping default

Closes #39614

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2025-05-13 13:11:41 +02:00 committed by GitHub
parent 9cb5b5926d
commit 9b324b9228
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 46 additions and 39 deletions

View File

@ -63,9 +63,9 @@ public class CachingOptions {
public static final Option<Stack> CACHE_STACK = new OptionBuilder<>("cache-stack", Stack.class)
.category(OptionCategory.CACHE)
.strictExpectedValues(false)
.description("Define the default stack to use for cluster communication and node discovery.")
.defaultValue(Stack.jdbc_ping)
.deprecatedValues("Use 'jdbc-ping' instead", Stack.azure, Stack.ec2, Stack.google, Stack.tcp, Stack.udp, Stack.jdbc_ping_udp)
.description("Define the default stack to use for cluster communication and node discovery. Defaults to 'jdbc-ping' if not set.")
// Do not set a default value here as it would otherwise overwrite an explicit stack chosen in cache config XML
.deprecatedValues("Use 'jdbc-ping' instead by leaving it unset", Stack.azure, Stack.ec2, Stack.google, Stack.tcp, Stack.udp, Stack.jdbc_ping_udp)
.build();
public static final Option<File> CACHE_CONFIG_FILE = new OptionBuilder<>(CACHE_CONFIG_FILE_PROPERTY, File.class)

View File

@ -117,6 +117,13 @@ public class ClusterConfigDistTest {
result.assertMessage("ISPN000078: Starting JGroups channel `ISPN` with stack `encrypt-udp`");
}
@Test
@BeforeStartDistribution(ConfigureCacheUsingAsyncEncryption.class)
@Launch({"start", "--cache-config-file=cache-ispn-asym-enc.xml", "--http-enabled=true", "--hostname-strict=false", "--cache-embedded-mtls-enabled=false"})
void testCustomCacheStackInConfigFileNotDev(CLIResult result) {
result.assertMessage("ISPN000078: Starting JGroups channel `ISPN` with stack `encrypt-udp`");
}
public static class ConfigureCacheUsingAsyncEncryption implements Consumer<KeycloakDistribution> {
@Override

View File

@ -102,10 +102,10 @@ Cache:
only when remote host is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -83,10 +83,10 @@ Cache:
'clusterless' is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -103,10 +103,10 @@ Cache:
only when remote host is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -83,10 +83,10 @@ Cache:
'clusterless' is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -103,10 +103,10 @@ Cache:
only when remote host is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -82,10 +82,10 @@ Cache:
'clusterless' is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -102,10 +102,10 @@ Cache:
only when remote host is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -80,10 +80,10 @@ Cache:
'clusterless' is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config:

View File

@ -100,10 +100,10 @@ Cache:
only when remote host is set.
--cache-stack <stack>
Define the default stack to use for cluster communication and node discovery.
Possible values are: jdbc-ping, kubernetes, jdbc-ping-udp (deprecated), tcp
(deprecated), udp (deprecated), ec2 (deprecated), azure (deprecated), google
(deprecated), or a custom one. Default: jdbc-ping. Available only when
'cache' type is set to 'ispn'.
Defaults to 'jdbc-ping' if not set. Possible values are: jdbc-ping,
kubernetes, jdbc-ping-udp (deprecated), tcp (deprecated), udp (deprecated),
ec2 (deprecated), azure (deprecated), google (deprecated), or a custom one.
Available only when 'cache' type is set to 'ispn'.
Config: