Commit Graph

7809 Commits

Author SHA1 Message Date
Paul Holzinger
0ead98d2d4 Merge pull request #29092 from ROKUMATE/feat-playkube-container-name
pkg/domain: include container name in kube play start errors
2026-07-03 13:25:18 +02:00
ROKUMATE
8748e6c9ac pkg/domain: include container name in kube play start errors
Fixes: #27196
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-07-03 15:07:41 +05:30
Paul Holzinger
a9a332116d Merge pull request #29104 from podman-container-tools/renovate/go-golang.org-x-net-vulnerability
Update module golang.org/x/net to v0.55.0 [SECURITY]
2026-07-02 19:20:50 +02:00
Jan Rodák
e852389e55 Merge pull request #29071 from Luap99/scannererr
fix missing error checks for bufio.Scanner
2026-07-02 14:55:12 +02:00
renovate[bot]
9ccc0490a7 Update module golang.org/x/net to v0.55.0 [SECURITY]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-02 12:39:14 +00:00
Giuseppe Scrivano
6c5efd31e3 Merge pull request #29011 from simonbrauner/issue-29004
Write quadlet units to temporary files and rename
2026-07-02 09:34:30 +02:00
Jan Rodák
63cf53d26a Merge pull request #29083 from Luap99/oci-log
podman log-level debug must produce the same oci runtime errors
2026-07-01 16:34:39 +02:00
Jan Rodák
2eae23c851 Merge pull request #29039 from Luap99/swagger-doc
docs: update API Reference docs
2026-06-30 17:23:01 +02:00
Paul Holzinger
b4aaaee306 podman log-level debug must produce the same oci runtime errors
I do not understand this condition in the code, not passing the log file
to the runtime when run with log level debug makes no sense. It means we
do not get the proper error message from the runtime so debug logging
shows a much worse error:
"container create failed (no logs from conmon)..."

When the actual error is the command is not in $PATH for example. So to
fix this just remove the log level check. Also not the support json flag
condition is done inside execOCILog().

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-30 13:02:57 +02:00
Paul Holzinger
d9465ea2bf test/e2e: rework GetHostDistributionInfo
First check for errors and assert them via gomega to make the test fails
which called this.

Then stop calling this for each test spec, most will never access this
so stop reading the file over and over. Callers should just call the
function directly.

Then remove the arch field from it, that is not related to the OS file.
Callers should just access runtime.GOARCH directly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-30 10:32:33 +02:00
Šimon Brauner
64ab8171ed Use atomic file writer for quadlet unit files
Fixes: https://github.com/podman-container-tools/podman/issues/29004

Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-06-29 22:23:57 +02:00
Jan Rodák
5c8a6d5019 Merge pull request #29038 from shuaiyuanxx/fix-volume-prune-all-label-filters
Honor label filters for volume prune when all is set
2026-06-29 16:47:29 +02:00
Marek Simek
e353bab7f5 fix: Handle healthcheck log corruption gracefully
The healthcheck log could be corrupted if the
process was interrupted mid-write. It could
lead to Podman crashing.

Write the log files atomically and diferentiate
between corrupted log and different errors in
consumers of readFromFileHealthCheckLog().
Add a system test for a corrupted log file.
Change incorrect log permissions to 0o600.

Fixes: https://redhat.atlassian.net/browse/RHEL-178222
Signed-off-by: Marek Simek <msimek@redhat.com>
2026-06-29 13:03:47 +02:00
Paul Holzinger
94c259b685 add note about the readthedocs go version requirement
The versions should be kept in sync to avoid build errors on readthedocs
later, so add a note to remind people to update them.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-29 12:02:53 +02:00
Shuai Yuan
4586dc2c60 Honor label filters for volume prune when all is set
NormalizeVolumePruneFilters discarded every query filter when the "all"
pseudo-filter was set, deleting label/label!/until before they reached the
volume filter generator. As a result `podman volume prune --all --filter
label=foo` ignored the label and pruned every unused volume.

"all" only widens the prune scope from anonymous-only to all unused volumes;
it is orthogonal to the label filters, which must still select which of those
volumes are removed. Drop only the "all" key and keep the remaining filters so
they continue to apply.

NormalizeVolumePruneFilters is shared by the local (abi), remote (libpod API),
and Docker-compat prune paths, so all three were affected.

