Commit Graph

7678 Commits

Author SHA1 Message Date
Ashley Cui
462b24479b Use tmp context dir when building with process substitution
Podman defaults to the directory of the Containerfile when no context dir is explicitly provided.
When running podman build with process subsituiton,  `podman build -f <(echo "FROM scratch")`,
the Containerfile path expands to `/dev/fd/<NUM>`, which makes `/dev/fd` the context dir.
When building, Buildah attempts to create an overlay mount on top of the `/dev/fd` context dir, which fails.

In these cases, use a temp context dir instead: `$TMPDIR/podman-build-context-$randnum`

Fixes: https://github.com/containers/podman/issues/28113

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-05-08 10:39:38 -04:00
iTrooz
f4389592f9 test: ensure complex --output values have correct behaviour
Signed-off-by: iTrooz <hey@itrooz.fr>
2026-05-05 14:19:04 +02:00
Tom Sweeney
3ce0e3e17c Merge pull request #28624 from Honny1/labels
`ps`, `pod ps`, `volume ls`: format labels as comma-separated `key=value` for Docker compatibility
2026-04-30 13:37:14 -04:00
Matt Heon
99b2fe252e Merge pull request #28455 from simonbrauner/fix-filtering-with-negated-labels
Fix filtering with negated labels
2026-04-30 12:08:31 -04:00
Jan Rodák
dc4495ec64 volume ls: format labels as comma-separated key=value strings
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-04-30 18:05:06 +02:00
Jan Rodák
f460bc0ae5 ps: format labels as comma separated key=value for Docker compatibility
Fixes: https://github.com/containers/podman/issues/21847

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-04-30 18:04:49 +02:00
Mario Loriedo
15c9ca130f Add command podman system hyperv-prep
Introducing a new `podmand system` subcommand to prepare a Windows host
to run Hyper-V based Podman machines: `hyperv-prep`.

When executed it:
- creates of the registry keys for VSocks
- adds the current user to the Hyper-V administrators group

This command requires an administrator terminal.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-04-29 23:00:29 +02:00
Paul Holzinger
3e9fb8b411 Merge pull request #28603 from Luap99/test-rootfs
test/system: fix quadlet - rootfs on kernel 7.1
2026-04-29 19:33:07 +02:00
Šimon Brauner
fdd8cc17fa Fix filtering with negated labels
Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-04-29 11:18:03 +02:00
Paul Holzinger
12d40777f0 test/system: fix quadlet - rootfs on kernel 7.1
As found in fedora openQA testing on the kernel update this test fails
due a selinux denial.

The kernel now correctly checks the backing fs selinux context in all
cases. See kernel commit 82544d36b172 (selinux: fix overlayfs mmap()
and mprotect() access checks).

The test tries to access another container so the selinux level will
be different from the quadlet roofs container and therefore fail to
access the files.

To fix this we should be able to just use the regular image mount which
has a level all containers can access. The comment that this is not
parallel safe is untrue, mounts are reference counted so this should not
get unmounted all of the sudden by another test.

In fact we have another  --rootfs test case where we do this and it
passed in openQA, see "podman run - check workdir".

Fixes: #28602

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-28 21:09:05 +02:00
Lokesh Mandvekar
991cde5167 Merge pull request #28594 from containers/renovate/openapi-schema-validator-0.x
Update dependency openapi-schema-validator to ~=0.9.0
2026-04-28 14:54:05 -04:00
Matt Heon
3bd7bbc0dc Merge pull request #28413 from simonbrauner/issue-26786
Use AND to combine different volume filter keys
2026-04-28 13:59:42 -04:00
Ashley Cui
bb02e49080 Adjust error messages for new netavark create
c/common uses the new netavark create command, so some of the error messages have slightly changed. Adjust the tests so they pass.

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-04-28 12:43:48 -04:00
Paul Holzinger
241e59b9af Merge pull request #28494 from agp8x/fix/keep-pod-hostname
keep pod hostname when a container is stopped
2026-04-28 17:52:39 +02:00
Giuseppe Scrivano
b25a1ec50b Merge pull request #28597 from Luap99/checkpoint
test/e2e: fix broken checkpoint tests
2026-04-28 16:26:17 +02:00
Paul Holzinger
50bf7db0d9 test/e2e: fix broken checkpoint tests
On main these tests fail right now due the parallel merge of commit
d01cd46830 ("test: remove outdated checkpoint skip") and commit
1b99ae56b0 ("New images 2026-04-24").

The new crun and/or criu versions in the CI images changed the error
message so adapt to that.

