Skip to content

Decide whether OpenClaw on Kubernetes keeps explicit PVC subpaths or waits for an OpenShell /sandbox fix #15049

Todo

Description

@sandl99

OpenClaw 2026.11.13 doesn't start on Kubernetes with OpenShell's default workspace volume when the storage makes /sandbox group- or world-writable. #15033 works around this with explicit PVC subpath mounts; this issue is to decide whether NemoClaw keeps that approach or waits for an OpenShell fix.

Problem

OpenClaw 2026.11.13 added assertSafeTempAncestors (src/infra/tmp-openclaw-dir.ts). It walks every ancestor of a temporary root up to / and rejects one that is group- or world-writable without the sticky bit. If both the preferred root and its fallback fail, OpenClaw throws No safe OpenClaw temp root is available.

The call that fails is OpenClaw's file logger (resolveDefaultFileLogTarget in src/logging/logger-file-io.ts). Both its preferred root (<state>/logs) and its fallback (<state>/tmp) sit inside the state directory. With runtime.keep_state, Fabric puts that directory at /sandbox/artifacts/.fabric/state/nvidia.fabric.openclaw/<agent>. In 2026.9.34 the logger wrote to /tmp/openclaw and the check didn't exist.

OpenShell 0.1.10's Kubernetes driver mounts the workspace PVC root directly at /sandbox. On kind's local-path storage, that root is 0777 0:0. The Docker driver keeps the image's /sandbox (0755, owned by 10001), so Docker isn't affected. The gateway exits before it's ready, and Fabric reports openclaw_gateway_start_failed, which NemoClaw shows as start_failed.

Setting TMPDIR=/tmp alone doesn't help: the kind E2E jobs failed at a104e80 in run 47165438690, because the logger never reads TMPDIR.

What #15033 did

  • TMPDIR=/tmp and FABRIC_HOST_SOCKET=/tmp/fabric.sock.
  • The kind cases mount private PVC subdirectories (artifacts, workspace, cache) through driverConfig sub_path. A fixture Job creates the subdirectories as the sandbox UID before the first apply.
  • docs/build-deploy/state.md and docs/build-deploy/kubernetes.md tell operators to do the same when their StorageClass gives /sandbox unsafe permissions.

As a result:

  • OpenClaw on the default Kubernetes workspace volume still fails on that storage.
  • No CI case covers the default volume any more.
  • Operators have to write driverConfig mounts and prepare the directories themselves.
  • docs/resources/limits.md doesn't mention the gap.

Options

  1. Keep the NemoClaw-side configuration. Document the explicit subpath layout as the supported setup for OpenClaw on Kubernetes, add a limits entry, and keep the kind cases on explicit mounts. NemoClaw then owns the preparation step: operator docs now, and possibly something NemoClaw generates later.
  2. Fix it in OpenShell. OpenShell would give /sandbox the same ownership and mode on Kubernetes as on Docker and Podman: owned by the sandbox user and not group- or world-writable. That is bug(kubernetes): /sandbox is root-owned with mode 0777 on local-path storage; Docker and Podman create it 0700 for the sandbox user ai-openshell/openshell#5721, which is open. feat(kubernetes): support private PVC subpaths for non-root workloads ai-openshell/openshell#5047 (private PVC subpaths for non-root workloads) would replace our fixture Job. Once OpenShell ships a fix, NemoClaw would move a kind case back to the default volume and drop the workaround docs.

Under upstream boundaries, the sandbox filesystem layout belongs to OpenShell, which points to option 2. Option 1 makes OpenClaw usable on Kubernetes until that fix ships.

To decide

Follows #15033.

Activity

  1. added this to the Roadmap: GTC SJC 2027 milestone on Dec 4, 2026
  2. added
    v1
    VRDC
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

VRDCarea: kubernetesv1

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions