Repository navigation
Conversation
|
One P2 edge case: Currently the helper inherits the pod UID. With pod UID 1000 and gateway UID 2000, it creates the directory owned by 1000. The sticky bit fixes the permissions check, but OpenClaw also requires a temporary-workspace directory to be owned by root or the current user. I reproduced this in isolated Docker containers using OpenClaw 2026.9.6's actual
Suggested fix: set the helper's Otherwise the approach looks sound and complements the separate installer scratch-directory work in #622. Resource and webhook tests passed locally. The failing API Docs Sync check is inherited from the base branch: the generated reference is missing |
cf1c871 to
3bf8c00
Compare
#619 made every operator init container that writes pod storage use the gateway's effective UID. Do the same for init-tmp-dir so the sticky /tmp directory belongs to the user that writes to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge order note (maintenance pass, 2026-10-11). The open stubbi PRs are stacked so they apply cleanly in this order: #623 → #627 → #620 → #618 → #617 → #628 → #629. This is position 1 of 7. #623 is at the bottom because the required E2E check cannot pass without its sticky /tmp fix (OpenClaw >= 2026.9.6 crash-loops otherwise). Branch protection requires an up-to-date branch, so after each merge click "Update branch" on the next PR and let CI re-run before merging it. |
|
Thanks—the effective-UID issue from my earlier comment is fixed. I verified that a gateway UID override of 2000 now reaches One separate P2 edge case remains: the helper copies security:
containerSecurityContext:
runAsUser: 0
runAsNonRoot: falsethe generated helper has Please propagate the effective |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If this PR is still relevant, please push updates or leave a comment. |
Problem
The required E2E check is red on
mainand on every same-repo PR: theChromium Full Integration TestsBeforeAlltimes out because theopenclawcontainer never becomes ready. The diagnostics from #620 show why. The container exits with code 1 and goes into CrashLoopBackOff, and its log says:The main container has a read-only root filesystem, so its
/tmpis an emptyDir. WithfsGroupset, the kubelet gives the root of an emptyDir mode 2777: world-writable, setgid, no sticky bit. OpenClaw 2026.9.6 and later refuse to create a temporary workspace below such a directory. The startup doctor needs that workspace whenever it has to install a configured plugin.This is the same check #616 fixed for
init-plugins. That container could fall back to the image's own/tmpbecause its root filesystem is writable; the main container cannot.Only the Full Integration suite hits it because it is the only one that passes
OPENROUTER_API_KEY, which makes OpenClaw install its Perplexity plugin at startup. Fork PRs skip that suite (no secret), and the smoke test has no key, so both stay green. Real instances are affected whenever the doctor has to install a plugin at startup.Change
init-tmp-dircreates a subdirectory in thetmpemptyDir and sets it to mode 1777./tmpviasubPath, which hides the 2777 volume root from its path ancestry.storage.fixOwnershipis false.init-tmp-diris added to the reserved init container names in the webhook.Nothing in the pod spec can set the mode of a volume root, and the pod UID does not own it, so it cannot chmod the root itself. A directory it creates inside the volume is its own.
Behavior change to note
Every instance gets one more init container, so pods roll on operator upgrade.
Testing
make testpasses locally (unit + envtest). New unit tests ininternal/resources/tmp_dir_test.go, new e2e spectest/e2e/e2e_tmp_dir_test.go.ghcr.io/openclaw/openclaw:latest(2026.9.8) under Docker, using the operator's rendered config, volume layout, read-only root and dropped capabilities:/tmpas a 2777 root-owned directory withOPENROUTER_API_KEYset: exits 1 with the message above./tmpand the key set, the gateway reachesreadyz 200.Follow-ups
init-pipstill mounts the root of the same emptyDir at/tmp. It does not run the doctor, so it is left unchanged here.🤖 Generated with Claude Code
https://claude.ai/code/session_011HrjPjDpPgTdCFicDWQpvH