The new full error is:
Error: crun: (00.054135) Error (criu/cgroup.c:1998): cg: cgroupd: recv req error: No such file or directory: OCI runtime attempted to invoke a command that was not found

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-28 15:27:02 +02:00
Paul Holzinger
c1d4e1491a test/e2e: port some checkpoint tests to PodmanExitCleanly
Also remove one podman rm -t0 -fa call, the test cleanup does it already
so no need to do it twice.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-28 15:27:02 +02:00
Paul Holzinger
2605275eac Merge pull request #28555 from lsm5/tmt-revdep-podman-next
Packit: Fixes for tmt-revdeps test
2026-04-28 13:51:13 +02:00
renovate[bot]
455367165c Update dependency openapi-schema-validator to ~=0.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-27 18:58:39 +00:00
Lokesh Mandvekar
61792bd9cd TMT: Remove test/tmt/tmt.fmf
Test fetched from upstream. No need to have it here.

Signed-off-by: Lokesh Mandvekar <lsm5@linux.com>
2026-04-27 12:57:48 -04:00
Paul Holzinger
bd86edcbe1 Merge pull request #28591 from Luap99/vendor
update container-libs vendor and re-enable module command line completion test
2026-04-27 18:12:56 +02:00
Jan Rodák
30f93025ab Merge pull request #28556 from Luap99/checkpoint-skip
test: remove outdated checkpoint skip
2026-04-27 15:02:20 +02:00
Paul Holzinger
f493ef0734 test/system: re-enable module command line completion test
The paths are no exported again in the latest common changes from
 https://github.com/containers/container-libs/pull/790

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-27 12:54:05 +02:00
Clemens Klug
24130e2a0c keep pod hostname when a container is stopped
When a container in a pod is stopped, its container name is removed from /etc/hosts. etchosts.Remove() filters for any entry matching the container name or the pod hostname. A pod with additional host entries like --add-host FQDN;pod-hostname:127.0.0.1 is affected by this deletion, too.

Only the container name needs to be removed when a container is stopped.

Signed-off-by: Clemens Klug <git@agp8x.org>
2026-04-24 10:20:43 +00:00
Paul Holzinger
d01cd46830 test/system: skip podman checkpoint --export, with volumes on aarch64
It fails due some selinux problem, #28576.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 20:48:55 +02:00
Paul Holzinger
46aa8b83a4 test: remove outdated checkpoint skip
This should work again with the latest VM images.

Fixes: #26289

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 20:44:06 +02:00
Paul Holzinger
56a24d5183 fix container inspect output to not escape html chars
The default std json behavior is to escape &, < and >. Because we print
to the terminal we do not want escapes and rather the real chars.

That is what PrintGenericJSON() does but because we have custom
MarshalJSON() overwrite on the type which called json.Marshal() this
option was not carried into that. The inner type must not escape it.

This is not a problem in the other direction because the outer
json.Marshal call will still escape the chars returned from the inner
MarshalJSON() result if needed.

Fixes: #28560

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 20:12:14 +02:00
Matt Heon
cc2e2c94b8 Merge pull request #27929 from kairosci/fix/27786-health-field-containers-json
compat: Add Health field to /containers/json endpoint
2026-04-23 11:39:08 -04:00
Paul Holzinger
2c2ff559bd Merge pull request #28554 from Luap99/registries-v2
move old registries.conf v1 files to v2
2026-04-23 15:55:43 +02:00
Paul Holzinger
bf76b9133f move old registries.conf v1 files to v2
The v1 syntax is no longer accepted.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 13:19:04 +02:00
Paul Holzinger
f2994dc695 move the python API tests to the cache registry
First remove the old v1 registries.conf the test was using and then make
it correctly load the cache registry for CI. This needs some minor test
fixes to make it work again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-23 13:18:13 +02:00
Alessio Attilio
c4a4c7e117 API: Add Health field to compat ListContainers and restrict to v1.52+
Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
2026-04-23 08:39:43 +00:00
Nabil Houidi
d44655537e fix: ensure infra image is set from infra container spec in PodConfigToSpec
fixes #21609

Signed-off-by: Nabil Houidi <35373676+NabilHouidi@users.noreply.github.com>
2026-04-22 23:47:00 +02:00
Brent Baude
2cc3be7332 RUN-4539: Change podman module paths
The podman module paths are moving from github.com/containers/podman to
go.podman.io/podman.  This will help with future mobility.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-04-22 14:02:25 -05:00
Brent Baude
2e6f29a2df RUN-4538: Fix buildah vendoring
This PR reflects the upstream change of moving the buildah module from
github.com/containers/buildah to go.podman.io/buildah.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-04-21 14:27:58 -05:00
Paul Holzinger
ff6fb6eb2d Merge pull request #28508 from jankaluza/configfile
trust: switch policy.json lookup to configfile
2026-04-21 12:04:43 +02:00
Jan Kaluza
54d61c2f02 trust: switch policy.json lookup to configfile
Use shared configfile instead of custom policy.json path handling.
This updates ocipull to rely on signature.DefaultPolicy(), removes
explicit SignaturePolicyPath, and replaces trust's custom default-policy
path logic with common configfile code.

