7285 Commits

Author SHA1 Message Date
96abdfdec6 Merge pull request #26977 from jakmeier/fix-quadlet-mount-panic
quadlet: fix runtime error for invalid Mount value
2025-09-05 09:57:43 +00:00
163bdf2df8 quadlet: fix runtime error for invalid Mount value
If the `Mount` option inside a quadlet is missing the source=... part,
the code today panics with the following message.

```
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/containers/podman/v5/pkg/systemd/quadlet.handleStorageSource(0xc000140de0?, 0x1d?, {0x0?, 0x1?}, 0x5634e39e233e?, 0x10?)
...
```

This commit checks for the missing source and returns an error to avoid the panic.

Signed-off-by: Jakob Meier <mail@jakobmeier.ch>
2025-09-04 21:46:01 +02:00
853dd36da3 Update dependency pytest to v8.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 15:56:34 +00:00
faceb67782 test/buildah-bud: enable one skipped test
For podman build --squash is different from the buildah bud --squash
option, in podman it must use --squash-all.

Fixes: #26906

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-03 20:25:12 +02:00
ca19491f91 Merge pull request #26947 from Luap99/system-test-fixes
test/system: some small fixes
2025-09-02 14:21:23 +00:00
9d7a24e654 Merge pull request #26945 from Luap99/vol-opts
do not pass volume options as bind mounts options to runtime
2025-09-02 14:18:15 +00:00
247a80db45 test/system: remove distro-integration bats tag
The distro-integration tag was added for fedora openQA to only run a
subset of tests. However since it was added only a few new tests have
been labelled like that and in general a normal contributor or even
maintianer has no idea when to add this tag.

We also have been seeing several regressions getting into fedora that
these tests would have caught. As such I worked with Adam to enable all
tests for fedora openQA so we actually have proper coverage. This has
been working for a few weeks so I think we can dop these tags so
upstream does not need to bother with them at all.

https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/373

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 12:10:08 +02:00
ee45782079 test/system: fix podman load - from URL
The test pulled a new $IMAGE already because it runs the http server
container. So this doesn't striclty ensure the load works correctly.

Make sure to actually test the load of a different image, so we use
$PODMAN_NONLOCAL_IMAGE_FQN for that like another load test already
does.

I noticed this as the image pull on the webserver start flaked in
a openQA run. Using _prefetch should help to reduce the network pulls
here as it caches the image locally once it is pulled for the first
time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 12:10:08 +02:00
20fb712872 test/system: do not connect to github server
This is an unnecessary network connection that flakes from time to time.
Spawn our own local server instead and use that. That also allows to
check that the actual file content has been copied.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-02 11:51:08 +02:00
428c854be6 Merge pull request #26932 from ogajduse/feature/quadlet-httpproxy-26925
quadlet: add HttpProxy option for Container sections
2025-09-01 16:04:15 +00:00
c65fd9a2c2 quadlet: add HttpProxy option for Container sections
Add support for HttpProxy key in quadlet Container sections to control
proxy environment variable inheritance during image pulls and builds.

- HttpProxy=true enables proxy inheritance (default podman behavior)
- HttpProxy=false disables proxy inheritance
- When omitted, uses podman's default behavior

This addresses the need for declarative proxy configuration in IPv6-only
networks and other scenarios where proxy settings need to be controlled
at the container level without manual workarounds.

Fixes #26925

Signed-off-by: Ondřej Gajdušek <ogajduse@redhat.com>
2025-09-01 13:45:06 +02:00
46d757501a do not pass [no]copy as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the copy/nocopy options are specific to podman when we
mount the volume and are not valid mount options for the runtime.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-01 12:48:43 +02:00
4e2a04dedc do not pass volume-opt as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the volume-opt options are specifc to the volume we create
and should not be passed to the mount in the oci spec.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-01 12:48:43 +02:00
a98154a978 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-01 12:33:04 +02:00
80348a50d0 chore(deps): update module github.com/go-viper/mapstructure/v2 to v2.4.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 09:40:26 +00:00
3effff42eb tests: Get rid of netcat on the host and use Bash's /dev/tcp
The only remaining uses of nc now are in containers.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-08-28 17:43:47 +02:00
b5a0c495c0 Merge pull request #26920 from ricardobranco777/socat
tests: Replace ncat for socat
2025-08-28 14:46:12 +00:00
0ff079d320 tests: Replace ncat for socat
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-08-28 15:38:12 +02:00
cb59650a16 Merge pull request #26891 from winterqt/push-ozksmwkumrrs
fix(libpod): truncate long hostnames to correct maximum length
2025-08-28 12:55:27 +00:00
68b6876481 Merge pull request #26895 from intirix/tcp-close
Add support for criu's tcp-close functionality.
2025-08-28 10:40:59 +00:00
9c3652c188 Add support for criu's tcp-close functionality.
Fixes: #26676
Signed-off-by: Jeff Mercer <jeff.mercer@gmail.com>
2025-08-27 18:52:34 -04:00
e467439ab8 test/e2e: actually start container in startContainer
https://github.com/containers/podman/pull/26891#pullrequestreview-3152061969

