Commit graph

7499 commits

Author SHA1 Message Date
Rajkaran
2f9f412822
Merge branch 'podman-container-tools:main' into fix-swagger-artifact-annotations 2026-07-28 16:38:34 +05:30
Rajkaran Yadav
7018130ef8 swagger: rename artifact annotation field"
Signed-off-by: Rajkaran Yadav <yadavrajkaran854@gmail.com>
2026-07-28 16:15:35 +05:30
Paul Holzinger
8abafe40fc
Merge pull request #29228 from ashley-cui/is-automated
Some checks are pending
ci / sys local root fedora-prior (push) Blocked by required conditions
ci / int local rootless fedora-prior (push) Blocked by required conditions
ci / sys local rootless fedora-prior (push) Blocked by required conditions
ci / int remote root fedora-prior (push) Blocked by required conditions
ci / sys remote root fedora-prior (push) Blocked by required conditions
ci / int local root fedora-rawhide (push) Blocked by required conditions
ci / sys local root fedora-rawhide (push) Blocked by required conditions
ci / int local rootless fedora-rawhide (push) Blocked by required conditions
ci / sys local rootless fedora-rawhide (push) Blocked by required conditions
ci / int remote root fedora-rawhide (push) Blocked by required conditions
ci / sys remote root fedora-rawhide (push) Blocked by required conditions
ci / apiv2 root fedora-current (push) Blocked by required conditions
ci / bindings root fedora-current (push) Blocked by required conditions
ci / compose_v2 root fedora-current (push) Blocked by required conditions
ci / docker_py root fedora-current (push) Blocked by required conditions
ci / unit root fedora-current (push) Blocked by required conditions
ci / apiv2 rootless fedora-current (push) Blocked by required conditions
ci / compose_v2 rootless fedora-current (push) Blocked by required conditions
ci / unit rootless fedora-current (push) Blocked by required conditions
ci / upgrade v5.3.1 root fedora-current (push) Blocked by required conditions
ci / upgrade v5.6.2 root fedora-current (push) Blocked by required conditions
ci / machine linux amd64 (push) Blocked by required conditions
ci / windows unit (push) Blocked by required conditions
ci / windows e2e (push) Blocked by required conditions
ci / windows machine hyperv (push) Blocked by required conditions
ci / windows machine wsl (push) Blocked by required conditions
ci / macos machine applehv (push) Blocked by required conditions
ci / macos machine libkrun (push) Blocked by required conditions
ci / Total Success (push) Blocked by required conditions
zizmor: GitHub Actions Security Analysis / Zizmor (push) Waiting to run
Docker compat v1.45 : deprecate is-automated field
2026-07-28 12:39:25 +02:00
Ashley Cui
59af9c81e5 Docker compat v1.45 : deprecate is-automated field
searching for is-automated=true will yield no results, while is-automated=false will be a no-op

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-07-24 14:46:48 -04:00
Paul Holzinger
cc8c07d72b
Merge pull request #29230 from i-OmSharma/fix-kube-generate-selinux-note
fix(kube): gate SELinux volume warning note on host SELinux state
2026-07-24 14:07:32 +02:00
i-OmSharma
cfd3a3f7ba
kube generate: gate SELinux volume NOTE on host state and rootless
The SELinux volume-permissions NOTE only applies to unprivileged,
rootless containers on an SELinux-enabled host. Emit it only when
both conditions hold, instead of on every volume-bearing object.

Add an e2e case generating from a standalone container with a volume,
asserting the NOTE appears only when rootless and SELinux is enabled.