Replace hidden `--policypath` with --signature-policy` and require
it for `trust set` command instead of path resolution based on
configfile.

For `trust get`, the `--signature-policy` is optional.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2026-04-20 15:11:22 +02:00
Jan Rodák
ecf493dea0 Fix Docker compat /wait hanging on fast-exiting containers
The Docker client (docker run) sends /wait then /start, but it only
sends /start after receiving the 200 OK response from /wait. Previously,
the event subscription for the "died" event was set up after the 200 was
sent, creating a window where a fast-exiting container (e.g. hello-world)
could emit its "died" event before the subscription was ready, causing
the client to hang forever.

Fix this by subscribing to "died" events before flushing the 200 status
code. This guarantees the event listener is ready before the client can
send /start, eliminating the race entirely.

Fixes: https://github.com/containers/podman/issues/28514

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-04-20 15:01:42 +02:00
Paul Holzinger
34a4633d5f Merge pull request #28275 from mheon/ordered_networks
Move to deterministic network setup order
2026-04-20 12:33:13 +02:00
Jan Rodák
7534429ade Merge pull request #28524 from Luap99/isolate
remove isolate option from docker compat API
2026-04-20 10:03:27 +02:00
Matthew Heon
5e94c95ad0 Move to deterministic network setup order
This was implemented by containers/netavark #1369; this commit
completes the process by wiring it into Podman. We now respect
the CLI order for configured networks - if a user passes
`--net net1,net2` we guarantee that net1 will be configured
before net2.

For containers created before this patch, we don't retain enough
information to configure networks in CLI order, so we use
alphabetical order instead to still guarantee consistency.

No breaking API changes have been made, but we do add a new
field to supplement the existing map to (optionally) provide
ordering information. The Podman CLI will always pass this.
Existing applications that do not will, again, receive]
deterministic ordering based on an alphabetical sort of network
names.

This requires the latest version of Netavark to work properly.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2026-04-17 10:00:32 -04:00
Nicola Sella
d92cc360f1 Add Pod to quadlet list
Fixes: https://redhat.atlassian.net/browse/RUN-3835

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-04-17 13:42:16 +02:00
Paul Holzinger
41b785af5e remove isolate option from docker compat API
With netavark v2 we start to default to strict isolation mode in
netavark[1] as such that already matches the docker behavior.

Therefore no longer hard code the isolate option in the compat api.

Podman v6 is requires netavark v2 for other changes already so we do
not need to worry about podman 6 + older netavark here.

[1] https://github.com/containers/netavark/pull/1438

Fixes: #27349

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-04-16 15:56:44 +02:00
Paul Holzinger
e4776a2dc6 Merge pull request #28498 from Honny1/hc-transient-store
Fix healthcheck failing silently with `--transient-store`
2026-04-15 19:13:19 +02:00
Paul Holzinger
ea4a7f9b65 Merge pull request #28454 from aadi58002/main
fix(#28429): OCIRuntime field in SpecGenerator is ignored when called through HTTP Rest API
2026-04-15 14:33:24 +02:00
Jan Rodák
9598b30ac2 Fix healthcheck failing silently with --transient-store
The systemd timer created for health checks did not pass global
podman flags to the subprocess, causing it to use default storage
settings instead of matching the parent process. This is most
visible with --transient-store, where the healthcheck looks up
the container in the default store instead of the volatile one.

Extract GlobalPodmanArgs() from CreateExitCommandArgs so both the
exit command and healthcheck timer share the same set of global
flags (--root, --runroot, --transient-store, --storage-driver, etc.).

Fixes: https://github.com/containers/podman/issues/28483

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-04-14 14:13:20 +02:00
aadi58002
698c483b7c fix: Ensure OCIRuntime Field is not ignored with HTTP Rest Api (#28454)
Signed-off-by: aadi58002 <aadi58002@gmail.com>
2026-04-14 13:48:11 +05:30
Ygal Blum
8059539425 Quadlet - Support empty source for Mount key
Fixes: #28497

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2026-04-13 17:28:33 -04:00
Paul Holzinger
05ff49a103 Merge pull request #27828 from lsm5/podman6-no-slirp-new
Podman6: Remove slirp
2026-04-13 19:24:28 +02:00
Paul Holzinger
c747adfa48 Merge pull request #28486 from Luap99/vendor-tools
test/tools: update swagger and crypto
2026-04-13 17:06:25 +02:00