Skip to content

bug(podman): deleting a sandbox that is still starting takes about 50s on rootless Podman #6144

Backlog

Description

@pimlock

User Story

As an operator on a rootless Podman gateway, I want deleting a sandbox that is still starting to return as quickly as deleting a running one, so that cancelled or abandoned creates don't hold up cleanup.

Problem Statement

On the CI rootless Podman lane, deleting a sandbox right after CreateSandbox returns, before it is ready, takes about 50 seconds. The same sequence takes about 1 to 5 seconds on rootful Podman, Docker, Kubernetes, and VM.

The conformance test policy_validation::create_stores_default_mcp_version hit this. It created a sandbox without waiting for readiness and left the delete to testkit cleanup. The extra time is in that cleanup (delete, then wait until the sandbox is gone).

Run Lane Test time
46689342218 fedora-podman-rootless 50.9s
46702820443 fedora-podman-rootless 51.8s
46689342218 fedora-podman-rootful 5.3s
46712138264 fedora-podman-rootless, test waits for ready first 7.0s

The CI lane keeps no gateway or driver logs, so where the time goes is not confirmed. The tmachine Podman gateway sets stop_timeout_secs = 15, and delete_sandbox removes the supervisor container and then the workload container, each with that stop timeout. The time fits stop requests that reach the full grace period, probably because a process still starting does not exit on SIGTERM. This is a hypothesis.

It did not reproduce on a local rootless gateway (Podman 4.9.3, e2e/with-podman-gateway.sh): the driver delete returned in under 0.1s and the test took 3s. CI's Fedora image runs a newer Podman, so version or host speed may matter.

Impact / Why This Matters

A user who cancels a create, or deletes a sandbox that is stuck starting, waits close to a minute on rootless Podman. Test suites pay the same cost. The PR #5624 test now waits for readiness first, which hides the problem instead of fixing it.

Acceptance Criteria

  • Gateway and driver logs are captured for the rootless Podman lane, or the case is reproduced with them, showing which step of the delete takes the time.
  • Deleting a sandbox right after CreateSandbox returns completes on rootless Podman in about the same time as on rootful Podman, or the remaining delay is explained and documented.

Reproduction Steps

  1. On a Fedora rootless Podman gateway configured like tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-podman.toml.j2 (stop_timeout_secs = 15), create a sandbox from the Python test image with a policy that runs as sandbox, without --wait.
  2. Delete it as soon as CreateSandbox returns, then wait until it is gone.
  3. Compare with the same steps on rootful Podman.

To run it in CI: change create_ready() to create() in create_stores_default_mcp_version (tests/suites/conformance/src/policy_validation.rs) and run the conformance family on fedora-podman-rootless.

Environment

Related

Activity

  1. added
    area:drivers
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:drivers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions