Files
podman/libpod
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-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-11-11 12:32:46 +01:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-28 12:09:04 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-28 12:09:04 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-09-10 16:17:04 +02:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-28 12:09:04 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-11-11 12:32:46 +01:00
2025-10-28 12:09:04 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-11-11 12:32:46 +01:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00
2025-10-23 11:00:15 -04:00