Signed-off-by: Shuai Yuan <shuaiyuanzju@gmail.com>
2026-06-29 17:51:27 +08:00
Danish Prakash
7ab4b89c85 test/quadlet: pass Containerfile as part of a named application
PR #28860 requires non-quadlet files (e.g a Containerfile with no
recognized extension) to be passed as part of a named application.
Update tests added in #28696 to adhere to this requirment.

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-06-26 12:29:37 +05:30
Matt Heon
9a70aa562d Merge pull request #28860 from l0rd/refactor/quadlet-applications-with-fix
Quadlet installation code refactoring
2026-06-25 13:45:29 -04:00
Jan Rodák
60e90c14ec Merge pull request #28664 from givensuman/fix/generate-kube-healthcheck
Export container healthcheck as LivenessProbe in generate kube
2026-06-25 17:32:57 +02:00
Danish Prakash
de3341fd81 Merge pull request #28977 from jiwahn/fix-kube-oci-annotation-roundtrip
kube: alias OCI runtime annotations without underscores
2026-06-24 20:29:15 +05:30
Paul Holzinger
f0f740a44e Merge commit from fork
fix image host env leak
2026-06-24 16:11:44 +02:00
Matt Heon
cbdb3126e9 Merge pull request #29016 from Luap99/exec-cleanup
fix cleanupExecBundle locking and some more exec releated cleanups
2026-06-24 09:46:40 -04:00
Devesh B
07289d6cd3 fix(kube): export container healthcheck as LivenessProbe in generate kube
Fixes: #22095

Now handles exporting a container's healthcheck configuration as a
`livenessProbe` in the generated Kubernetes YAML.

Co-authored-by: givensuman <givensuman@duck.com>
Co-authored-by: Jan Rodák <hony.com@seznam.cz>

Signed-off-by: Devesh B <98201065+DeveshB-1@users.noreply.github.com>
Signed-off-by: givensuman <givensuman@duck.com>

Update test/e2e/generate_kube_test.go

Co-authored-by: Jan Rodák <hony.com@seznam.cz>
Signed-off-by: given <givensuman@gmail.com>
2026-06-23 17:10:27 -04:00
Matt Heon
9a11be879d Merge pull request #28696 from inknos/fix-quadlet-file-ordering-in-tar
quadlet API: fix tar install when non-quadlet file sorts first
2026-06-23 14:08:46 -04:00
Paul Holzinger
ae04ee07b1 libpod: remove extra state lookup in HealthCheck()
Checking the state outside of locks is not safe and does not guarantee
us anything as the container could be stopped afterwards anyways.

So just skip the state check and then later in the exec logic we do the
same check again and return ErrCtrStateInvalid so just handle that
afterwards.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-23 18:47:07 +02:00
Matt Heon
a2280a3e87 Merge pull request #28380 from simonbrauner/issue-26960
Handle uninstantiated template quadlets
2026-06-23 11:36:34 -04:00
Šimon Brauner
010e7ce556 Handle uninstantiated template quadlets
Fixes: https://github.com/containers/podman/issues/26960

Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-06-23 14:34:20 +02:00
Radostin Stoyanov
2c7aeab70b Freeze cgroup during live checkpoint
When checkpointing a container with --leave-running, libpod dumps the
container's memory via the OCI runtime (CRIU) first and only captures
the rootfs diff and named volumes afterwards. CRIU thaws the container
as soon as the memory dump finishes, so the processes inside the
container continue to run between the memory snapshot and the
file-system capture. As a result, the checkpoint can be inconsistent:
have CRIU images and a file system that reflect different points in time.

To fix this, we freeze the container's cgroup before invoking the OCI
runtime and thaw it again only after the checkpoint image/archive has
been written. The OCI runtime calls CRIU with the freezer cgroup and
restores it to its previous state once the dump completes, so a
container that was already frozen stays frozen across the dump and
the file system is captured at the same instant as the CRIU images.
This mirrors the approach other engines (e.g. CRI-O and containerd).

The default (stopping) checkpoint functionality is not affected by this
issue because CRIU leaves the tasks dead after the dump.

