Commit Graph

7419 Commits

Author SHA1 Message Date
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
712b5c77f8 Merge pull request #28966 from jobselko/23741
Fix image search swagger to return array
2026-06-18 12:15:50 -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
Jitka Halova
241167c156 Fix image search swagger to return array
Fixes: #23741

Signed-off-by: Jitka Halova <jobselko@redhat.com>
2026-06-18 14:57:19 +02:00
Miguel Álvarez
5e63372ffa kube play: validate duplicate hostPort bindings across containers
When multiple containers in a pod YAML specify the same hostPort,
podman kube play previously accepted the YAML and started the
containers, causing one of them to fail at runtime with a confusing
bind() error.

Add early validation in getPodPorts() to detect duplicate
(hostIP, hostPort, protocol) tuples across containers and return
a clear error message naming both conflicting containers.

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

Signed-off-by: Miguel Álvarez <mialvare@redhat.com>
2026-06-18 13:30:11 +02:00
Ashley Cui
66a082ed1b Merge pull request #28915 from chanhyeokseo/fix-machine-virtiofs-fcos-home-28911
machine: fix virtiofs mount targets on FCOS
2026-06-17 10:36:51 -04: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
Danish Prakash
5ac01dd4e1 Merge pull request #28897 from ROKUMATE/fix-image-scp-at-username
image scp: preserve usernames containing an "@"
2026-06-17 10:36:46 +05:30
Chanhyeok Seo
61dea3749f machine: fix virtiofs mount targets on FCOS
FCOS symlinks /home to var/home. systemd rejects a mount unit whose
Where= path traverses a symlink, breaking default home dir mounts.

Resolve known FCOS symlinks before writing the ignition unit.

Fixes: #28911
Signed-off-by: Chanhyeok Seo <chanhyeok.seo@datadoghq.com>
2026-06-16 22:52:33 +09:00
Brent Baude
0cba15e256 Merge pull request #28910 from Honny1/fix-hang
Fix client hangs on stale SSH connections
2026-06-15 13:01:31 -05:00
ROKUMATE
b9003828db image scp: preserve usernames containing an "@"
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-06-12 15:23:25 +05:30
Jan Rodák
f1d0ded43c Convert if/else to switch for transport name comparison
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-06-12 10:12:49 +02:00
Jan Rodák
454a1dea45 Replace deprecated PatternMatcher.Matches with MatchesResult
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-06-12 10:12:49 +02:00
Jan Rodák
b294a92a25 Add reasons to all staticcheck suppressions
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-06-12 10:12:40 +02:00
MayorFaj
d01b7ae534 libpod: add volume rename support
Add a podman volume rename command, REST API endpoint, and bindings for renaming volumes.

The rename updates both the VolumeConfig and VolumeState tables in a single transaction and moves the volume directory on disk, rolling back if the transaction fails. Renaming an anonymous volume converts it to a named volume. Volumes that are in use, mounted, or backed by a volume plugin or the image driver cannot be renamed.

Fixes: #28189
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-06-11 21:56:15 +01:00
Jan Rodák
ae825f6234 Fix client hangs on stale SSH connections
Wrap ssh.DialNet in a goroutine so it respects context cancellation,
skip retries on context/timeout errors, and invalidate the cached
connection on failure.

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

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-06-11 16:10:25 +02:00
Matt Heon
735d0b0093 Merge pull request #28903 from Luap99/fix-chrootarchive-remote
fix podman-remote save -f oci-dir/docker-dir
2026-06-11 09:58:56 -04:00
Matej Vašek
7607c3ec82 fix: style
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2026-06-11 12:56:31 +02:00
Matej Vašek
db70e73056 fix: compat API image push err meg propagation
When returning error http code (e.g. 4xx, 5xx) the body needs to contain
a JSON that has a key "message" in it,
we must not use jsonmessage.JSONMessage.

The JSON of shape jsonmessage.JSONMessage is used only when client
already received 200.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2026-06-11 12:56:29 +02:00
Paul Holzinger
fd07b9c6ec fix podman-remote save -f oci-dir/docker-dir
With podman-remote we do not enter a our user namespace like we do with
local podman so we keep running with the real user id.

So if we then try to use chrootarchive as normal user it fails with:
creating mount namespace before pivot: operation not permitted

So simply revert back to the normal archive code.