Signed-off-by: Winter M <winter@antithesis.com>
2025-08-27 16:14:15 -04:00
835c581c4b Merge pull request #26737 from arsenalzp/podman-26691
Podman wait condition for return of first container
2025-08-27 16:03:29 +00:00
8e59c948df test/buildah-bud: skip new failing test
see #26906

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-26 10:03:57 +02:00
df80fbcab6 test/e2e: remove image diff test skips
This should work with the latest buildah.

Fixes: #26680

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-26 10:03:57 +02:00
2dd3111098 fix(libpod): truncate long hostnames to correct maximum length
Since #24675, we've been truncating hostnames derived from the container name
to 253 characters. However, if a user were to create a container with a long
name and not set a hostname, this would still fail.

Seemingly, the maximum length for hostnames is (and always(?) has been) 64, as
made evident by these headers from various kernel versions:

- https://elixir.bootlin.com/linux/v6.16/source/include/uapi/linux/utsname.h#L15
- https://elixir.bootlin.com/linux/v4.20/source/include/uapi/linux/utsname.h#L15
- https://elixir.bootlin.com/linux/v3.19.8/source/include/uapi/linux/utsname.h#L14

I've confirmed this issue (and fix) on Linux 6.1, but happy to do so on a more
recent kernel as well.

Signed-off-by: Winter M <winter@antithesis.com>
2025-08-22 17:52:00 -04:00
bb18ae6ee3 Merge pull request #26861 from Luap99/network-event
podman events: show network create/remove event with journald
2025-08-19 18:13:31 +00:00
514e686b4c podman events: show network create/remove event with journald
In the journald driver there is a bug where the network event
attributes are not preserved. This causes the network driver to be
missing and that in turn causes the ToHumanReadable() function to print
an empty line. Fix it by making sure we preserve the network driver in
the event attributes.

Fixes: https://issues.redhat.com/browse/RHEL-109790

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-19 18:37:37 +02:00
2c89069fa8 update tests duo to CRUN#1767 to support both values
Signed-off-by: Tim Zhou <tizhou@redhat.com>
2025-08-19 10:43:18 -04:00
cfe4d46d89 Optimize image loading for Podman machines
Add support for loading images directly from machine paths to avoid
unnecessary file transfers when the image archive is already accessible
on the running machine through mounted directories.

Changes include:
- New /libpod/local/images/load API endpoint for direct machine loading
- Machine detection and path mapping functionality
- Fallback in tunnel mode to try optimized loading first

This optimization significantly speeds up image loading operations
when working with remote Podman machines by eliminating redundant
file transfers for already-accessible image archives.

Fixes: https://issues.redhat.com/browse/RUN-3249
Fixes: https://github.com/containers/podman/issues/26321

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-08-19 12:33:15 +02:00
700351a813 test/buildah-bud/run-buildah-bud-tests: loosen the branch regexp
Recognize that pseudoversions that look like
v0.0.0-20250814150820-1f7f1d285d22 are also not real branch names.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-08-14 14:26:47 -04:00
6d54a298c9 chore(deps): update docker.io/library/golang docker tag to v1.25
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 22:10:26 +00:00
6e9ae9fa5a Merge pull request #26808 from ninja-quokka/add_rm_--all_artifact_flag
feat: Add podman artifact remove --all option
2025-08-13 20:10:24 +00:00
f38e32760d feat: Add artifact remove --all option
Prior to this commit `artifact remove --all` was not supported on remote
clients.

This patch adds a new artifact API endpoint `artifact/remove` which can
either take a list of artifacts to remove or remove all artifacts by
setting all=true.

This patch removes the temporary warning message in the tunnel interface
implementation of ArtifactRm if `--all` was passed on the command line
and uses the new `artifact/remove` endpoint.

This patch also updates the `artifact remove` command both remote and
local to accept a list of artifacts to remove rather than limiting to
just one.

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-08-13 23:00:20 +10:00
acb75ca6c1 Merge pull request #26784 from Luap99/buildah-replace-test
test/buildah-bud: fix checkout to also handle go.mod replace
2025-08-12 19:51:23 +00:00
9b62438ede test/buildah-bud: fix checkout to also handle go.mod replace
There is a rather surprising bug in the current test checkout logic. The
go.mod version parsing never actually consider a go.mod replace for
buildah and always read the main version.

