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

[bitnami/neo4j 2.0] Unable to add single custom configuration in neo4j.conf #31294

Open
rocketsciencenerd opened this issue Jan 10, 2025 · 1 comment
Assignees
Labels
neo4j tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@rocketsciencenerd
Copy link

rocketsciencenerd commented Jan 10, 2025

Name and Version

bitnami/neo4j 2.0

What architecture are you using?

amd64

What steps will reproduce the bug?

We are using the neo4j community edition which means we can have only one database at a time.

We initially were trying to use a custom db "custom-db" which is set by NEO4J_initial_dbms_default__database: '${NEO4J_DBNAME:-custom-db}' in our docker-compose file locally.

However, when trying to set this same default in the helm chart using terraform like this:

resource "helm_release" "neo4j_db" {
  name       = "neo4j"
  repository = "oci://registry-1.docker.io/bitnamicharts"
  chart      = "neo4j"
  version    = "0.2.0"
  namespace  = local.namespace_name
  
  ...other settings
  
  set {
      name  = "configuration.initial.dbms.default_database"
      value = "custom-db"
  }

Note: the configuration comes from the bitnami "configuration" property and the neo4j.conf configuration initial.dbms.default_database provided by neo4j

The helm chart did not interpret it correctly and gives the following error "No declared setting with name: default_database". Logs below:

neo4j 15:30:44.09 INFO  ==> Welcome to the Bitnami neo4j container
neo4j 15:30:44.09 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
neo4j 15:30:44.09 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
neo4j 15:30:44.10 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
neo4j 15:30:44.10 INFO  ==> 
neo4j 15:30:44.12 INFO  ==> Validating settings in NEO4J_* env vars...
neo4j 15:30:44.14 WARN  ==> Hostname neo4j.local could not be resolved, this could lead to connection issues
neo4j 15:30:44.14 INFO  ==> Initializing Neo4j ...
neo4j 15:30:44.15 INFO  ==> Copying mounted configuration
neo4j 15:30:44.16 INFO  ==> Configuring Neo4j with settings provided via environment variables
neo4j 15:30:44.16 INFO  ==> Found mounted neo4j.conf file in /bitnami/neo4j/conf//neo4j.conf. The general Neo4j configuration will be skipped
neo4j 15:30:44.20 INFO  ==> Deploying Neo4j with persisted data

neo4j 15:30:44.20 INFO  ==> ** Neo4j setup finished! **
neo4j 15:30:44.24 INFO  ==> ** Starting Neo4j **
Validating Neo4j configuration: /opt/bitnami/neo4j/conf/neo4j.conf
1 issue found.
Error: Unrecognized setting. No declared setting with name: default_database. Cleanup the config or disable 'server.config.strict_validation.enabled' to continue.

Skipping Log4j validation due to previous issues.

Configuration file validation failed.
Configuration contains errors. This validation can be performed again using 'neo4j-admin server validate-config'.
Run with '--verbose' for a more detailed error message.

It seems like the auto-population of the neo4j.conf file using the "configuration" value is populated using the common.tpvalues.render which is stripping out the "initial.dbms" part of "initial.dbms.default_database".

When investigating the /opt/bitnami/neo4j/conf/neo4j.conf file:

I have no name!@neo4j-develop-std-syqh-0:/opt/bitnami/neo4j/conf$ cat neo4j.conf
#*****************************************************************
# Neo4j configuration
#
# For more details and a complete list of settings, please see
# https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/
#*****************************************************************

# The name of the default database
#initial.dbms.default_database=neo4j

The "initial.dbms.default_database=neo4j" line is visible as part of the default conf file, further confirming that this is the correct configuration value, but there doesn't seem to be a way to set it using the "configuration" value in the helm chart.

Are you using any custom parameters or values?

configuration.initial.dbms.default_database="custom-db"

What is the expected behavior?

Be able to set configuration.initial.dbms.default_database in neo4j.conf file using a helm chart custom parameter.

What do you see instead?

The common.tpvalues.render function seems to be stripping out the "initial.dbms" portion of the configuration string "initial.dbms.default_database"

Which throws this error:

Error: Unrecognized setting. No declared setting with name: default_database. Cleanup the config or disable 'server.config.strict_validation.enabled' to continue.

Additional information

Thank you for looking!

@rocketsciencenerd rocketsciencenerd added the tech-issues The user has a technical issue about an application label Jan 10, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 10, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
neo4j tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants