Repository navigation
fix(storage): preflight auto configuration and preserve legacy routing - #25
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当前存储 overlay 仍通过旧 S3 开关生成 multi 类;如果直接替换为 V2 配置,会把已有实例的路由切换与镜像升级绑在一起。本次统一容器内
/shared/seafile/library-storage,仅新安装默认 auto;已有实例保留原模式,显式 auto 时先盘点原配置,预检和登记成功后才改写 filesystem 配置。基线:
origin/dev a7e8c2bf1e4e7630dfa2e54427c1c03d98ad667e。提交:
0f3c5717d5364ad9ff2eaaec11808fa953baea49。依赖:Hub #38 的 storage-reconcile CLI;必须与含该 CLI 的 Hub 源码组装,旧 Hub 会拒绝预检。
改动:
.env.example显式CF_LIBRARY_STORAGE=auto。旧 overlay 不再硬编码 S3/multiple,unset 透传空值,bootstrap 在 S3=false 或 S3=true但 storage_type为空时均保留已落盘旧 multi/S3 后端,避免旧.env因 overlay 默认值变化被静默切换。create_host_path=false;根不存在、非目录、根或任级祖先为 symlink 均拒绝,不 mkdir。[cloudfile_v2] auto_local_root=/shared/seafile/library-storage、禁用 storage classes、三个后端name=filesystem,不再生成 multi 类。显式 auto 独立于旧 S3 变量。cfv2_*数据库。stdout 完整 JSON 原样输出。cf_library_storage_key不读、不改、不删。ecedbc6仍适用于现行 bootstrap,按当前 dev 重新实现生成块原位置替换,保留本地引用/覆盖并拒绝畸形 marker;没有整枝或旧接口合并。bootstrap 已在现行上游改动清单登记,无新增上游改动文件。build/v2/start-dev.py属 T1 历史入口归档范围,本 PR 不触碰构建收据或 T1 文件。验证命令与输出:
原生对象后端使用 name=filesystem;存储类 JSON 内 backend: fs 的既有格式保持不变。跨仓检查直接编译/执行当前 Server C guard,用真实生成配置确认 filesystem 接受、fs 拒绝。
测试执行真实配置渲染、原文件写入/原子替换及 Compose 解析;Hub CLI 是显式替身,覆盖新装/旧装、预检原配置、BLOCKED/PINNED 拒绝、apply 失败、配置不变、根校验、重启幂等和 fresh 初始化重试。
未覆盖:完整镜像、真实 Hub CLI+SQL 的启动链、旧数据副本 dry-run/apply、C/Go 跨挂载字节流、历史/恢复/GC/fsck;由 T6 统一集成验证。未部署 DEV/生产,未合并 PR。存储迁移/发布仍须环境审批;运行 CLI apply 跨库部分成功可能已登记,失败时原配置保留且可幂等重试,不自动回滚记录。