fix(manager): avoid cp -a preserve ownership failure on NFS workspaces - #1163
Open
LUOSENGWA wants to merge 1 commit into
Open
fix(manager): avoid cp -a preserve ownership failure on NFS workspaces#1163LUOSENGWA wants to merge 1 commit into
LUOSENGWA wants to merge 1 commit into
Conversation
Contributor
Author
|
The
A re-run of the failed job would likely pass. If it reproduces consistently, it may be worth filing an upstream issue for the Team reconciler delete/create timing race. Thanks!
重新运行失败的 job 大概率能通过。如果持续复现,可能值得为 Team reconciler 的删除/创建时序竞态提一个上游 issue。 谢谢! |
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.
Problem
When the Manager workspace is mounted from NFS (or any filesystem where the container user cannot chown to root), the plugin copy step in
start-qwenpaw-manager.shfails:Because
set -eis active (inmanager/scripts/lib/base.shandagentteams-env.sh), the failure aborts the entire Manager startup → the Manager enters a crash loop. Theagentteams-manager-toolsplugin (projectflow / taskflow / message / filesync) is never installed.Root cause:
cp -a(==--preserve=all) includes--preserve=ownership, which attempts tochownthe copied files to the source owner (root). On NFS with root-squash ormaprootto a non-root user, the container root cannotchownto uid 0 →Operation not permitted→cpexits non-zero →set -eaborts startup.问题
当 Manager 工作区挂载自 NFS(或任何容器用户无法 chown 到 root 的文件系统)时,
start-qwenpaw-manager.sh中的插件复制步骤会失败:由于
set -e处于启用状态(manager/scripts/lib/base.sh与agentteams-env.sh),失败会中止整个 Manager 启动流程 → Manager 进入崩溃循环。agentteams-manager-tools插件(projectflow / taskflow / message / filesync)永远无法安装。根因:
cp -a(等价于--preserve=all)包含--preserve=ownership,它会尝试将复制后的文件chown为源属主(root)。在启用 root-squash 或将maproot映射到非 root 用户的 NFS 上,容器内 root 无法chown到 uid 0 →Operation not permitted→cp非零退出 →set -e中止启动。Fix
Copy plugins without preserving ownership:
The plugin files keep the container user's ownership (readable by the QwenPaw PluginLoader); timestamps/modes/links are still preserved. Note the option order matters:
cp --no-preserve=ownership -awould be overridden by-a(which expands to--preserve=all), so--no-preserve=ownershipmust come after-a.修复
复制插件时不保留属主:
插件文件保留容器用户的属主(QwenPaw PluginLoader 可读);时间戳/权限/链接仍然保留。注意选项顺序很关键:
cp --no-preserve=ownership -a会被-a(展开为--preserve=all)覆盖,所以--no-preserve=ownership必须放在-a之后。Testing
maprootto a non-root user — plugin install succeeds, Manager starts.cp: failed to preserve ownershipand the Manager exits.测试
maproot映射到非 root 用户时 — 插件安装成功,Manager 正常启动。cp: failed to preserve ownership且 Manager 退出。