This patch also adds a regression test for the consistency of live
(--leave-running) checkpoints. The container runs a workload that
keeps an in-memory counter in sync with a value written to a file
on its root file system, maintaining the invariant that the on-disk
value never gets ahead of the in-memory counter.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2026-06-23 13:30:32 +01:00
Jiwoo Ahn
fb8a272fe3 kube: alias OCI runtime annotations without underscores
Fixes: #26871
Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
2026-06-23 19:24:53 +09:00
Paul Holzinger
4ae189843b Merge pull request #28637 from ValentinTorassa/manifest-push-retry-options
Add --retry support to manifest push
2026-06-23 12:00:03 +02:00
Paul Holzinger
061ea2fca5 Merge pull request #28391 from kyounghoonJang/feat/add-rm-ignore
feat: add --ignore flag to network rm
2026-06-23 11:24:38 +02:00
KyounghoonJang
9e38f86993 feat: add --ignore flag to network rm
Add `--ignore` to `podman network rm` so removing a missing
network returns success instead of exit code 1.

Keep existing error behavior for networks in use and other failures.

This commit message was translated from Korean to English using an LLM.

Fixes: #28363
Signed-off-by: KyounghoonJang <matkimchi_@naver.com>
2026-06-23 10:52:47 +09:00
Valen Torassa
72349937e3 Add --retry support to podman manifest push
This patch adds retry plumbing for podman manifest push.

CLI flags added: --retry and --retry-delay
Flags are read into ImagePushOptions and passed through the local ABI path
Remote clients and REST API now respect retry settings (retry / retryDelay)
retry-delay is parsed with time.ParseDuration
Defaults fall back to containers.conf when the flags are not set
Updated manpages, Swagger comments, and e2e tests to validate retry behavior

Fixes: #28590

Signed-off-by: Valen Torassa <valentintorassacolombero@gmail.com>
2026-06-22 15:49:27 -03:00
Paul Holzinger
3ca1e691b9 test/e2e: remove LineInOutputStartsWith
It is unused and I do not see why we would need this. It is almost
always better to use actual gomega matchers instead of just matching
true/false for the better error messages.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 20:08:36 +02:00
Paul Holzinger
783cd30577 test/e2e: remove ErrorGrepString
There is no user for this and using the gomega matcher
ContainSubstring() or MatchRegexp() seems much better.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 20:08:36 +02:00
Paul Holzinger
a523791b27 test/e2e: remove WaitForContainer
For most callers podman run -d already makes sure the container runs so
this does nothing and only slows the test down.

For the signal test we can instead check for container output which is
better as we know the pid1 is actually ready to get the signal.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 20:08:36 +02:00
Paul Holzinger
88c0167a3f test/e2e: remove PodmanAsUser
We do not use this anywhere to run as a different uid. In fact it should
not be supported as it would run without a proper systemd session for
example.

Because we run the test suite as root and a rootless user in CI there is
no need for a specific test to run podman as a different user here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 20:08:36 +02:00
Paul Holzinger
d3e3b2f48b test/e2e: remove SkipIfNetavarkVersionLessThan
We hard require netavark v2 to run with podman 6, as such it makes
little sense to guard just a specific set of tests.

Remove the helper to remove some code and skip the podman info call to
also speed it up a bit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 20:08:36 +02:00
Paul Holzinger
6c431b73db fix image host env leak
When parsing image envs we need to be strict about the format, only the
"key=value" format must be accepted. Just keys must be rejected as they
are not valid according to the image spec.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-22 18:39:07 +02:00
Paul Holzinger
eb3c0f4c1a Merge pull request #28957 from shuaiyuanxx/exec-honor-console-size
exec: honor ConsoleSize so the terminal is sized at creation
2026-06-22 16:30:13 +02:00
Nicola Sella
10cc702250 quadlet API: fix tar install when non-quadlet file sorts first
QuadletInstall expects the quadlet file to be first in the file list,
The API handler passes files in filepath.Walk order (lexicographic).
Install would fail if a file like "Containerfile" comes before the
quadlet file.

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-06-22 14:30:34 +02:00
Mario Loriedo
a34c29320a Merge pull request #28990 from Luap99/flakes
some flake fixes
2026-06-22 10:44:26 +02:00
Shuai Yuan
f5efef5043 exec: honor ConsoleSize so the terminal is sized at creation
The exec API accepts a ConsoleSize but it is dropped: the exec
pseudo-terminal is created at its default size and only corrected
afterwards by an asynchronous resize. A short-lived exec that reads its
window size at startup (e.g. `stty size`) can therefore observe the wrong
size, because the resize may arrive after the process has already read it.
docker applies the size at creation.

