Agent Diagnostic
The container engine selection behavior differs between the Rust e2e harness and the shell build helper:
e2e/rust/src/harness/container.rs reads OPENSHELL_E2E_CONTAINER_ENGINE, then derives Podman only when OPENSHELL_E2E_DRIVER=podman, otherwise it defaults to Docker.
tasks/scripts/container-engine.sh reads CONTAINER_ENGINE, then auto-detects Podman first when installed, then falls back to Docker.
This means a host with both Docker and Podman installed can run Rust e2e helper code with Docker while shell build scripts select Podman by default.
Description
Actual behavior: OpenShell has multiple container engine selection paths with different environment variables and default behavior. Rust e2e helpers and shell build helpers can select different engines on the same host.
Expected behavior: Container engine selection should have one documented precedence order across Rust e2e helpers and shell scripts. The same environment should select the same engine unless a caller explicitly overrides it.
Reproduction Steps
- Use a host with both
docker and podman installed.
- Leave
OPENSHELL_E2E_CONTAINER_ENGINE, OPENSHELL_E2E_DRIVER, and CONTAINER_ENGINE unset.
- Observe that Rust e2e helper logic defaults to Docker.
- Observe that
tasks/scripts/container-engine.sh auto-detects Podman first.
Environment
- OS: Linux host with Docker and Podman installed
- Docker: any installed version
- Podman: any installed version
- OpenShell: current
main
Logs
Rust helper:
OPENSHELL_E2E_CONTAINER_ENGINE -> OPENSHELL_E2E_DRIVER=podman -> docker fallback
Shell helper:
CONTAINER_ENGINE -> podman if installed -> docker fallback
Suggested Fix
Define and document a single precedence order, then update both implementations. One possible order:
- explicit
OPENSHELL_E2E_CONTAINER_ENGINE
- explicit
CONTAINER_ENGINE
- driver-derived default from
OPENSHELL_E2E_DRIVER
- auto-detect an available engine
- fail clearly if neither Docker nor Podman is available
Update:
e2e/rust/src/harness/container.rs
tasks/scripts/container-engine.sh
- relevant e2e/build documentation
Related Work
This came up while designing #1476. The GPU workload image build task should use the existing shell helper for now and avoid introducing another container-engine selector.
Agent Diagnostic
The container engine selection behavior differs between the Rust e2e harness and the shell build helper:
e2e/rust/src/harness/container.rsreadsOPENSHELL_E2E_CONTAINER_ENGINE, then derives Podman only whenOPENSHELL_E2E_DRIVER=podman, otherwise it defaults to Docker.tasks/scripts/container-engine.shreadsCONTAINER_ENGINE, then auto-detects Podman first when installed, then falls back to Docker.This means a host with both Docker and Podman installed can run Rust e2e helper code with Docker while shell build scripts select Podman by default.
Description
Actual behavior: OpenShell has multiple container engine selection paths with different environment variables and default behavior. Rust e2e helpers and shell build helpers can select different engines on the same host.
Expected behavior: Container engine selection should have one documented precedence order across Rust e2e helpers and shell scripts. The same environment should select the same engine unless a caller explicitly overrides it.
Reproduction Steps
dockerandpodmaninstalled.OPENSHELL_E2E_CONTAINER_ENGINE,OPENSHELL_E2E_DRIVER, andCONTAINER_ENGINEunset.tasks/scripts/container-engine.shauto-detects Podman first.Environment
mainLogs
Suggested Fix
Define and document a single precedence order, then update both implementations. One possible order:
OPENSHELL_E2E_CONTAINER_ENGINECONTAINER_ENGINEOPENSHELL_E2E_DRIVERUpdate:
e2e/rust/src/harness/container.rstasks/scripts/container-engine.shRelated Work
This came up while designing #1476. The GPU workload image build task should use the existing shell helper for now and avoid introducing another container-engine selector.