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

Cassandra: Setting ALLOW_EMPTY_PASSWORD=yes produces invalid yaml #75745

Open
patdowney opened this issue Dec 13, 2024 · 1 comment
Open

Cassandra: Setting ALLOW_EMPTY_PASSWORD=yes produces invalid yaml #75745

patdowney opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
cassandra tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@patdowney
Copy link

Name and Version

bitnami/cassandra:5.0.2

What architecture are you using?

amd64

What steps will reproduce the bug?

docker run --env "ALLOW_EMPTY_PASSWORD=YES" bitnami/cassandra:5.0.2

What is the expected behavior?

...
cassandra 12:49:25.58 INFO  ==> Checking that it started up correctly
cassandra 12:50:30.68 INFO  ==> Found CQL startup log line
Picked up JAVA_TOOL_OPTIONS:
cassandra 12:50:31.53 INFO  ==> Nodetool reported the successful startup of cassandra

What do you see instead?

...
cassandra 12:35:36.79 INFO  ==> Checking that it started up correctly
cassandra 12:43:57.78 ERROR ==> cassandra failed to start up
cassandra 12:43:57.78 ERROR ==> Log content
...
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/opt/bitnami/cassandra/conf/cassandra.yaml
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml: file:/opt/bitnami/cassandra/conf/cassandra.yaml
	at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:146)
...
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:865)
Caused by: while parsing a block mapping
 in 'reader', line 29, column 1:
    cluster_name: 'My Cluster'
    ^
expected <block end>, but found '<block mapping start>'
 in 'reader', line 196, column 3:
      class_name: AllowAllAuthorizer
      ^
...

Additional information

I think the issue is around

cassandra_yaml_set "authorizer" "AllowAllAuthorizer"

The outcome of that transformation seems to change (from /opt/bitnami/cassandra/conf.default/cassandra.yaml):

authorizer:
  class_name: AllowAllAuthorizer

into

authorizer: 'AllowAllAuthorizer'
  class_name: AllowAllAuthorizer

So I think either that line is redundant, or needs some kind of conditional around it, perhaps inclusion in the -le 5 conditional directly above it

@patdowney patdowney added the tech-issues The user has a technical issue about an application label Dec 13, 2024
@github-actions github-actions bot added the triage Triage is needed label Dec 13, 2024
@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
cassandra tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants