How to configure CS for dataservice init deployment?

Hey,
currently we try to deploy an dataservice-application that was updated to 2024.06ext3 (from some 2023.06 version) using A12 Helm Charts (5.6.2). There we are having trouble with the contentStore (we run it embedded in the dataservice with external postgres DB).
The init-job stops because of the following error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentstoreEntityManagerFactory' defined in class path resource [com/mgmtp/a12/contentstore/autoconfigure/internal/ContentStoreRepositoryConfiguration$JpaConfiguration.class]: Failed to initialize dependency 'dsLiquibase' of LoadTimeWeaverAware bean 'contentstoreEntityManagerFactory': Error creating bean with name 'dsLiquibase' defined in class path resource [com/mgmtp/a12/dataservices/autoconfigure/DataServicesRepositoryConfiguration$LiquibaseConfiguration.class]: liquibase.exception.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in
  Position: 14 [Failed SQL: (0) CREATE TABLE databasechangelog (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP WITHOUT TIME ZONE NOT NULL, ORDEREXECUTED INTEGER NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10))]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:326)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:954)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
	...

Different attempts to solve this issue where not successful, e.g. disabling liquibase migration with contentstore-no_liquibase profile or forcefully configure the init job to connect to CS-DB (the Helm chart does not seem to do this automatically).

As I was not able to find a solution for this in the documentation I have the following questions:

  • How is the migration of a embedded content store with external postgres DB supposed to run?
  • What do we need to configure to achieve this with the A12 Helm chart 5.6.2?

Hi, I’m from Dataservices component, from the error message, it was complaining about no selected schema. Could you please try to specify your DB schema in the datasource like:
spring.datasources.contentstore.liquibase.defaultSchema=your_schema.
Hope this helps.

Isn’t this preconfigured by A12?
We don’t have a custom DB schema, so can the one we should reference be found somewhere in the A12 artifacts?

By default, db schema is public, please check if it exists. This is what I found from the error log, I need more information about your deployment env to provide proper suggestion.

After resetting the test environment we got it to work, so it may have been some wrongly applied permissions in the db (even though it looked fine).

But for the other part of my question: what instance is supposed to migrate the content store?

From what I can tell the Helm Chart is not applying the config for it to the dataservice-init job. Are the dataservice instances responsible for that? This seems risky to me regarding race conditions for multi-instance-environments.

We now manually configured the dataservice-init job to take care of this via extra ENV-vars, but I would have expected for this to be the default behaviour.

Hi @tim-steep-bit, thank you for the reporting.
We’ve informed B&D team about the issue. That will be addressed in the next version.

Update: This issue has been fixed and will be released in 2025.06-ext2 (Helm Stack Charts 7.1.0).