Server gets stuck in CrashLoopBackOff if restarted during first-time repository initialization
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
调研方向
Start in core/cmd/initialize/initialize.go at verifyExistingRepositories and trace how it handles a non-empty but incomplete Kopia directory after kopia repository create is interrupted. Use the reproduction steps with the sample at operator/config/samples/klio_v1alpha1_server.yaml to inspect recovery after restarting the Pod. Done means initialization can recover from this interrupted first start instead of repeatedly failing repository password verification.
由索引模型根据 Issue 内容生成。
描述
Description
If the server Pod is restarted while it is initializing the repositories for
the first time, it never recovers. The /klio PVC is retained, the WAL
repository is already initialized and the Kopia directory is non-empty but
incomplete, so every following start fails and the Pod stays in
CrashLoopBackOff.
Steps to reproduce
The window is short, so the result is intermittent.
- Create a
Serverfromoperator/config/samples/klio_v1alpha1_server.yaml
in a new namespace. - As soon as the server container starts, force-delete the Pod while
kopia repository createis running:
kubectl delete pod <server>-klio-0 --grace-period=0 --force - The StatefulSet recreates the Pod with the retained, partially
initialized/kliovolume.
Actual behavior
verifyExistingRepositories (core/cmd/initialize/initialize.go) treats the
non-empty Kopia directory as an existing repository and tries to verify it:
WAL repository exists, verifying password
WAL repository password verified successfully
Kopia repository exists, verifying password
error connecting to repository: repository not initialized in the provided storage
Error: kopia repository exists but password verification failed: ...
The Pod exits and restarts with the same error indefinitely.
Evidence
ServerTierReconfiguration (e2e) hits this when its tier2 update lands while
Kopia init is still running. It fails with server Pod not ready after tier2 reconfiguration, and the server log shows the sequence above. Seen in:
- https://github.com/cloudnative-pg/klio/actions/runs/45379405296/job/138394270678
- https://github.com/cloudnative-pg/klio/actions/runs/45414545166/job/138517202938
- https://github.com/cloudnative-pg/klio/actions/runs/46001582793/job/140514366970
- https://github.com/cloudnative-pg/klio/actions/runs/46001582793/job/140526385248
- 主要语言
- Go
- 星标
- 41
- 派生
- 10
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 171
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudnative-pg/klio 的其他 Issue
-
Add support for a recovery window retention policy可能已有人在做 @gabriele-wolfox 今天认领。 未关闭
cloudnative-pg/klio#757 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Document how to verify the release artifacts可能已有人在做 @gabriele-wolfox 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
cloudnative-pg/klio#735 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
cloudnative-pg/klio#656 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
cloudnative-pg/klio#611 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
cloudnative-pg/klio#513 · 1 条评论 ·
维护者通常 1 天内回复
查看 cloudnative-pg/klio 的全部 Issue
相似的 Issue
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hosts可能已有人在做 @huanghaoyuanhhy 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
zilliztech/milvus-backup#1418 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 86/100
eugenioenko/ttt#1909 ·
维护者通常 1 天内回复
-
ColumnIndex max truncation returns a value smaller than the real max when the prefix is all 0xFF未关闭
难度 2/5 1-3 小时 新手友好度 84/100
parquet-go/parquet-go#819 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
-
feat(arithmetization): update `arithmetization` to ZkC version `v1.2.38`可能已有人在做 @DavePearce 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 78/100
LFDT-Lineth/lineth-monorepo#4679 ·
维护者通常 1 天内回复