From 06535d43c9345413a9aa39d37cbc3d7c820bb32b Mon Sep 17 00:00:00 2001 From: SaladDay <1203511142@qq.com> Date: Fri, 6 Nov 2026 12:19:25 +0000 Subject: [PATCH] Require an i_version NFS export and log preparation errors On an ext4 export without iversion, nfsd derives the change attribute from coarse ctime. A client that lists a directory and then creates a file in the same tick keeps serving the old listing, so a later RemoveAll misses the file and fails with ENOTEMPTY. Codex scans its thread-writer lock directory before it creates the lock, so reusing an Environment failed Runtime preparation. Document the export filesystem requirement and log the preparation error. --- apps/daemon/internal/dispatch/executor.go | 2 +- docs/getting-started/workspace-storage.md | 2 +- docs/zh/getting-started/workspace-storage.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/daemon/internal/dispatch/executor.go b/apps/daemon/internal/dispatch/executor.go index 33631f75c..1f95884dd 100644 --- a/apps/daemon/internal/dispatch/executor.go +++ b/apps/daemon/internal/dispatch/executor.go @@ -215,7 +215,7 @@ func (r *Router) prepareExecutor(p *preparationState, req proto.PromptRequestPay } r.mu.Lock() owner.native, owner.preparing = native, false - r.log.Info("executor native_prepare", "executor_id", owner.id, "session_id", owner.sessionID, "duration_ms", time.Since(started).Milliseconds(), "success", err == nil && native != nil) + r.log.Info("executor native_prepare", "executor_id", owner.id, "session_id", owner.sessionID, "duration_ms", time.Since(started).Milliseconds(), "success", err == nil && native != nil, "err", err) ready := native != nil && err == nil && !owner.invalid && !r.closed && r.suspension == nil && p.status.State == "preparing" && p.ctx.Err() == nil p.busy = false if ready { diff --git a/docs/getting-started/workspace-storage.md b/docs/getting-started/workspace-storage.md index 6a6aaf058..a17243493 100644 --- a/docs/getting-started/workspace-storage.md +++ b/docs/getting-started/workspace-storage.md @@ -17,7 +17,7 @@ flowchart LR ## Prepare the NFS export -Mount the same NFSv4.2 export on the Linux Core host and on every participating node before starting their services, at the same absolute path, for example `/srv/oac-workspaces`. You manage the export, mount availability and service startup ordering. Use a trusted-client AUTH_SYS export with `root_squash`. +Mount the same NFSv4.2 export on the Linux Core host and on every participating node before starting their services, at the same absolute path, for example `/srv/oac-workspaces`. You manage the export, mount availability and service startup ordering. Use a trusted-client AUTH_SYS export with `root_squash`. Put it on XFS, or on ext4 mounted with `iversion`: without a version-counter change attribute, a client can list a directory without the file it has just created there. > [!WARNING] > Do not enable `no_root_squash` or broaden permissions to make a check pass. diff --git a/docs/zh/getting-started/workspace-storage.md b/docs/zh/getting-started/workspace-storage.md index 12f6347c7..5b1412660 100644 --- a/docs/zh/getting-started/workspace-storage.md +++ b/docs/zh/getting-started/workspace-storage.md @@ -1,7 +1,7 @@ --- title: "设置工作区存储" source: docs/getting-started/workspace-storage.md -source_hash: 158aa4bffbb61f61f607976f25f568c80e4fc0d0ab916840ee81f79799b1b410 +source_hash: 546021e154c238a05a633d69bd95c3979aa3481b924c351a878c953d83474ac3 --- 将 Session 工作区保存在沙箱节点之外的 NFS 文件系统上,可选择是否设置每个工作区的配额。microsandbox 的每个 Environment 都运行在此存储上,因此请在配置 microsandbox 后端之前先选择它。 @@ -19,7 +19,7 @@ flowchart LR ## 准备 NFS 导出 {#prepare-the-nfs-export} -启动服务前,在 Linux Core 主机和所有参与节点上将同一个 NFSv4.2 导出挂载到相同的绝对路径,例如 `/srv/oac-workspaces`。运维人员负责导出、挂载可用性和服务启动顺序。使用带有 `root_squash` 的受信任客户端 AUTH_SYS 导出。 +启动服务前,在 Linux Core 主机和所有参与节点上将同一个 NFSv4.2 导出挂载到相同的绝对路径,例如 `/srv/oac-workspaces`。运维人员负责导出、挂载可用性和服务启动顺序。使用带有 `root_squash` 的受信任客户端 AUTH_SYS 导出。导出应放在 XFS 上,或放在以 `iversion` 挂载的 ext4 上:缺少版本计数型 change attribute 时,客户端列出目录可能看不到自己刚在其中创建的文件。 > [!WARNING] > 不要启用 `no_root_squash` 或放宽权限来使检查通过。