Fixes: #17743
Signed-off-by: i-OmSharma <sharmaom1201@gmail.com>
2026-07-22 14:21:01 +05:30
Danish Prakash
e121ed6264
Merge pull request #28687 from jaitjacob/add-podman-machine-restart-command
Add `podman machine restart` subcommand
2026-07-22 09:53:10 +05:30
Jait Jacob
eb26516dba
make return explicit so CleanIfErr runs as expectd
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
2026-07-21 23:30:29 +05:30
zjuzhongwen
2c8a7acbeb chore: fix some comments to improve readability
Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
2026-07-19 22:18:33 +08:00
Paul Holzinger
c7444c9d5a
Merge pull request #29115 from l0rd/wsl-host-containers-internal-test
Add a machine e2e test to test connection to `host.containers.internal`
2026-07-17 11:52:20 +02:00
Jait Jacob
2ad3a79631
Add podman machine restart subcommand
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
2026-07-16 21:51:11 +05:30
Mario Loriedo
452c40a1b6 Add machine e2e test for host.containers.internal
Add one more test to the basic podman commands e2e tests:
- starts an HTTP server on the host
- verify HTTP requests from a container, using
`host.containers.internal` or `host.docker.internal`, are routed
successfully to the server running on the host

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>

test

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-07-16 14:33:18 +02:00
Jan Rodák
bb4695870e
Merge pull request #28984 from stefan8/test/apiv2-manifest-create-images-query
test: add apiv2 coverage for the manifest-create images query param
2026-07-15 13:10:40 +02:00
Mario Loriedo
48f21de496 Fixing machine e2e gvproxy test
The lookup for the gvproxy process was broken on Windows:
- We looked for gvproxy, not gvproxy.exe, and `tasklist` was always
failing
- But `pgrep` wasn't failing because we looked for the wrong `tasklist`
error message (the correct error message on my laptop is "INFO: No tasks
are running which match the specified criteria.")
- WSL uses win-sshproxy.exe, not gvproxy.exe

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-07-15 11:42:11 +02:00
Brent Baude
f954cf86aa
Merge pull request #29161 from l0rd/fix-wsl-init-in-case-of-err
Always unprovision if the WSL machine init fail
2026-07-13 10:00:11 -05:00
Miloslav Trmač
3fc3288714
Merge pull request #29098 from ROKUMATE/test-pkg-specgenutilexternal
pkg/specgenutilexternal: add tests for FindMountType
2026-07-13 15:41:52 +02:00
Mario Loriedo
d20b363e02 Always unprovision if the WSL machine init fail
Remove the just provisioned WSL distribution if one of the post install
scripts fail.

Fixes #27036

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-07-13 14:07:17 +02:00
Miloslav Trmač
9db0119d00
Merge pull request #28787 from simek-m/docker-api-144-deprecations
Some checks are pending
ci / sys local root fedora-prior (push) Blocked by required conditions
ci / int local rootless fedora-prior (push) Blocked by required conditions
ci / sys local rootless fedora-prior (push) Blocked by required conditions
ci / int remote root fedora-prior (push) Blocked by required conditions
ci / sys remote root fedora-prior (push) Blocked by required conditions
ci / int local root fedora-rawhide (push) Blocked by required conditions
ci / sys local root fedora-rawhide (push) Blocked by required conditions
ci / int local rootless fedora-rawhide (push) Blocked by required conditions
ci / sys local rootless fedora-rawhide (push) Blocked by required conditions
ci / int remote root fedora-rawhide (push) Blocked by required conditions
ci / sys remote root fedora-rawhide (push) Blocked by required conditions
ci / apiv2 root fedora-current (push) Blocked by required conditions
ci / bindings root fedora-current (push) Blocked by required conditions
ci / compose_v2 root fedora-current (push) Blocked by required conditions
ci / docker_py root fedora-current (push) Blocked by required conditions
ci / unit root fedora-current (push) Blocked by required conditions
ci / apiv2 rootless fedora-current (push) Blocked by required conditions
ci / compose_v2 rootless fedora-current (push) Blocked by required conditions
ci / unit rootless fedora-current (push) Blocked by required conditions
ci / upgrade v5.3.1 root fedora-current (push) Blocked by required conditions
ci / upgrade v5.6.2 root fedora-current (push) Blocked by required conditions
ci / machine linux amd64 (push) Blocked by required conditions
ci / windows unit (push) Blocked by required conditions
ci / windows e2e (push) Blocked by required conditions
ci / windows machine hyperv (push) Blocked by required conditions
ci / windows machine wsl (push) Blocked by required conditions
ci / macos machine applehv (push) Blocked by required conditions
ci / macos machine libkrun (push) Blocked by required conditions
ci / Total Success (push) Blocked by required conditions
zizmor: GitHub Actions Security Analysis / Zizmor (push) Waiting to run
compat: Implement deprecations from Docker API v1.44
2026-07-08 18:43:53 +02:00
Marek Simek
463b0b9829
api: Deprecate fields Container and ContainerConfig from GET /images/{name}/json
The Docker API deprecates Container and ContainerConfig fields in
the GET /images/{name}/json response are deprecated and
they will no longer be included in API v1.45.

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Marek Simek
612c7b71b4
api: Deprecate response fields from GET /containers/{id}/json
The Docker API 1.44 deprecates the fields HairpinMode, LinkLocalIPv6Address,
LinkLocalIPv6PrefixLen, SecondaryIPAddresses, SecondaryIPv6Addresses available in
NetworkSettings when calling GET /containers/{id}/json and will be removed in a future release.
You should instead look for the default network in NetworkSettings.Networks.

The fields are removed in 1.52. Version gate SecondaryIPAddresses, SecondaryIPv6Addresses
in the handler and update test. HairpinMode, LinkLocalIPv6Address, LinkLocalIPv6PrefixLen
are not returned by the compat endpoint as the response is serialized
to the moby/moby/api structure missing these fields.

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Marek Simek
f4925bae8c
api: Deprecate is-automated filter and field in GET /images/search endpoint
The Docker API in version 1.44 deprecates the is_automated field for
the GET /images/search endpoint. The is_automated field has been deprecated
by Docker Hub's search API. Consequently, searching for is-automated=true
will yield no results.

The Docker API in version 1.44 deprecates the is_automated field
in the GET /images/search response and will always be set to false in the
future because Docker Hub is deprecating the is_automated field in its search API.

Return struct moby/api for the compat endpoint that matches the Docker
API response format and deprecates is_automated.

Update test_v2_0_0_image.py::ImageTestCase::test_search_compat
to verify returned format and fix subtests not being asserted (remove mp).

Fixes: https://redhat.atlassian.net/browse/RUN-3323

Signed-off-by: Marek Simek <msimek@redhat.com>
2026-07-08 17:31:02 +02:00
Danish Prakash
490486e727
Merge pull request #28953 from ROKUMATE/test-pkg-namespaces
pkg/namespaces: add tests for UsernsMode and NetworkMode
2026-07-08 20:56:14 +05:30
ROKUMATE
7c52018262 pkg/specgenutilexternal: add tests for FindMountType
Fixes: #29097
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-07-08 17:46:55 +05:30
Mario Loriedo
bec840d716 Fix lookup of HyperV VMs with matching name
Fixes https://github.com/podman-container-tools/podman/issues/29138

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-07-07 23:40:18 +02:00
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
Brent Baude
9ac9834a50
Merge pull request #29100 from afbjorklund/machine-cache
Restore caching of the default machine image
2026-07-02 10:05:27 -05:00
Brent Baude
4d5435f47e
Merge pull request #29103 from Luap99/wsl-config-mount
machine/wsl: fix config mount logic
2026-07-02 10:05:04 -05: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
Paul Holzinger
114bb1efa7
machine/wsl: fix config mount logic
The current systemd service to mount /etc/containers is not working
right. The Before=podman.socket causes a ordering conflict which causes
the socket to be disabled and thus all podman remote connections fail.

The problem is the unit is wanted by the default.target while the socket
is wanted by sockets.target which can be before the default.target is
triggered. That means that the Before= line cannot be fulfilled and
sometimes systemd thus seems to not start the socket. It is unclear to
me why this is racy as it is sometimes also works.

This was reported by Vladimir Lazar from the PD team, our CI did not
caught this as we use rootless machines by default and the problem only
happens for the rootful socket so we do not see connection failures.
To fix this add at least one rootful socket check.

We do however have a different CI flake that was also caused by the
incorrect mount dependencies. The mount could happen after sshd or other
programs run. So to fix this we must hook the podman-mnt-config.service
into the local-fs.target which runs much earlier and is used for all the
mounts.

Fixes: #29003

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-07-02 14:01:43 +02:00
Anders F Björklund
d4a1efbe9b Restore caching of the default machine image
It was removed, with the hardcoded image reference.

So cache was always off, even for the default image.

Fixes: #29090

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2026-07-01 18:09:21 +02:00
ROKUMATE
3d9e8fd2d3 pkg/domain: return an error instead of nil on remote event parse failure
In remote mode `podman events --format json` could print the literal "null"
instead of an event object. The remote client converts each event received
from the server with ConvertToLibpodEvent, which returned nil when it could
not parse the server result (an unknown status or type, or an invalid
containerExitCode). The tunnel forwarded that nil as an event with no error
set, so the CLI marshalled a nil event and printed "null".

Return a descriptive error from ConvertToLibpodEvent and send it on the event
channel, which the CLI already handles, instead of forwarding a nil event.

Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-06-30 18:13:20 +05:30
ROKUMATE
39df8813f4 pkg/namespaces: add tests for UsernsMode and NetworkMode
Fixes: #28952
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-06-30 16:50:07 +05:30
ROKUMATE
a535016f97 pkg/namespaces: fix NetworkMode IsNS and IsUserDefined
NetworkMode.IsNS matched any value starting with "ns" (e.g. a network named "nsproxy"), unlike UsernsMode.IsNS which requires the "ns:" prefix; require it. IsUserDefined also did not exclude pod, so a pod network was reported as user-defined; exclude it.

Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-06-30 16:50:07 +05:30
Paul Holzinger
838fc24d3e
machine: simplify ssh debug output logging
When the command output is logged we do not need an extra pipe and
scanner to read the output line by line, we can just log it directly via
a writer.

Now this of course does loose the line by line parsing of the scanner
but IMO this is better as it is simpler and less code to worry about.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-30 10:32:32 +02:00
Paul Holzinger
278068ef18
fix some missing scanner error checks
Found by scannererr:
https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/scannererr

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-30 10:32:32 +02:00
Paul Holzinger
4cbae8b6a7
Merge pull request #28991 from l0rd/fix-machine-start-signal-handling
Fix signal handling during machine start on macOS
2026-06-29 18:50:09 +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
a91d487db7
Merge pull request #29063 from l0rd/fix-machine-init-when-wsl-isnt-installed
Fix machine init when WSL isn't installed
2026-06-29 12:15:43 +02:00
Grzegorz Szczepanczyk
11daf5068a test/apiv2: cover the manifest-create images query param
The libpod manifest-create endpoint takes an "images" query parameter that
fills the new list at creation time, but 15-manifest.at never tested it.
Add cases that create a list with images= on both the v4
(/manifests/{name}, 201) and v3 (/manifests/create, 200) endpoints and
check the image ends up in the list.

Also drop the stale "required: true" from the images query parameter in the
swagger docs - the handler treats it as optional, and the existing create
tests (which omit it) already show that.

Fixes: #22258

Signed-off-by: Grzegorz Szczepanczyk <g.szczepanczyk@getprintbox.com>
2026-06-29 12:01:34 +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
Mario Loriedo
80203302f9 Fix lookup of WSL VMs with matching name
When WSL wasn't installed, the lookup erroneously reported that
a VM with the same name existed. Instead, in this case, the lookup
should return zero matching VMs.

Fixes https://github.com/podman-container-tools/podman/issues/29053

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-06-27 10:52:26 +02:00
Mario Loriedo
697f91164a Fix WSL check: assume not installed when --status returns an error
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2026-06-27 00:43:33 +02:00
Danish Prakash
2d3001a55a
Merge pull request #28931 from ROKUMATE/test-pkg-bindings-util
pkg/bindings: Add tests for ToParams and helpers
2026-06-26 21:10:54 +05:30
ROKUMATE
f30dda3837 pkg/bindings: add tests for ToParams and helpers
Fixes: #28930
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-06-26 17:05:40 +05:30
Mikhail Dmitrichenko
3ba76de619 api: avoid sizing logs channel from tail
The compat logs handler uses the tail query parameter both to select how
many log lines should be returned and as the capacity of the internal log
channel.

Only the former is part of the API semantics. The channel capacity should
not depend on a user-controlled value: negative values can produce an
invalid channel size, while very large values can cause excessive
allocation before any logs are read.

Use a small fixed-size buffer instead.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko00@bk.ru>
2026-06-26 10:31:13 +03:00
Matt Heon
9d537703a2
Merge pull request #28908 from ROKUMATE/main
Some checks are pending
ci / sys local root fedora-prior (push) Blocked by required conditions
ci / int local rootless fedora-prior (push) Blocked by required conditions
ci / sys local rootless fedora-prior (push) Blocked by required conditions
ci / int remote root fedora-prior (push) Blocked by required conditions
ci / sys remote root fedora-prior (push) Blocked by required conditions
ci / int local root fedora-rawhide (push) Blocked by required conditions
ci / sys local root fedora-rawhide (push) Blocked by required conditions
ci / int local rootless fedora-rawhide (push) Blocked by required conditions
ci / sys local rootless fedora-rawhide (push) Blocked by required conditions
ci / int remote root fedora-rawhide (push) Blocked by required conditions
ci / sys remote root fedora-rawhide (push) Blocked by required conditions
ci / apiv2 root fedora-current (push) Blocked by required conditions
ci / bindings root fedora-current (push) Blocked by required conditions
ci / compose_v2 root fedora-current (push) Blocked by required conditions
ci / docker_py root fedora-current (push) Blocked by required conditions
ci / unit root fedora-current (push) Blocked by required conditions
ci / apiv2 rootless fedora-current (push) Blocked by required conditions
ci / compose_v2 rootless fedora-current (push) Blocked by required conditions
ci / unit rootless fedora-current (push) Blocked by required conditions
ci / upgrade v5.3.1 root fedora-current (push) Blocked by required conditions
ci / upgrade v5.6.2 root fedora-current (push) Blocked by required conditions
ci / machine linux amd64 (push) Blocked by required conditions
ci / windows unit (push) Blocked by required conditions
ci / windows e2e (push) Blocked by required conditions
ci / windows machine hyperv (push) Blocked by required conditions
ci / windows machine wsl (push) Blocked by required conditions
ci / macos machine applehv (push) Blocked by required conditions
ci / macos machine libkrun (push) Blocked by required conditions
ci / Total Success (push) Blocked by required conditions
zizmor: GitHub Actions Security Analysis / Zizmor (push) Waiting to run
pkg/copy: add tests for ParseSourceAndDestination
2026-06-25 13:53:36 -04:00
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
Mikhail Dmitrichenko
9b4484739f systemd: fix negative number conversion
convertNumber() strips the sign before parsing the numeric value and then
applies it back via a multiplier.  The negative case uses -11 instead of
-1, causing negative values to be converted incorrectly.

This is visible for any caller using the signed result directly, and can
also produce surprising results for unsigned callers if the multiplication
overflows.

Use -1 for the negative multiplier.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko00@bk.ru>
2026-06-25 18:33:10 +03:00