Commit Graph

2077 Commits

Author SHA1 Message Date
Jan Rodák
3f427f4535 Skip pasta forwarder tests pending passt SELinux fix
The pasta_t SELinux domain is denied { create } for pasta.sock
on ifconfig_var_run_t directories. Disable all pasta forwarder
tests (BATS + e2e) until a new passt release ships the fix.

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-05-25 12:31:26 +02:00
Jan Rodák
e598657244 Add pasta-based port forwarding for rootless bridge networks
Add rootless_port_forwarder="pasta" option that uses pesto to update
pasta's forwarding table via UNIX socket, preserving source IPs that
rootlessport's userspace proxy masks.

HostIP is stripped from port mappings in the netavark wrapper when
pasta forwarding is active because pesto handles host-side binding
while pasta's splice changes the destination IP that netavark DNAT
expects. Pesto binds both 0.0.0.0 and [::] for dual-stack support.

Fixes: https://redhat.atlassian.net/browse/RUN-2214
Fixes: https://github.com/containers/podman/issues/8193
Fixes: https://redhat.atlassian.net/browse/RUN-3587

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-05-20 14:24:47 +02:00
Paul Holzinger
f33ef6a77f test/system: log socat output in retry loop
This test is currently flaking with the latest pasta update[1]. As part
of debugging this it was hard to see why socat fails 5 times in this
loop as the run function does not log the output so I had to add an echo
here.

[1] https://bugs.passt.top/show_bug.cgi?id=202

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-05-13 14:38:03 +02:00
Paul Holzinger
b55ce72592 Merge pull request #27311 from danishprakash/dual-stack-bind
libpod: replace listen with socket+bind for dual-stack port reservation
2026-05-11 14:06:20 +02:00
Danish Prakash
1a20d82edc libpod: replace listen with socket+bind for dual-stack port reservation
This commit addresses two concerns.

Bind dual stack when hostIP unless it is explicitly specified. Since we
use listen(), this change resulted in blocked connections on stacks
without matching DNAT rules (e.g. connecting to [::1] on an IPv4-only
network) because the TCP handshake on the reservation socket would complete
instead of returning ECONNREFUSED allowing the client to fallback to IPv4.

Replacing listen() with raw socket() and bind() syscalls fixes this by
allowing us to reserve this port without accepting connections; clients
get ECONNREFUSED and fall back to IPv4 automatically, as is desired.

Fixes: https://github.com/containers/netavark/issues/1338

Co-authored-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-05-11 13:21:12 +05:30
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
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
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
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
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
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
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
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
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
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
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
Lokesh Mandvekar
22054b5180 test: Remove slirp4netns-specific test cases
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-04-13 08:22:35 -04:00
Ricardo Branco
2d5f5395c2 test/system: Fix 260-sdnotify being silently skipped
PODMAN_CMD is uninitialized until basic_setup() runs, causing
podman_runtime() to invoke an empty command and fall back to [null].

Call basic_setup() before the runtime check to ensure PODMAN_CMD is
populated before use.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-04-05 16:43:40 +02:00
Himanshu Jaiswal
04935fe867 Add a Status filter to podman quadlet list
Adds --filter status=<value> support to podman quadlet list.
Also adds shell completion for the status filter values.

Signed-off-by: Himanshu Jaiswal <himanshu.bw5@gmail.com>
2026-03-28 12:05:46 +00:00
Ricardo Branco
b77531879b test: relax rootless runc pid namespace assertion
runc may or may not issue a warning here.

https://github.com/opencontainers/runc/issues/4732

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-03-21 21:43:37 +01:00
Miloslav Trmač
85d9999c45 Merge pull request #28194 from Luap99/storage-conf
vendor container-libs with storage.conf rework
2026-03-20 14:03:53 +01:00
Danish Prakash
9565002257 feat: add support for changing default host IPs via containers.conf
Add support for `default_host_ips` in containers.conf to set default
host IP(s) if no IP is set when forwarding ports. Multiple IPs can be
configured, and passing explicit IP with -p will always override
the configured defaults.

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-03-20 13:54:48 +05:30
Paul Holzinger
6be50cbb38 test/system: fix empty default test
We no longer generate a warning for an empty driver in storage.conf so
remove that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-03-19 21:49:20 +01:00
Paul Holzinger
46502be750 Merge pull request #28234 from Honny1/add-format-for-scp
Add `--format` to `podman image scp`
2026-03-19 19:50:16 +01:00
Paul Holzinger
5d7bc4e947 Merge pull request #28323 from giuseppe/detect-stale-pause-process
rootless: detect and remove stale pause.pid with recycled PIDs
2026-03-19 18:33:53 +01:00
Jan Rodák
da3c4aa21a Add --format to image scp
Add --format (oci-archive, docker-archive) to pass through to podman save.
Default is unchanged (no --format) so podman save uses its own default.
Document that scp is not storage-to-storage and only archive formats
are supported.

