Skip to content

Portable Podman sandbox cannot recover after a new user session #8441

Closed

Description

@sandl99

Investigation Summary

  • Initial onboarding from main with --experimental-profile portable succeeds on a custom Linux desktop with rootless Podman and host Ollama.
  • After ending the user session or restarting the host, NEMOCLAW_EXPERIMENTAL_PROFILE, CONTAINERS_CONF, and NETAVARK_FW are absent from both the new shell and the systemd user-manager environment.
  • The OpenShell sandbox reports Error; its stopped Podman container cannot start because Netavark falls back to nftables and reports unable to execute nft: No such file or directory.
  • Restoring the portable environment lets the container start and OpenShell reports it as Ready, but recover and gateway restart fail with failure layer: privileged control unavailable.
  • The recovered Podman container has no openshell.ai/* labels, and podman top shows only openshell-sandbox: no nemoclaw-start supervisor and no OpenClaw gateway.

Description

The hidden portable Podman profile works during its initial onboarding process but cannot recover the sandbox after a new user session or host restart.

Initial onboarding launches the managed workload through the live openshell sandbox create ... -- env ... nemoclaw-start operation. After the session ends, the portable host environment and managed startup authority are not replayed. Restoring only the Netavark environment can make the underlying container run, but it returns as a basic OpenShell Podman sandbox without the container ownership metadata or managed process topology required by NemoClaw lifecycle control.

Expected behavior: a sandbox that completes portable onboarding can recover after a user-session or host restart, including Podman networking, managed startup, OpenClaw gateway health, and inference.local. At minimum, the hidden experiment should not report successful onboarding if its durable recovery authority is incomplete.

Actual behavior: the sandbox becomes unrecoverable through start, recover, gateway restart, rebuild, and onboard --resume.

This is a focused real-host reproduction of the restart and lifecycle-recovery acceptance gap already tracked by #7744. It does not request a public Podman support claim.

Reproduction Steps

  1. On a custom Linux desktop with rootless Podman and host Ollama, install from main:

    curl -fsSL https://www.nvidia.com/nemoclaw.sh |
      NEMOCLAW_INSTALL_REF=main bash -s -- \
        --experimental-profile portable \
        --yes-i-accept-third-party-software
  2. Confirm the initial sandbox, OpenClaw gateway, Ollama backend on port 11434, auth proxy on port 11435, and inference.local are healthy.

  3. End the desktop user session or restart the host, then start a new session.

  4. Run openshell sandbox list. The sandbox reports Error, while podman ps -a shows its container stopped.

  5. Confirm these return no value:

    echo "$NEMOCLAW_EXPERIMENTAL_PROFILE"
    systemctl --user show-environment | grep NETAVARK
    systemctl --user show-environment | grep CONTAINERS_CONF
  6. Run podman start <container>. It fails with a Netavark nftables error because nft does not exist.

  7. Restore NEMOCLAW_EXPERIMENTAL_PROFILE=portable, CONTAINERS_CONF=~/.config/nemoclaw/portable/containers.conf, and NETAVARK_FW=iptables; import the runtime values with systemctl --user set-environment; restart the Podman and NemoClaw OpenShell services; then start the container.

  8. Confirm openshell sandbox list now reports Ready.

  9. Run nemoclaw <name> connect --probe-only, nemoclaw <name> recover, or nemoclaw <name> gateway restart. Recovery fails because the OpenClaw gateway is not running; the explicit failure layer is privileged control unavailable.

  10. Run podman inspect <container> | grep openshell.ai: no matching labels are present.

  11. Run podman top <container>: only openshell-sandbox is present; neither nemoclaw-start nor OpenClaw is running.

Environment

  • OS: custom Linux desktop; exact distribution and version not captured
  • Container runtime: rootless Podman; exact version not captured
  • NemoClaw: main, installed on 2026-08-06 with the hidden portable profile after fix(onboard): omit Docker-only Podman config #8415 merged
  • OpenShell: installer-selected version
  • Agent: OpenClaw
  • Inference: host Ollama on port 11434 through the NemoClaw auth proxy on port 11435
  • Networking: Netavark with the generated portable containers.conf, configured for pasta and iptables

Debug Output

A full debug archive was not transferred from the Linux host. The following focused diagnostics were collected without credentials:

After the new session:
NEMOCLAW_EXPERIMENTAL_PROFILE: empty
systemd user environment NETAVARK_FW: absent
systemd user environment CONTAINERS_CONF: absent
openshell sandbox list: Error
podman container state: stopped

podman start:
netavark: nftables error: unable to execute nft: No such file or directory

After restoring the portable environment:
openshell sandbox list: Ready
OpenClaw gateway probe: not running
automatic recovery: failed
failure layer: privileged control unavailable
openshell.ai labels: none
podman top: openshell-sandbox only

Related Work

Suggested Validation

Add a real rootless-Podman scenario that:

  1. Completes portable onboarding and proves an OpenClaw inference turn.
  2. Restarts the systemd user manager or reboots the host.
  3. Recovers the existing sandbox without recreating user state.
  4. Proves the managed supervisor, OpenClaw gateway, port 11435, and https://inference.local/v1/models.
  5. Proves lifecycle commands use provider-owned durable authority rather than Docker-specific labels or process-global environment.

Activity

  1. added
    needs: triage
    on Aug 6, 2026
  2. Dongni-Yang commented on Aug 6, 2026

    @Dongni-Yang
    Contributor

    Source-level triage of this repro, offered as evidence for classification. I did not reproduce on a rootless Podman host; the notes below are code reading against main that corroborates each observed symptom.

    The two failure layers are owned differently

    Layer 1: the Netavark failure (steps 4-7) is NemoClaw-owned.

    preparePortableExperimentalHost persists the portable runtime with systemctl --user set-environment (src/lib/onboard/experimental/portable-host-preparation.ts:168-179). That call writes the user manager's runtime environment, which does not survive a user-manager restart. Nothing in the repository writes ~/.config/environment.d/, which is the durable equivalent.

    NEMOCLAW_EXPERIMENTAL_PROFILE is never persisted either. It is exported only inside the installer process (scripts/install.sh:5047).

    Those two facts close the loop on the reported symptom. On a new session the profile variable is absent, so the isPortableExperimentalProfile(env) gate returns early (portable-host-preparation.ts:148) and the host is never re-prepared. The only caller is the onboarding path (src/lib/onboard/fatal-runtime-preflight.ts:65), so no lifecycle command re-applies it. Netavark then falls back to nftables, which matches the reported unable to execute nft: No such file or directory.

    Layer 2: the recovery failure (steps 9-11) is not reachable from this repository.

    NemoClaw discovers sandbox containers by the openshell.ai/managed-by=openshell and openshell.ai/sandbox-name labels (src/lib/sandbox/privileged-exec.ts:7-9). Step 10 reports the container carries no openshell.ai/* labels, and step 11 reports no nemoclaw-start supervisor. Both are stamped by the OpenShell sandbox provider, not by NemoClaw.

    That explains why recover, gateway restart, and connect all report the same layer: they route through the same label-filtered discovery, and privileged control unavailable is the expected result for a container that does not present as an OpenShell-managed sandbox (src/lib/actions/sandbox/gateway-restart.ts:173). Restoring the environment makes the container run, but it comes back as a plain Podman container, so no NemoClaw-side change makes it recoverable.

    What this implies for classification

    Fixing layer 1 alone would remove the nft error and let podman start succeed without manual environment restoration. It would not make the sandbox recoverable, so it does not close this issue.

    Layer 2 is the durable-authority requirement that epic #7744 already lists as a precondition for activation, so this reads as evidence that an accepted epic criterion is not yet met rather than as a regression from #8415. #8415 proves gateway startup during onboarding, which is a different path from post-restart recovery, so the two are consistent.

    I am taking the layer 1 slice. It is a self-contained defect in code this repository owns, and it is a prerequisite for layer 2 rather than an alternative to it: a container that will not start cannot be re-adopted however the provider-owned authority is eventually resolved.

    The scope I am claiming is only the durable portable runtime, so that the profile survives a user-manager restart and a new session can run podman start and see openshell sandbox list report Ready without manual environment restoration. That covers repro steps 4-8.

    I am not taking the openshell.ai/* label authority, the nemoclaw-start supervisor topology, or lifecycle recovery. Those stay with epic #7744. Any PR from me will use Refs #8441 rather than a closing keyword, so this issue stays open for the maintainer to close when the recovery half lands.

  3. self-assigned this
    on Aug 6, 2026
  4. self-assigned this
    on Aug 6, 2026
  5. added a commit that references this issue on Aug 6, 2026
    0463c5a
  6. added
    area: networking
    area: sandbox
    integration: openclaw
    platform: container
    platform: linux
    and removed
    needs: triage
    on Nov 18, 2026
  7. added theissue type on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: networkingarea: sandboxintegration: openclawplatform: containerplatform: linux

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions