Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

extenddb destroy cannot take Cassandra credentials

未关闭 适合新手
#500 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cassandra, rust
领域
cli, databases

调研方向

将 crates/app 中的 destroy 命令与 cmd_migrate.rs 进行比较;issue 指出后者支持 Cassandra 凭据。然后追踪 crates/storage-cassandra/src/bootstrapper.rs 如何读取管理员凭据,以及 migrate 命令如何传递 EXTENDDB_CASSANDRA_PASSWORD。完成标准是 destroy 接受 Cassandra 用户名和密码选项以及环境变量,并且文档中描述的经过身份验证的 Cassandra destroy 流程能够正常运行。

由索引模型根据 Issue 内容生成。

描述

bug

extenddb destroy accepts --pg-user and --pg-pass (and EXTENDDB_PG_PASSWORD) and nothing else for the administrator connection. The Cassandra bootstrapper reads its administrator from --cassandra-user and --cassandra-pass in the raw argument list (crates/storage-cassandra/src/bootstrapper.rs, lines 73 to 75), falling back to $USER with no password. destroy is a clap command, so --cassandra-user is rejected before the bootstrapper sees it:

$ extenddb destroy --config extenddb.toml --cassandra-user cassandra --yes
error: unexpected argument '--cassandra-user' found

and without it the connection is attempted as the operating-system user with no password:

$ EXTENDDB_CASSANDRA_PASSWORD=cassandra extenddb destroy --config extenddb.toml --yes
Error: Cannot connect as admin: Create engine: Connection error: Connection timeout after 10s. Check that Cassandra is running and accessible at ["127.0.0.1:9042"]. If authentication is enabled, verify username/password are correct.

Measured on a cassandra:4.1 node with PasswordAuthenticator enabled, which init requires (the default AllowAllAuthenticator rejects the application role's password with CassandraRoleManager doesn't support PASSWORD), after a successful init, verify and serve with the same build. init and migrate both have --cassandra-user, --cassandra-pass and EXTENDDB_CASSANDRA_PASSWORD (crates/app/src/cmd_migrate.rs, lines 52 and 106); destroy does not.

Fix: give destroy the same three Cassandra inputs, passing EXTENDDB_CASSANDRA_PASSWORD through the way cmd_migrate does. Until then the install page documents dropping the keyspaces and the application role with cqlsh.

Found while working on #492.

主要语言
Rust
星标
517
派生
60
平均合并
4 天 22 小时
30 天内合并 PR
40

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ExtendDB/extenddb 的其他 Issue

查看 ExtendDB/extenddb 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。