Now the more interesting thing is we do have a test
"podman save to directory with oci format" but it never runs
rootless+remote in our CI system with our current matrix as we wanted to
reduce jobs.
So rethink the matrix and add one such job as this shows it is needed.

Fixes: 25aee24cbd ("use chrootarchive over plain archive package")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-10 18:47:02 +02:00
Paul Holzinger
cefaa0ee44 Merge pull request #28712 from elezar/info-cdi-devices
info: report configured and discovered CDI devices
2026-06-10 14:34:35 +02:00
Jan Rodák
d55b0a0664 Merge pull request #28889 from Luap99/port-conflict
pkg/specgen: fix port conflict on host assignment
2026-06-10 09:44:50 +02:00
Kir Kolyshkin
3c4068bcd6 deps: bump go-criu to v8.2.0
I guess this was not done by renovate/dependabot because of major
version bump.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-06-09 11:51:46 -07:00
Miloslav Trmač
5f5c128abe Merge pull request #28874 from kila-star1127/issue_25067
fix ssh config parsing for HostName
2026-06-09 20:49:25 +02:00
Paul Holzinger
19c579826a pkg/specgen: fix port conflict on host assignment
This fixes two problems when parsing ports.

First, check for host port conflicts. When we are given the same ip:host
port combo twice then we need to reject that as invalid, the backend
cannot bind the same port twice and thus we always get a runtime
failure. Failing early in the create code path is much better.

Second, when assigning random ports for expose we still have to check
for proper conflicts. The first error was using allUsedContainerPortsMap
to check for conflicts but this holds container side ports, we need to
ensure there are no conflicts on the host port.

Then there was the other issue that the array in the map was copied and
accessed by value on lookup. And because the code did not reassign the
value it then failed to actually update the correct ports.
To address that I switch the map to store the array by reference which
will avoid the bigger copies as we only need to update the pointer now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-09 16:12:35 +02:00
crawfordxx
d0f97989ad machine: escape % as %% in proxy values written to systemd unit conf
systemd interprets % as specifier characters in unit configuration files
(e.g. %H, %u, %40). Proxy environment variable values that contain
percent-encoded URL characters (such as %40 for @ in usernames) cause
systemd to emit warnings and fail to parse the generated
/etc/systemd/system.conf.d/default-env.conf:

  system.conf.d/default-env.conf:2: Failed to resolve specifiers in
  HTTP_PROXY=http://user%40example.com@proxy:3128

Fix by adding a bash variable substitution that doubles every % to %%
before writing to the systemd unit conf files. The profile.d and
environment.d destinations do not need this escaping and continue to
use the original value.

Fixes #28698

Signed-off-by: crawfordxx <crawfordxx@users.noreply.github.com>
2026-06-06 12:04:48 +08:00
Jannik Glückert
b0cb2bb011 fix ssh config parsing for HostName
A later invocation to url.Parse() needs a preceding scheme,
otherwise the hostname just gets discarded.

Fixes #25067

Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com>
Signed-off-by: KILA <32559459+kila-star1127@users.noreply.github.com>
2026-06-05 18:10:07 +00:00
Paul Holzinger
486bacd3e4 Merge pull request #28335 from axel7083/refactor/quadlet-applications
refactor: podman quadlet sub-command
2026-06-05 17:55:51 +02:00
Paul Holzinger
2d369caca7 Merge pull request #28823 from inknos/run-4472
machine: share virtiofs systemd unit generation
2026-06-03 19:13:51 +02:00
Paul Holzinger
fab963e01c Merge pull request #28693 from kolyshkin/change-label
bump selinux to v1.15.1, use SetProcessKind
2026-06-03 18:42:58 +02:00
Brent Baude
e32fc614df Merge pull request #28800 from danishprakash/remote-log-path
specgen: move log_path handling over to the server
2026-06-03 08:59:54 -05:00
Giuseppe Scrivano
1a76d464fd cmd, commit: change --pause default to true
Pause the container by default during commit.  It is safer as it
avoids conflicts, and potentially security issues, when another
process is accessing the container rootfs.

