Repository navigation
fix(seafobj): route V2 automatic-local objects through RepoStorageId - #43
Merged
Merged
Conversation
…preflight only CE transition
…pose normalization
The generated V2 config (auto_local_root plus filesystem backends) was rejected by seafobj's backend reader, so seahub could not start on a fresh V2 install. Map that config onto the reviewed multiple-backend machinery with one synthetic auto template and a native default: routed libraries read from their own key directory and original CE libraries keep the native tree. Prefer the complete MySQL facts from the environment before parsing a partial [database] section.
The quick source check runs git diff --check; blank context lines in the patch file must not carry the space marker. The applied source tree is unchanged.
Author
|
已合并进
详见原 PR 的验收评论与 |
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.
背景
Docker #42 已合并进
dev,目标是「新装 V2 默认、正常重启不跑全库登记」。真实 CE14 新装验收发现两个阻断,均与 #42 的启动路径直接相关:seafile.conf含[cloudfile_v2] auto_local_root与三个name = filesystem后端;C/Go 认这个值,但 Hub 的 Pythonseafobj只认fs/s3/ceph/oss/swift,导入即InvalidConfigError: unknown blocks backend "filesystem",seahub 起不来。filesystem映射成fs,seafobj仍会按原生seafile-data/storage读取所有库,V2 路由库的 commit/fs/blocks 全部读不到(Hub 侧预览/打包/索引/GC 会静默读错位置)。修改
patches/seafobj/automatic-local-storage.patch:SeafileConfig.init_backend_conf()识别[cloudfile_v2] auto_local_root,复用已审核的 multiple-backend 机制:一个 syntheticis_auto模板 + 一个 native 默认;RepoStorageId读<root>/<key>/storage/<kind>(含旧自定义 key),旧 CE 库走原生seafile-data;seafobj/db.py优先使用环境变量里的完整 MySQL 连接串(容器只写connection_charset,避免 partial[database]解析崩溃)。RepoStorageId唯一决定物理位置。验证
1f6d2e1)+ Server8cfc9e0+ Hub2b7ad4c构建;隔离 CE14 + MariaDB 联合验收 66/66 通过,其中:RepoStorageId=auto-local:<uuid>、物理目录为 UUID、上传/下载/列表/删除一致;local_storage与objstore测试均 passed。已知的非本 PR 问题
新装 seahub 还缺 CloudFile fork 的 4 个列(share 库管理员授权 3 列、favorites
obj_id、tagsis_system):打包的sql/mysql.sql早于 fork migrations,而启动兼容 shim 已按设计退役,所以 fresh install 的分享/收藏/标签端点会 500。验收时用 fixture 列绕开并单独记录,需在 Hub/打包侧另修,不属于本 PR 范围。关联:原 #42 已合并;本 PR 修验收门禁发现的新装启动阻断。