Cassandra: extenddb init does not fully configure extenddb
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with bootstrapper.rs and cmd_init.rs, then trace the per-account keyspace creation path to find where permissions can be granted. Check the existing Cassandra initialization and configuration tests while following replication factor, datacenter, credentials, and role grants through the code. Done when init followed by serve reaches a healthy server, the role works with CassandraAuthorizer, and the two named guides remove the workarounds.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Following the Cassandra setup guide, extenddb init --backend cassandra does not get a user to a running server. After init, serve fails until the user hand-edits the generated config, and clusters are required to use the "allow-all" authorizer (not CassandraAuthorizer). Issues were confirmed during the review of PR #412 (Cassandra documentation), by building the branch and following the guide; the docs now describe the broken-but-real behavior. This issue tracks fixing the behavior so the docs can describe a working path.
- --replication-factor is read but never declared
bootstrapper.rs reads --replication-factor via extract_arg (bootstrapper.rs:77), but InitArgs in cmd_init.rs never
declares the flag. clap parses InitArgs first and rejects the flag before the bootstrapper runs:
$ extenddb init --backend cassandra --replication-factor 3 ...
error: unexpected argument '--replication-factor' found
Same class as #267 (--sqlite-path).
Fix: declare replication_factor: Option on InitArgs with #[arg(long)]. The existing bootstrapper read and the
conflict check at bootstrapper.rs:150 then work.
- Application credentials are written commented out
init creates the application role (extenddb / extenddb-local-dev by default), but the generated [storage.cassandra section has username/password commented out, showing placeholder values (cassandra / cassandra-password) rather than the role it created. serve then connects unauthenticated and fails:
extenddb fatal: Failed to connect to cassandra: Connection error: Connection timeout after 10s.
Setting the two fields to the role init created makes serve start and /health return healthy. PostgreSQL and MongoDB write a working connection string; Cassandra is the outlier.
Fix: write a config serve can use as-is. Options: write username/password live and uncommented set to the created
role; or reference an env var (EXTENDDB_APP_PASSWORD is already the preferred password input) from the config. Either is fine: the requirement is that init → serve works without a hand-edit.
- Datacenter is hardcoded to datacenter1
The bootstrapper hardcodes datacenter: "datacenter1" (bootstrapper.rs:229), writes it to the config (:694), and offers
no flag. Keyspaces use NetworkTopologyStrategy referencing datacenter1, so a cluster whose local DC has any
other name fails:
Unrecognized strategy option {datacenter1} passed to NetworkTopologyStrategy for keyspace extenddb_catalog
Fix: add a --datacenter init flag (default datacenter1), threaded to the keyspace DDL and the written config — same
path as --replication-factor (do both together).
- The application role is granted no permissions
init runs CREATE ROLE ... WITH PASSWORD AND LOGIN = true (bootstrapper.rs:288) but no GRANT. Under
CassandraAuthorizer, serve fails:
User extenddb has no SELECT permission on
or any of its parentsOnly AllowAllAuthorizer works today.
The grant must scope to the deployment's keyspaces (catalog + per-account under keyspace_prefix). Per-account
keyspaces are created after init, and Cassandra has no wildcard/pattern grant, so grants can't all happen at init
time: the per-account keyspace-creation path must grant the role as each keyspace is made.
Fix: issue GRANT SELECT/MODIFY/... ON KEYSPACE TO at each keyspace's creation (bootstrapper
for the catalog keyspace, the per-account path for account keyspaces). Then CassandraAuthorizer is supported.
Done when
- init
--backend cassandra against an authenticated node, followed by serve, reaches a healthy server with no manual config edit.
--replication-factor and --datacenter are accepted and take effect. - A role created by init works under CassandraAuthorizer.
- docs/cassandra-setup.md and docs/getting-started.md are updated to drop the workarounds this issue removes.
- Lenguaje dominante
- Rust
- Estrellas
- 517
- Forks
- 60
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ExtendDB/extenddb
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
[storage.cassandra] accepts unknown keys silentlyPosiblemente ocupada @LeeroyHannigan la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ExtendDB/extenddb#540 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
Todos los issues de ExtendDB/extenddb
Issues similares
-
bug llm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
accounts bug decoding
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
wboayue/rust-ibapi#1088 ·
Los mantenedores suelen responder en 1 día
-
chmod -v: missing 'could not be accessed' line for operands that can't be stat'edPosiblemente ocupada @emirmrkaljevic la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
gtk-rs/gtk-rs-core#2068 ·
Los mantenedores suelen responder en 6 días