Fixes: https://github.com/containers/podman/issues/28183
Fixes: https://issues.redhat.com/browse/RUN-4403

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 17:42:33 +01:00
Giuseppe Scrivano
a2db18f35c rootless: detect and remove stale pause.pid with recycled PIDs
When a pause process dies and its PID gets recycled by an unrelated
process, the stale pause.pid file causes join failures.  Detect this
by checking /proc/<pid>/environ for _PODMAN_PAUSE=1 after a failed
join attempt.

Closes: https://github.com/containers/podman/issues/28157

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-03-19 14:46:29 +01:00
Jan Rodák
d887a8146a Fix creating unnamed volumes as anonymous
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 13:40:47 +01:00
Jan Rodák
339acf880c volume prune: match Docker default and add --all
Fixes: https://github.com/containers/podman/issues/24597
Fixes: https://issues.redhat.com/browse/RUN-4404

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-19 13:40:45 +01:00
Matt Heon
5a40e02c81 Merge pull request #27980 from amyssnippet/fix/27977
fix(quadlet): correct replace behavior and prevent duplicates in .app files
2026-03-18 14:24:38 -04:00
Bruce Fan
ffeb0d103b Improve OOMKilled visibility in podman events and in podman inspect docs
Signed-off-by: Bruce Fan <brucexfan@gmail.com>
2026-03-11 10:15:56 -05:00
Matt Heon
aefdaf317d Merge pull request #28170 from StaticRocket/bugfix/quadlet-list
fix(cmd/podman/quadlet): Behave like container ls
2026-03-03 13:03:07 -05:00
Randolph Sapp
33a36bd56b fix(cmd/podman/quadlet): Behave like container ls
Quadlet list always reports the heading, even when using custom
formatting strings. This doesn't follow the behavior of other podman
list commands. Borrow some logic and the "--noheading" flag from the
container list command to make this behavior uniform.

Signed-off-by: Randolph Sapp <rs@ti.com>
2026-03-03 10:04:37 -06:00
Amol Yadav
a38a9b7d20 fix(quadlet): fix race condition, duplicates, and permissions
Signed-off-by: Amol Yadav <amyssnipet@yahoo.com>
2026-03-03 10:01:44 +05:30
Kir Kolyshkin
2ab78a8d82 test/system: fix some teardown error logging
Statement

	for line in "${lines[*]}"

does not make sense since line will be a single value consisting of
all elements of lines array, space-separated.

It should be

	for line in "${lines[@]}"

if we want to iterate through each value.

Fixes: 00292ae1c4 ("systests: test instrumentation")
Fixes: c33ba70f95 ("system tests: instrument, to try to catch unlinkat-ebusy")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-03-02 12:58:27 -08:00
Ricardo Branco
960165b8c5 test/system: fix pod inspect ordering test leak
Add missing cleanup.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-24 22:46:08 +01:00
Ricardo Branco
476ca11994 test: Use yq for yaml2json when available
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-22 11:29:27 +01:00
Ashley Cui
6cabddb091 Merge pull request #28097 from m-horky/mhorky/quadlet-ls
feat(cmd/podman/quadlet): Add 'ls' as 'list' alias
2026-02-16 12:08:22 -05:00
mhorky
901ac1b416 feat(cmd/podman/quadlet): Add 'ls' as 'list' alias
All other commands support 'ls' for itemized listing.

Signed-off-by: mhorky <mhorky@redhat.com>
Assisted-By: Claude Code
2026-02-16 14:02:56 +01:00
Paul Holzinger
0778bdaffe podman info: remove storage.conf path
Given the new config file logic will read many files pritning one
specific one here has no meaning anymore, just delete it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-16 13:47:56 +01:00
Paul Holzinger
89b646d8a3 Merge pull request #27946 from kairosci/fix/27747-artifact-volume-validation
libpod: move artifact volume validation to creation phase
2026-02-12 20:22:32 +01:00
Alessio Attilio
df0e3b6ec7 libpod: validate artifact volume on create
Fixes: #27747
Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
2026-02-12 18:24:16 +01:00
Šimon Brauner
9727a43f5a Added setting UID and GID for volumes in quadlet
Related: https://issues.redhat.com/browse/RHEL-145863

Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
2026-02-11 18:16:30 +01:00
Patrick Wicki
2828965a75 healthcheck_linux: avoid failing transient units
The main purpose of the transient services/timers is to trigger the
healthcheck execution in regular intervals, their own state should
not depend on the result of the healthchecks. This way there are no
failing systemd services unless there is actually a fatal error.

Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
2026-02-09 19:52:29 +01:00