Files
podman/docs/source/markdown
ryanmccann1024 61cbc0c3ee feat(exec): Add --no-session flag for improved performance
Fixes: #26588

For use cases like HPC, where `podman exec` is called in rapid succession, the standard exec process can become a bottleneck due to container locking and database I/O for session tracking.

This commit introduces a new `--no-session` flag to `podman exec`. When used, this flag invokes a new, lightweight backend implementation that:

- Skips container locking, reducing lock contention
- Bypasses the creation, tracking, and removal of exec sessions in the database
- Executes the command directly and retrieves the exit code without persisting session state
- Maintains consistency with regular exec for container lookup, TTY handling, and environment setup
- Shares implementation with health check execution to avoid code duplication

The implementation addresses all performance bottlenecks while preserving compatibility with existing exec functionality including --latest flag support and proper exit code handling.

Changes include:
- Add --no-session flag to cmd/podman/containers/exec.go
- Implement lightweight execution path in libpod/container_exec.go
- Ensure consistent container validation and environment setup
- Add comprehensive exit code testing including signal handling (exit 137)
- Optimize configuration to skip unnecessary exit command setup

Signed-off-by: Ryan McCann <ryan_mccann@student.uml.edu>
Signed-off-by: ryanmccann1024 <ryan_mccann@student.uml.edu>
2025-11-19 12:44:48 -05:00
..
2025-08-07 07:28:06 +02:00
2025-08-15 23:14:24 +05:30
2022-09-06 09:37:13 -07:00
2025-06-13 04:47:22 -04:00
2024-04-04 09:28:21 -04:00
2025-08-15 23:14:24 +05:30
2025-10-29 07:59:34 -05:00
2025-08-15 23:14:24 +05:30
2025-08-16 01:30:20 +05:30
2025-11-12 15:15:34 -05:00
2025-08-15 23:14:24 +05:30
2025-08-06 22:34:18 +03:00
2025-11-12 15:15:34 -05:00