Carry the requested ConsoleSize through ExecConfig and into the exec OCI
process spec (process.consoleSize) so the runtime sizes the terminal
before the process starts, removing the race. The local and remote CLIs
capture the caller's terminal size when -t is given and pass it through
ExecOptions, matching the behavior of `podman run`.

Re-enable the previously flaky `podman exec` case in the interactive
system test, which this change makes deterministic.

Signed-off-by: Shuai Yuan <shuaiyuanzju@gmail.com>
2026-06-22 10:36:10 +08:00
Danish Prakash
249df98dba Merge pull request #28969 from guillermodotn/main
kube: fix quantityToInt64 dropping scale for fractional BinarySI
2026-06-20 00:14:11 +05:30
Paul Holzinger
6bb83a5174 test/system: fix "we want at least one failure from podman-rm" flake
I have seen a few failures where the test fails without seeing podman rm
fail as the container was already stopped by the time we rm got called.
Bump the timeout a bit to make this less likely to happen again but not
to long as the test would take always that long otherwise.

Test log:
[15:29:08.277631195] # /var/tmp/podman/bin/podman-remote --url=unix:///tmp/bats-run-opRNXi/suite/remotesystem.podman.UvxVxO.sock run -d --name c-t108-d2t7i8rm --health-cmd /bin/false --health-interval 1s --health-retries 2 --health-timeout 1s --health-on-failure=stop --stop-timeout=2 --health-start-period 0 --stop-signal SIGTERM quay.io/libpod/testimage:20241011 sleep infinity
[15:29:09.088765794] 8946226536faa90d28dfa199e8da8fbb8040d1348a6f9142f95f3ba26f6cb2cf
[15:29:09.099141334] # /var/tmp/podman/bin/podman-remote --url=unix:///tmp/bats-run-opRNXi/suite/remotesystem.podman.UvxVxO.sock inspect --format {{.State.Pid}} c-t108-d2t7i8rm
[15:29:09.664964649] 142589

[15:29:09.678215064] # /var/tmp/podman/bin/podman-remote --url=unix:///tmp/bats-run-opRNXi/suite/remotesystem.podman.UvxVxO.sock rm c-t108-d2t7i8rm
[15:29:15.072982751] c-t108-d2t7i8rm

[15:29:15.083236575] # /var/tmp/podman/bin/podman-remote --url=unix:///tmp/bats-run-opRNXi/suite/remotesystem.podman.UvxVxO.sock container exists c-t108-d2t7i8rm
[15:29:15.193476069] [ rc=1 (expected) ]

[15:29:15.203781723] # /var/tmp/podman/bin/podman-remote --url=unix:///tmp/bats-run-opRNXi/suite/remotesystem.podman.UvxVxO.sock container exists 8946226536faa90d28dfa199e8da8fbb8040d1348a6f9142f95f3ba26f6cb2cf
[15:29:15.234141517] [ rc=1 (expected) ]
    FAIL: we want at least one failure from podman-rm
expected: -gt 0
  actual:     0

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-19 17:51:49 +02:00
renovate[bot]
cecb1731de Update dependency pytest to v9.1.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-19 14:56:18 +00:00
guillermodotn
5401c2d51f kube: fix quantityToInt64 dropping scale for fractional BinarySI
Signed-off-by: guillermodotn <guillerm0.n@outlook.es>
2026-06-19 15:56:21 +02:00
Matt Heon
df12c9806c Merge pull request #28214 from MayorFaj/feat/28189-volume-rename
feat: implement volume rename functionality
2026-06-18 14:47:35 -04:00
Matt Heon
20e3bf634b Merge pull request #28951 from MayorFaj/feat/quadlet-image-volume
add support for ImageVolume option in Podman Quadlet
2026-06-18 11:15:53 -04:00
Jan Rodák
0aa4381e43 Add quick-reference table and destructive-test warning
Add a warning that tests wipe local container state,
a quick-reference table of make targets,
and examples for running specific integration, machine,
system, and unit tests.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-06-17 10:02:24 +02:00
MayorFaj
c6e5eb5553 Add support for ImageVolume option in Podman Quadlet
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-06-17 07:19:07 +01:00