Commit Graph

7424 Commits

Author SHA1 Message Date
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
Jan Rodák
d22e50eac9 test/system: remove deprecated cgroupsv1 skip check
Remove skip_if_rootless_cgroupsv1 call from quadlet tests since
cgroupsv1 is deprecated and no longer needs special handling

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-11-19 14:26:25 +01:00
openshift-merge-bot[bot]
fb7e99786e Merge pull request #27384 from flouthoc/multi-file-quadlet
quadlet install: add support for multiple quadlets in a single file
2025-11-18 16:01:08 +00:00
flouthoc
c22c3271bb quadlet install: multiple quadlets from single file should share app
Quadlets installed from `.quadlet` file now belongs to a single
application, anyone file removed from this application removes all the
other files as well.

Assited by: claude-4-sonnet

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-11-17 10:23:28 -08:00
openshift-merge-bot[bot]
af91cae1c5 Merge pull request #27271 from lsm5/podman6-no-cgv1
Podman6: Remove cgroupsv1
2025-11-14 17:03:59 +00:00
Matej Vašek
65411d53c9 Revert "Fix copyUIDGID parameter inversion in Docker compat API"
This reverts commit 2b848cca36.

The official Docker API documentation was misleading here.
Testing shown that old podman behaviour was correct.
In docker copyUIDGID=true means that primary container uid/gid is used,
not the uid/gid from the tar stream.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-11-14 12:39:04 +01:00
renovate[bot]
613ac5bd73 chore(deps): update dependency pytest to v9.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-12 20:40:53 +00:00
Lokesh Mandvekar
036bf7b44f test/system: delete CgV1 skips and skipped CgV2 tests
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Lokesh Mandvekar
4970fd26e4 test/e2e: delete CgV1 skips, delete tests skipped on Cgv2
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Paul Holzinger
5c1ed12d8d enable gofumpt formatter
Based on our discussion gofumpt won the vote so use that one via
golangci-lint.

https://github.com/containers/podman/discussions/27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-11 12:32:46 +01:00
openshift-merge-bot[bot]
631d15bd27 Merge pull request #27496 from containers/renovate/pytest-9.x
Update dependency pytest to v9
2025-11-10 20:21:50 +00:00
openshift-merge-bot[bot]
481c5d9fab Merge pull request #27484 from xiaolinny/main
chore: fix the inconsistent method names in the comments
2025-11-10 20:18:48 +00:00
renovate[bot]
37c3a75ce0 Update dependency pytest to v9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 18:52:02 +00:00
flouthoc
e787b4f503 quadlet: add support for multiple quadlets in a single file
Enable installing multiple quadlets from one file using '---' delimiters.
Each section requires '# FileName=<name>' comment for custom naming.
Single quadlet files remain unchanged for backward compatibility.

Assited by: claude-4-sonnet

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-11-10 08:25:48 -08:00
openshift-merge-bot[bot]
2c40377dc9 Merge pull request #27472 from Luap99/test-fixes
various different test fixes
2025-11-10 15:03:16 +00:00
openshift-merge-bot[bot]
80840578be Merge pull request #27395 from nalind/grpc-noop
Parse grpc requests on the service socket
2025-11-10 13:45:27 +00:00
xiaolinny
4e169dac8f chore: fix the inconsistent method names in the comments
Signed-off-by: xiaolinny <xiaolincode@outlook.com>
2025-11-10 15:24:17 +08:00
Paul Holzinger
950db09587 test/system: fix broken podman_runtime
This got broken during the remote testing rewrite to enable tls testing
in commit feb36e4fe6. The problem is the function didn't use the proper
podman command with the remote arg so it tried to connect to the default
socket with remote testing.

And in the checkpoint file we use it before the PODMAN_CMD was defined
so fix this by moving the basic_setup before and the use the variable
PODMAN_RUNTIME instead of having to do another info call.

Also fix the debug log output to correctly log the podman commands with
all arguments on a single line.

Fixes: feb36e4fe6 ("Implement TLS API Support")
Fixes: #27266

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:56 +01:00
Paul Holzinger
c31104f84e test/system: fix artifact test cleanup
Make sure to rmeove the artifact but we don't need to remove the
testfiles as they are part under PODMAN_TMPDIR which gets removed by
default so don't bother with that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:56 +01:00
Paul Holzinger
09cf145f39 test/system: merge artifact tests into single file
There is no need for several files here, it just means the setup and
helpers get duplicated.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
348617fba6 test/system: rework artifact created test
- use nanoseconds, so we don't need to sleep a full second do put the
  time forward.
- use the --format option instead of jq
- run test via remote as well
- don't use static file content

Fixes: #27265

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
9eba688ffa test/system: remove 701-artifact-created.bats
The tests there are a duplicate compared to the 702 file.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
ad34a695de test/system: do not run artifact test in parallel
They do not seem safe to use concurrently, see #27264.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
f89e2d3ac8 test/system: skip flaky restore test on debian
Somehow this only flakes on debian as it seem the /etc/hosts file on the
host system changes and thus causes a false postive with the
before/after restore comparison.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
b63a210dd9 test/e2e: try to fix clean up after terminated build flake
It is failing with:
replacing mount point ".../root/overlay/xxx/merged": directory not empty

First, the build does not need network so ensure we don't leak network
allocations by killing it. Second, kill is always async so ensure to
wait for the actul build process exit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:54 +01:00
Ricardo Branco
14cb9d2a6c test/system: Update test to handle new error message from runc 1.3.3
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-11-07 11:54:06 +01:00
openshift-merge-bot[bot]
4609271590 Merge pull request #27420 from givensuman/T-27095-add-apparmor-quadlet-key
Add AppArmor key to quadlet containers
2025-11-06 11:23:35 +00:00
openshift-merge-bot[bot]
ce561680bd Merge pull request #27431 from nimdrak/27421
Fixed #27421 aritfact push and pull with authfile
2025-11-06 10:08:39 +00:00
Byounguk Lee
c581e0b392 Fixes #27421 aritfact push and pull with authfile
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
2025-11-06 05:26:36 +00:00
givensuman
e7b50c33df Add AppArmor key to quadlet .container files
Fixes: #27095
Signed-off-by: givensuman <givensuman@duck.com>
2025-11-05 18:15:52 -05:00
openshift-merge-bot[bot]
23e6a89d36 Merge pull request #27379 from Honny1/fix-copyuidguid
Fix copyUIDGID parameter inversion in Docker compat API
2025-11-05 08:04:30 +00:00
openshift-merge-bot[bot]
eb63a1f38d Merge pull request #27005 from zifeitong/newer
Fix podman build "newer" pull policy
2025-11-04 15:17:37 +00:00
shiavm006
c0ae1a9bac Fix remote client rejecting empty --detach-keys string
The remote client (podman --remote) was incorrectly throwing an error
when --detach-keys="" was specified for attach, run, or start commands.
According to documentation and the v1.7.0 release notes, specifying an
empty string should disable detaching, not cause an error.

Fixes: #27414

Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-11-04 09:12:02 +05:30
Nalin Dahyabhai
be82989be3 Add a no-op GRPC responder service to the podman system service
Add a bare minimum GRPC service to the podman system service socket.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-11-03 11:14:32 -05:00
openshift-merge-bot[bot]
8aea109e42 Merge pull request #27333 from Honny1/search-tests-without-net
Eliminate network dependencies in `podman search` e2e tests with mock registry
2025-10-31 19:33:10 +00:00
openshift-merge-bot[bot]
01b669346e Merge pull request #27387 from mheon/remove_boltdb
Remove BoltDB state support
2025-10-28 17:41:05 +00:00
Matt Heon
f5bc2abe4c Remove BoltDB state support
This also includes a number of significant changes to the SQLite
state made possible by removal of the legacy DB.

1. Enable database unit tests for SQLite state, with numerous
   tweaks to get tests passing. Most notable changes are to
   container removal - where we previously didn't return an error
   if there was no container to remove - and RemovePodContainers,
   which I don't think ever worked properly from my reading of
   the failures.
