Skip to content

Not persisted config settings prevent server start #33902

Closed
@mduchrow

Description

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

dist/quarkus

Describe the bug

Starting a newly built Keycloak 26.0.0 with kc start --optimized shows the following error and starting fails.

ERROR: The following build time options have values that differ from what is persisted - the new values will NOT be used until another build is run: kc.spi-user-cache-default-enabled

When running kc build with have the following config setting in keycloak.conf:
spi-user-cache-default-enabled=false

Obviously the config parameter spi-user-cache-default-enabled is not added to the /generated-bytecode.jar/META-INF/keycloak-persisted.properties, but at startup the org.keycloak.quarkus.runtime.cli.Picocli.checkSpiOptions(IncludeOptions, List<String>, List<String>) method checks current settings (including those from keycloak.conf) against the entries of this file. The currentValueStr=false does not match currentValue=null from the persisted properties, hence the error.

In Keyckoak 25.0.6 this problem did not exist! There was no checkSpiOptions() in the Picocli class.

Version

26.0.0

Regression

  • The issue is a regression

Expected behavior

All properties set at build-time must be recognized correctly at startup-time.

Actual behavior

Starting Keycloak with --optimized fails when spi-user-cache-default-enabled=false has been set at build-time.

How to Reproduce?

  1. Put spi-user-cache-default-enabled=false into /conf/keycloak.conf
  2. Run kc build
  3. Run kc start --optimized

Anything else?

This is not just related to property spi-user-cache-default-enabled. This error will also occur with properties matching one of these patterns:

  • kc.spi*-provider
  • kc.spi*-provider-default
  • kc.spi*-enabled

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions