bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.44k stars 4.9k forks source link

Unable to launch container with scylladb 6.0 #75097

Open Alexandre-Stoppini-Cyberdian opened 23 hours ago

Alexandre-Stoppini-Cyberdian commented 23 hours ago

Name and Version

bitnami/scylladb/6.0

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. In Docker with the DockerFile
    
    FROM bitnami/scylladb:6.0-debian-12

ENV SCYLLADB_CLUSTER_NAME=project\ SCYLLADB_DEVELOPER_MODE=no \ BITNAMI_DEBUG=true \ SCYLLADB_IGNORE_INITDB_SCRIPTS=no \ SCYLLADB_PASSWORD_SEEDER=yes \ SCYLLADB_CFG_YAML_BATCH_SIZE_WARN_THRESHOLD=20KiB \ SCYLLADB_CFG_YAML_BATCH_SIZE_FAIL_THRESHOLD=200KiB \ SCYLLADB_CFG_YAML_READ_REQUEST_TIMEOUT_IN_MS=20000 \ SCYLLADB_CFG_YAML_RANGE_REQUEST_TIMEOUT_IN_MS=20000 \ SCYLLADB_CFG_YAML_WRITE_REQUEST_TIMEOUT_IN_MS=20000 \ SCYLLADB_CFG_YAML_COUNTER_WRITE_REQUEST_TIMEOUT_IN_MS=20000 \ SCYLLADB_CFG_YAML_CAS_CONTENTION_TIMEOUT_IN_MS=10000 \ SCYLLADB_CFG_YAML_TRUNCATE_REQUEST_TIMEOUT_IN_MS=60000 \ SCYLLADB_CFG_YAML_REQUEST_TIMEOUT_IN_MS=10000

Add CQL queries to be run upon boot

COPY --chown=1001:1001 init-cql /docker-entrypoint-initdb.d COPY --chown=1001:1001 data/ /bitnami/scylladb/data/ COPY --chown=1001:1001 io.conf /opt/bitnami/scylladb/etc.default/scylla.d/io.conf COPY --chown=1001:1001 io_properties.yaml /opt/bitnami/scylladb/etc.default/scylla.d/io_properties.yaml COPY --chown=1001:1001 run.sh /opt/bitnami/scripts/scylladb/run.sh COPY --chown=1001:1001 libscylladb.sh /opt/bitnami/scripts/libscylladb.sh

RUN chmod 755 /opt/bitnami/scripts/scylladb/run.sh


2. With init-cql containing files named as follows: 
- 00-init.cql
- 01-namespace1.cql
- 02-namesapce2.cql
- ...
Containing CQL code with exemple from `00-init.cql` : 
```cql
ALTER KEYSPACE system_auth WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
CREATE ROLE IF NOT EXISTS example WITH PASSWORD = 'passwd' AND LOGIN = true;
  1. Executing the DockerFile

What is the expected behavior?

scylladb 17:06:07.35 WARN  ==> Couldn't find jemalloc installed. Skipping jemalloc configuration.
2024-11-21T17:06:07.463232203Z scylladb 17:06:07.46 DEBUG ==> Ensuring expected directories/files exist...
2024-11-21T17:06:07.471606033Z scylladb 17:06:07.47 INFO  ==> Deploying scylladb with persisted data
2024-11-21T17:06:07.474774169Z scylladb 17:06:07.47 INFO  ==> Loading user's custom files from /docker-entrypoint-initdb.d ...
2024-11-21T17:06:07.477262119Z scylladb 17:06:07.47 INFO  ==> Starting scylladb
2024-11-21T17:06:07.480330257Z scylladb 17:06:07.47 INFO  ==> Checking that it started up correctly
2024-11-21T17:06:07.483504093Z scylladb 17:06:07.48 DEBUG ==> Checking that log /opt/bitnami/scylladb/logs/scylladb_init_scripts_boot.log contains entry "Starting listening for CQL clients"
2024-11-21T17:06:12.488947739Z INFO  2024-11-21 17:06:09,417 [shard 0:stmt] cql_server_controller - Starting listening for CQL clients on 0.0.0.0:9042 (unencrypted, non-shard-aware)
2024-11-21T17:06:12.488981239Z INFO  2024-11-21 17:06:09,417 [shard 0:stmt] cql_server_controller - Starting listening for CQL clients on 0.0.0.0:19042 (unencrypted, shard-aware)
2024-11-21T17:06:12.492156514Z scylladb 17:06:12.49 INFO  ==> Found CQL startup log line
2024-11-21T17:06:12.495725987Z scylladb 17:06:12.49 INFO  ==> Trying to access CQL server @ 1660d428fab0
2024-11-21T17:06:12.508924184Z scylladb 17:06:12.50 DEBUG ==> Executing CQL "DESCRIBE KEYSPACES"
2024-11-21T17:06:12.672646313Z 
2024-11-21T17:06:12.672666613Z Warning: Using a password on the command line interface can be insecure.
2024-11-21T17:06:12.672669413Z Recommendation: use the credentials file to securely provide the password.
2024-11-21T17:06:12.672671613Z 
2024-11-21T17:06:12.702874979Z WARNING: cqlsh was built against 5.0.0, but this server is 3.0.8.  All features may not work!
2024-11-21T17:06:12.710944516Z 
2024-11-21T17:06:12.710980716Z WARN: DESCRIBE|DESC was moved to server side in Cassandra 4.0. As a consequence DESCRIBE|DESC will not work in cqlsh '6.2.0' connected to Cassandra '3.0.8', the version that you are connected to. DESCRIBE does not exist server side prior Cassandra 4.0.
2024-11-21T17:06:12.746694338Z scylladb 17:06:12.74 INFO  ==> Accessed CQL server successfully

What do you see instead?

scylladb 17:04:45.52 WARN  ==> Couldn't find jemalloc installed. Skipping jemalloc configuration.
2024-11-21T17:04:45.625103882Z scylladb 17:04:45.62 DEBUG ==> Ensuring expected directories/files exist...
2024-11-21T17:04:45.634098766Z scylladb 17:04:45.63 INFO  ==> Deploying scylladb with persisted data
2024-11-21T17:04:45.637289661Z scylladb 17:04:45.63 INFO  ==> Loading user's custom files from /docker-entrypoint-initdb.d ...
2024-11-21T17:04:45.639720457Z scylladb 17:04:45.63 INFO  ==> Starting scylladb
2024-11-21T17:04:45.643485850Z scylladb 17:04:45.64 INFO  ==> Checking that it started up correctly
2024-11-21T17:04:45.647849942Z scylladb 17:04:45.64 DEBUG ==> Checking that log /opt/bitnami/scylladb/logs/scylladb_init_scripts_boot.log contains entry "Starting listening for CQL clients"
2024-11-21T17:04:50.651435655Z INFO  2024-11-21 17:04:47,344 [shard 0:stmt] cql_server_controller - Starting listening for CQL clients on 0.0.0.0:9042 (unencrypted, non-shard-aware)
2024-11-21T17:04:50.651472355Z INFO  2024-11-21 17:04:47,344 [shard 0:stmt] cql_server_controller - Starting listening for CQL clients on 0.0.0.0:19042 (unencrypted, shard-aware)
2024-11-21T17:04:50.653143054Z scylladb 17:04:50.65 INFO  ==> Found CQL startup log line
2024-11-21T17:04:50.654920653Z scylladb 17:04:50.65 INFO  ==> Trying to access CQL server @ 830908a08433
2024-11-21T17:04:50.660268649Z scylladb 17:04:50.65 DEBUG ==> Executing CQL "DESCRIBE KEYSPACES"
2024-11-21T17:04:50.830145633Z Traceback (most recent call last):
2024-11-21T17:04:50.830189733Z   File "/opt/bitnami/scylladb/python3/bin/cqlsh", line 5, in <module>
2024-11-21T17:04:50.830209433Z     from cqlshlib.__main__ import main
2024-11-21T17:04:50.830212933Z   File "/opt/bitnami/scylladb/python3/lib/python3.12/site-packages/cqlshlib/__main__.py", line 3, in <module>
2024-11-21T17:04:50.830215433Z     from .cqlshmain import main as cqlsh_main
2024-11-21T17:04:50.830255733Z   File "/opt/bitnami/scylladb/python3/lib/python3.12/site-packages/cqlshlib/cqlshmain.py", line 46, in <module>
2024-11-21T17:04:50.830301833Z     from cqlshlib.copyutil import ExportTask, ImportTask
2024-11-21T17:04:50.830314733Z   File "/opt/bitnami/scylladb/python3/lib/python3.12/site-packages/cqlshlib/copyutil.py", line 49, in <module>
2024-11-21T17:04:50.830594532Z     from cassandra.cqltypes import ReversedType, UserType, VarcharType, VectorType
2024-11-21T17:04:50.830605932Z ImportError: cannot import name 'VectorType' from 'cassandra.cqltypes' (/opt/bitnami/scylladb/python3/lib/python3.12/site-packages/cassandra/cqltypes.cpython-312-x86_64-linux-gnu.so). Did you mean: 'VarcharType'?

Additional information

Expected behavior obtained with updated Dockerfile starting with FROM bitnami/scylladb:6.2-debian-12. Works perfectly on bitnami/scylladb:6.0-debian-12 if line COPY --chown=1001:1001 init-cql /docker-entrypoint-initdb.d is deleted. Works as intended with this same line in the Dockerfile for bitnami/scylladb:6.2-debian-12.