2. Removal of AddContainerToPod/RemoveContainerToPod. On SQLite,
   these functions are identical to AddContainer/RemoveContainer
   and there is no reason to retain duplicates.
3. Removal of SafeRewriteContainerConfig - it's identical to
   RewriteContainerConfig in SQLite, no reason to have duplicate
   entrypoints.

As an exciting side-note, this removes Podman's requirement that
containers and pods cannot share a name, which was a BoltDB
restriction only.

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2025-10-28 12:09:04 -04:00
Dmitry Konishchev
601a072b51 Escape RequiresMountsFor value
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 20:01:45 +03:00
Dmitry Konishchev
c8ba67f6b9 Introduce assert-has-key assertion
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 19:57:35 +03:00
Dmitry Konishchev
23057fd5ed Rename misleading assertion name
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 19:23:51 +03:00
Jan Rodák
2b848cca36 Fix copyUIDGID parameter inversion in Docker compat API
Docker API's copyUIDGID=true means "preserve UID/GID from archive"
but Podman's internal Chown=true means "chown to container user".
This caused Docker SDK clients to have files incorrectly chowned
to root:root instead of preserving the archive's UID/GID.

Fixes: https://github.com/containers/podman/issues/27332
Fixes: https://issues.redhat.com/browse/RUN-3643

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-27 12:47:49 +01:00
openshift-merge-bot[bot]
5a0b74b13e Merge pull request #27352 from rhatdan/artifact
Add CreatedAt format option to podman artifact ls
2025-10-24 19:09:56 +00:00
openshift-merge-bot[bot]
cfe5bdbe46 Merge pull request #27351 from mheon/bump_600_dev
Bump Go version to v6
2025-10-24 12:24:58 +00:00
Jan Rodák
af2d913f3d test: organize search tests with BeforeEach/AfterEach patterns
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-24 13:58:05 +02:00
Jan Rodák
6b9310a0db test: refactor search_test.go to use helper functions and PodmanExitCleanly
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-24 13:56:35 +02:00
Jan Rodák
91ff7801e6 test: Replace external registry deps with mock server in search tests
- Add comprehensive mock registry server for e2e search tests
- Replace quay.io and other external registry calls with local mock
- Improve test reliability by removing network dependencies
- Maintain full test coverage with controlled mock data

Fixes: https://github.com/containers/podman/issues/27304
Fixes: https://issues.redhat.com/browse/RUN-3623

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-10-24 13:55:57 +02:00
Matt Heon
34166fc004 Bump Go version to v6
Tremendous amount of changes in here, but all should amount to
the same thing: changing Go import paths from v5 to v6.

Also bumped go.mod to github.com/containers/podman/v6 and updated
version to v6.0.0-dev.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-10-23 11:00:15 -04:00
openshift-merge-bot[bot]
3fd1f61c8a Merge pull request #27348 from TomSweeneyRedHat/dev/tsweeney/minitpyo
[CI:DOCS]Fix minor typo in buildah test
2025-10-23 13:58:47 +00:00
Daniel J Walsh
96ab027a3c Add CreatedAt format option to podman artifact ls
This change adds a .CreatedAt format option to the podman artifact ls
command to match the behavior of podman images --format CreatedAt.

The .Created field continues to display human-readable elapsed time
(e.g., '6 hours ago'), while the new .CreatedAt field displays the
full timestamp (e.g., '2025-10-23 12:34:56 +0000 UTC').

Changes:
- Refactored artifactListOutput struct to store time.Time value
- Added CreatedAt() method returning full timestamp string
- Added Created() method for human-readable duration
- Updated documentation to include .CreatedAt field
- Added e2e test for .CreatedAt format option

Generated-with: Cursor AI
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-23 09:35:21 -04:00
openshift-merge-bot[bot]
2883e95ae5 Merge pull request #27294 from mheon/warn_on_boltdb
Warn on BoltDB usage
2025-10-23 11:27:27 +00:00