Originally this was not done because it was a breaking change and
rootless containers weren't able to use the freezer cgroup controller.
Now that we support only cgroup v2, there is no gap anymore with
root (exotic configurations can still use --pause=false).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-06-03 07:28:22 +02:00
Danish Prakash
bad0a715ee specgen: move log_path handling over to the server
log_path is currently set at the client side and is ignored by
the server in a remote session. This leads to either incorrect log_path
being considered by the server or not honored at all. Move the handling
from client to the server, in line with other flags such as log_driver.

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-06-03 09:22:50 +05:30
Kir Kolyshkin
ad7b6be2b9 bump selinux to v1.15.1, use SetProcessKind
I was not able to find any external users of pkg/selinux but kept it
for now (and marked as deprecated) so we can remove it later.

PS pkg/selinux adds go:fix directives which are not (yet) recognized
by the gocheckcompilerdirectives linter, so add a temporary exception).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-06-02 11:18:34 -07:00
Nicola Sella
d6cf6e8495 machine: share virtiofs systemd unit generation
Make GenerateSystemDFilesForVirtiofsMounts an agnostic function
and move the code from apple to pkg/machine/volume_systemd.go

MountVolumesToVM  is now a no-op matching the AppleHV and
LibKrun behaviour.

Continues from PR: https://github.com/podman-container-tools/podman/pull/28736

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

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-06-02 14:47:08 +02:00
axel7083
496646f0da feat: update podman quadlet sub-command
Fixes: #28118
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2026-06-02 09:52:49 +00:00
Evan Lezar
e740848eb9 info: report configured and discovered CDI devices
Add CDI information to podman info and podman system info.

The host info now includes the configured CDI spec directories and the
currently discovered CDI devices. The devices are resolved when the info
endpoint is called and there is no need to refresh these in the background.

Also map the same data into the Docker-compatible /info response as CDISpecDirs and DiscoveredDevices.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2026-06-01 21:45:41 +02:00
Tom Sweeney
8b1e46170b Adjust API calls for compression
Add the various compression API calls as created by @nalind in #28807

Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2026-05-29 09:10:50 -04:00
Paul Holzinger
13c6b5d786 pkg/bindings/generator: fall back to golangci-lint from $PATH
Commit cf021c4ba9 switched the logic to also allow golangci-lint in
$PATH but forgot to update the call here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-05-28 20:38:49 +02:00
Nicola Sella
e59b9dae8f api/libpod: fix r_limits cleared on update
Returnin nil when input is empty, to skip rlimit replacement
when r_limits is not present in the request.

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

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-05-27 13:32:31 +02:00
Brent Baude
e581ddc253 Merge pull request #28731 from lstocchi/hyperv_enhancements
Fixes for Hyper-V user experience
2026-05-26 10:30:18 -05:00
Paul Holzinger
22c5f3fa55 Merge pull request #28527 from vyasgun/pr/krunkit-timesync
machine: add vfkit timesync device for Apple VMs
2026-05-26 12:23:04 +02:00
Paul Holzinger
1c6d8a0a89 Merge pull request #28759 from kolyshkin/modernize-3
Assorted go modernize fixes
2026-05-26 12:20:31 +02:00
Jan Rodák
5b98ee331f Merge pull request #28641 from jiwahn/feat/container-annotation-filter
Feat/container annotation filter
2026-05-26 12:00:40 +02:00
Jan Rodák
751f7c316d Merge pull request #28714 from christopherbii/main
Fix Missing HostConfig field from API response
2026-05-26 10:26:46 +02:00
lstocchi
f96cbda1b0 hyperv: propagate detailed error from Hyper-V permission checks
Change isHyperVAdminMember from returning a bool to returning an error so that callers surface the specific failure reason — particularly distinguishing "not in the group" from "in the group but session not updated" (new ErrHypervUserSessionNotUpdated sentinel). This gives users actionable guidance instead of a generic permission error.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2026-05-25 00:10:18 +02:00
Kir Kolyshkin
d4f60b5826 libpod: some modernize fixes for freebsd and darwin
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-22 14:15:49 -07:00
Kir Kolyshkin
bf78f80b00 Replace strings.Split(..)[0] with strings.Cut
These places were ignored by modernize, so I did some grepping and
editing.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-22 13:08:56 -07:00
Kir Kolyshkin
b4d0747baa pkg/systemd/parser: use slices.Backward
Suggested by modernize (aka go fix).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-22 12:28:16 -07:00
Kir Kolyshkin
7797dcb2ab pkg/domain/infra/abi: modernize
Use slices.Contains instead of for loop. Suggested by modernize
(aka go fix).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-05-22 12:26:59 -07:00