This meant a buildah replace actually is testing the old version with
the new code and that means the new tests are not run leading people in
false belive when testing a buildah vendor that it worked. But then
later it fails when doing the proper update without replace.

To fix this first use go list to parse go.mod which is more robust. Then
first check if there is a replace and then use that repo/version
instead.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-08-08 12:42:58 +02:00
930cd25739 Feat: Add log_path support in containers.conf
Added log_path variable in containers/common, User sets default log path in containers.conf under the `[containers]` section.
The directory has to exist beforehand. Container logs go under this directory, sub-directories named with the container id
and inside the sub-directory a ctr.log file will be created where the container logs for the corresponding container will go.
This path can be overridden by using the `--log-opt` flag.

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
2025-08-07 17:04:13 -04:00
a75f74b1d3 Fixes: #26691
Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
2025-08-06 22:34:18 +03:00
08f048066d Merge pull request #26720 from TusharMohapatra07/main
`feat:` add support for label filter with key only
2025-08-04 15:51:20 +00:00
0c4c9e4fbc Merge pull request #26682 from Devashish08/fix-empty-device-mode-error
Fix: Improve error message for empty device modes
2025-08-01 12:33:32 +00:00
b7b7839ad3 compat: remove deprecated VirtualSize
Since compat version 1.43 the VirtualSize field in the
GET /images/{name}/json, GET /images/json, and
GET /system/df responses is deprecated and will no
longer be included in API v1.44. Use the Size field
instead, which contains the same information.

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-08-01 11:46:23 +02:00
0530a564a7 Fix: Improve error message for empty device modes in API requests
- Add specific check for empty device modes in ParseDevice function
- Change error message from 'invalid device mode: ' to 'empty device mode in device specification: <device>'
- Include full device specification in error message for better context
- Add test cases for empty device mode scenarios
- Resolves issue where '/dev/fuse::' provided unhelpful error message

Fixes #26629

Signed-off-by: Devashish08 <devashish.cs025@gmail.com>
2025-07-31 16:24:29 +00:00
0389651436 Merge pull request #26704 from shiavm006/fix-ancestor-filter-docker-compatibility
Fix ancestor filter to support Docker-compatible substring matching
2025-07-31 16:02:51 +00:00
23ebb7d94c feat: add Podman artifact support to Go bindings and remote clients
Add the Go bindings implementation necessary to support Artifacts.
Implement the tunnel interface that consumes the Artifacts Go bindings.

With this patch, users of the Podman remote clients will now be able to
manage OCI artifacts via the Podman CLI and Podman machine.

Jira: https://issues.redhat.com/browse/RUN-2714#

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-08-01 00:10:50 +10:00
0666b4ffbf events: add support for label filter with key only
Fixes: #26702

Signed-off-by: TusharMohapatra07 <tusharmohapatra.gig@gmail.com>
2025-07-31 15:12:17 +05:30
b0e7a2ec9b compat: add shared-size par to GET /images/json
Related: https://issues.redhat.com/browse/RUN-2698

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-07-31 10:17:06 +02:00
b5d18e873f Fix ancestor filter to support Docker-compatible substring matching
- Remove redundant exact match checks in ancestor filter implementations
- Add comprehensive test coverage for both prefix and non-prefix substring matching
- Fix missing output verification in ID filter test
- Improve test reliability with proper length checks and consistent flags
- Remove unnecessary length check to ensure tests fail properly if image ID is too short
- Add -q and --no-trunc flags for consistent test output format
- Focus test on substring ID matching specifically (not image names)
- Restore image name matching functionality for existing tests
- Keep substring ID matching for Docker compatibility
- Ensure both regex matching and substring ID matching work together

The ancestor filter now supports both:
1. Image name matching (existing functionality)
2. Substring ID matching (new Docker compatibility feature)

Fixes: #26623
Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-07-30 23:02:40 +05:30
b97937ecc4 Merge pull request #26276 from inknos/compat-get-images-json-empty-list-repotags
compat: GET /images/json returns [] instead of <none>:<none> in RepoTags and RepoDigest
2025-07-30 16:09:25 +00:00
a9ed97d4cf Merge pull request #26692 from giuseppe/add-certdir-creds-to-podman-create-run
podman: add --creds and --cert-dir to create/run
2025-07-28 20:21:22 +00:00
d4fb80e6ce Merge pull request #26664 from ninja-quokka/improve_--network_path_warning
Improve handling of --publish and incompatible NetNS modes
2025-07-28 14:36:03 +00:00