7135 Commits

Author SHA1 Message Date
Matt Heon
2fbecb48e1 Merge pull request #27791 from ninja-quokka/kube_play_image_validation
[play_kube] Add validation to container image field
2025-12-22 14:43:56 -05:00
Lewis Denny
74c0795a7c [play_kube] Add validation to container image field
Fixes: #27784

Signed-off-by: Lewis Denny <lewisdenny@me.com>
2025-12-21 20:15:35 +10:00
Ashley Cui
aa1d7b189a Remove network-cmd-path
As part of slirp removal.
RUN-3569

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-12-19 16:52:49 -05:00
Matt Heon
ac91395e1d Merge pull request #27696 from MayorFaj/fix-logs-timestamp-precision
fix(logs): improve timestamp precision in container logs
2025-12-17 15:41:43 -05:00
Matt Heon
8b9c1e2ad3 Merge pull request #27781 from cgwalters/fprintf-trailing-nl
Fix missing newlines in stderr error messages
2025-12-17 12:21:03 -05:00
Nicola Sella
3e6781f05a Add POST /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3743

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-12-17 14:37:12 +01:00
Colin Walters
9a2c8b615e Fix missing newlines in stderr error messages
I happened to run `podman run --config=/path/to/file` and got
an error without a trailing newline, which was a bit jarring.

Fix the instances I noticed.

Assisted-by: OpenCode (Claude Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-17 07:36:04 -05:00
Paul Holzinger
254403dc03 Merge pull request #27426 from Honny1/local-api-artifact-add
Artifact add optimization on macOS and Windows
2025-12-12 16:49:50 +01:00
Brent Baude
f348a0717d Vendor latest mono repo for libartifact changes
This PR vendors in the strong typed libartifact code and carries the
associated changes.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-12-10 14:44:50 -06:00
Christophe Fergeau
84a2902d32 kube play: Fix fd leak when handling symlinks
The `*os.File` returned by `pathrs.OpenatInRoot` needs to
be closed before returning from `openSymlinkPath`

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2025-12-09 16:28:16 +01:00
openshift-merge-bot[bot]
f66f7c8a5b Merge pull request #27650 from lstocchi/i27614
Prevent non hyper-v admin users to execute machine commands
2025-12-09 12:17:38 +00:00
Brent Baude
f87cefc262 Remove Intel MacOS support
This PR removes support for Intel Apple Macs. The removal includes
impacts to code, tests, Makefile, builds, release builds, and so forth.

Fixes Jira: RUN-3621

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-12-07 07:03:06 -06:00
MayorFaj
2bbf26de0c fix(logs): add tests for nanosecond precision in log timestamps
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-06 12:17:39 +00:00
MayorFaj
60a5a476d5 fix(logs): improve timestamp precision in container logs
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2025-12-05 16:28:29 +00:00
openshift-merge-bot[bot]
5508d873c1 Merge pull request #27619 from Honny1/fix-unless-stopped-reboot
Fix `unless-stopped` restart policy to match Docker behavior
2025-12-04 15:04:10 +00:00
openshift-merge-bot[bot]
0bd2b4b358 Merge pull request #27602 from ZuhairM7/fix-remote-build-secrets
bindings: fix handling of env secrets in remote builds
2025-12-04 13:15:24 +00:00
ZuhairM7
fdbb696731 bindings: fix handling of env secrets in remote builds
Previously, using --secret=id=foo,env=BAR in remote mode would fail because the client sent the env var name to the server, which tried to resolve it locally. This patch modifies the client to resolve the environment variable locally, write it to a temp file, and send it as a file-based secret.

Fixes #27494

Signed-off-by: ZuhairM7 <ZuhairM7>
Signed-off-by: ZuhairM7 <zuhairmerali@gmail.com>
2025-12-02 16:21:49 -06:00
lstocchi
d150051d7a add windows platform tests
Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-12-02 16:28:20 +01:00
lstocchi
85fe4de1ee fix failing windows platform tests
fixes broken windows tests and enables them to be run on
windows CI

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-12-02 16:19:50 +01:00
lstocchi
1bd51314ff prevent non hyper-v admin users to execute machine commands
Update GetAll() and GetByVMType() to add a check to prevent non hyper-v admin users to
interact with hyperv machines.
Users can work with hyperv machines only with elevated rights or if
members of the hyperv administrators group

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-12-02 16:19:31 +01:00
Jan Rodák
4d3c6311a5 Fix unless-stopped restart policy to match Docker behavior
- Update documentation: Differentiate `unless-stopped` from `always` - containers stopped by the user before a reboot will not restart.
- Add `should-start-on-boot` filter: Identify containers that require a restart after a system reboot.
- Update command documentation: Add `restart-policy` and `label!` filters to the documentation for container commands (rm, ps, start, stop, pause, unpause, restart).
- Add `restart-policy` and `shoud-start-on-boot` to completions.
- Update service: Update `podman-restart.service` to use the `needs-restart=true` filter.
- Preserve state: Preserve the `StoppedByUser` state across reboots.
- Update API: Add a `ShouldStartOnBoot()` method to the Container API.
- Update documentation: Add descriptions for the `should-start-on-boot` filter.

Fixes: https://issues.redhat.com/browse/RHEL-129405
Fixes: https://github.com/containers/podman/issues/20418

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-12-02 15:40:46 +01:00
openshift-merge-bot[bot]
40734541bb Merge pull request #27599 from inknos/get-quadlet-api
Add GET /quadlets/{name}
2025-11-27 10:09:38 +00:00
openshift-merge-bot[bot]
96631c78db Merge pull request #27612 from l0rd/win-default-helper-binaries
Replace FindExecutablePeer with FindHelperBinary when looking for gvproxy/win-sshproxy on WSL
2025-11-26 19:42:30 +00:00
Nicola Sella
ee0efb9fc6 Add GET /quadlets/{name}/file
Fixes: https://issues.redhat.com/browse/RUN-3716

Signed-off-by: Nicola Sella <nsella@redhat.com>
2025-11-26 16:52:44 +01:00
openshift-merge-bot[bot]
ffe01749e2 Merge pull request #27413 from 0xDVC/fix-26848-userns-pod-validation
Fix user namespace validation for containers in pods
2025-11-26 15:37:00 +00:00
Mario Loriedo
f71b9335f1 Replace FindExecutablePeer with FindHelperBinary
The WSL machine start was using the function FindExecutablePeer that
ignores user configuration (helper_binaries_dir). FindHelperBinary
instead is used when starting the machine for the rest of the providers
and honors user configuration.

This commit requires 4877783c37

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-26 14:52:32 +01:00
openshift-merge-bot[bot]
76024e1bdb Merge pull request #27598 from shiavm006/remove-deprecated-macvlan-flag
Remove deprecated --macvlan flag from network create
2025-11-26 10:48:46 +00:00
shiavm006
786012a670 Remove deprecated --macvlan flag from network create
The --macvlan flag was deprecated in Podman 3.x and was scheduled
for removal in version 4.0. Since we're now at version 6.0.0-dev,
this commit removes the deprecated flag and its associated code.
Users should now use the standard syntax:
  podman network create --driver macvlan --opt parent=<device> <name>

Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-11-26 02:26:24 +05:30
openshift-merge-bot[bot]
b5916bf33b Merge pull request #27606 from Luap99/machine-mount
pkg/machine: make mount units hook into local-fs
2025-11-25 20:08:37 +00:00
Paul Holzinger
b9a1f87b9e rootless_linux.c: use shortcut for system commands
There doesn't seem any reason why the system commands should not join
the userns. In particular the main commands use ParentNSRequired and
UnshareNSRequired when they don't want to be joined to the main userns.
Since the system command don't set these the go code does the join and
re-exec anyway so might as well use the shortcut to speed that up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 19:52:24 +01:00
Paul Holzinger
aaadb4726d SetupRootless handle case where conmon pid are not valid
When trying to join the conmon pid to recreate the pause process based
on the namespace it can be that the pid is no longer valid, i.e. when
conmon crashed or was killed.

Currently we have a big issue that can be reproduced using:
$ podman run -d quay.io/libpod/testimage:20241011 sleep 100
$ killall -9 conmon
$ killall catatonit

All commands would fail as we keep trying to rejoin the namespace of the
non existing conmon process.

So to address that fall back to creating a new namespace if we fail to
join the conmon pids.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 19:52:24 +01:00
Paul Holzinger
4833357c72 preallocate paths in SetupRootless
Just a minor improvement as we know the size needed for the slice we can
allocate it only once instead of the append having to resize it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 19:52:24 +01:00
Paul Holzinger
ed9d298fb4 fix noMoveProcess in SetupRootless
Based on the description in commit 63ef557 this was added so that the
migrate command does not move the pause process into a separate cgroup.

It should however not disable the rejoining of the userns when the pause
process join failed. BEcause of this we end up calling migrate without a
userns and that then can fail if there are actual contianer it tries to
cleanup.

Fixes: 63ef5576ed ("command: migrate doesn't move process to cgroup")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 19:52:24 +01:00
Paul Holzinger
c3f3dd36c4 use return error handling in SetupRootless
There is no good reason to use logrus and os.Exit() here, other parts of
this function already return the error so do the same. The main podman
process will exit then with the normal formatted error message.

And also log an error about the last return which should never happen as
we should have exited above if the re-exec worked or errored out.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 19:51:48 +01:00
Paul Holzinger
200030914f pkg/machine: make mount units hook into local-fs
The virtiofs mount points do not actually are network mounts so we can
mount them earlier and using multi-user.target to enable them was wrong.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-25 18:13:13 +01:00
0xdvc
417430c451 fix: improve userns validation when joining pods
- remove old CLI validation that only checked --pod flag
- add validation in namespaces.go to catch all paths (cli, quadlet, api)
- block userns mixing for all pods with infra, not just ipc/net
- update error message to be clearer
- fix test cleanup to use PodmanExitCleanly()
- use dynamic pod names in system tests to avoid conflicts

fixes #26848

Signed-off-by: 0xdvc <neilohene@gmail.com>
2025-11-25 08:45:19 +00:00
openshift-merge-bot[bot]
25c358e374 Merge pull request #27579 from Luap99/vendor
vendor: update common, image, storage to main
2025-11-21 16:50:48 +00:00
openshift-merge-bot[bot]
ca465fc31c Merge pull request #27578 from limitedeternity/bugfix/27571_incorrect_volume_format
[Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows
2025-11-21 14:11:18 +00:00
openshift-merge-bot[bot]
16fae260bc Merge pull request #27549 from axel7083/fix/api/compact/remove-secrets
fix(api/compact): typo in the remove secret handle
2025-11-21 13:34:45 +00:00
Paul Holzinger
d163c38a26 vendor: update common, image, storage to main
This also then bumps github.com/opencontainers/runtime-spec to v1.3.0
which contains breaking changes of the pid type as such we had to update
all the podman callers.

And tags.cncf.io/container-device-interface also used some changed
types from it and they have been updated in main so bump to the latest
commit there as well in order to get podman to compile properly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-21 14:24:29 +01:00
Vyacheslav Bespalov
a331c51c05 [Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows
Signed-off-by: Vyacheslav Bespalov <vbespalov@ptsecurity.com>
2025-11-21 15:32:39 +03:00
axel7083
d31f4e782d fix(api/compat): typo in the remove secret handle
Fixes https://github.com/containers/podman/issues/27548

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2025-11-21 13:06:52 +01:00
openshift-merge-bot[bot]
095ddfe995 Merge pull request #26277 from lstocchi/i25038
HyperV machine should reuse hvsock registry entries when possible
2025-11-21 11:32:09 +00:00
Mario Loriedo
9c2a738963 Stop enforcing iptables on WSL
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-21 01:01:47 +01:00
openshift-merge-bot[bot]
fac259ef9c Merge pull request #27566 from grey3228/fix/check_newGenericDecompressor_err
check err returned by newGenericDecompressor
2025-11-20 23:15:56 +00:00
Brent Baude
f526c37094 Merge pull request #27545 from dfr/freebsd-linux-devices
pkg/specgen/generate: Fix adding host devices on FreeBSD
2025-11-20 13:59:31 -06:00
openshift-merge-bot[bot]
18aa784988 Merge pull request #27546 from jakecorrenti/libkrun-as-default
machine: change default macOS provider to libkrun
2025-11-20 16:00:23 +00:00
lstocchi
901bd69e05 remove legacy registry entry
if users have legacy VMs (podman machines having hvsock registry entries
with the machineName field) when using podman with this patch, their
Registry entries will never be deleted by the functions added in
previous commits.

This commit adds a helper func to clean the Registry when these legacy
machines get removed

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-11-20 16:51:47 +01:00
lstocchi
23a297198e add test to verify init reuse hvsock entries for hyperv machines
Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-11-20 16:51:45 +01:00
lstocchi
ab89922f4b hyperv should reuse hvsock registry entries when possible
Previously, each new HyperV Podman machine required creating new hvsock
registry entries, necessitating administrator privileges.

This change modifies the HyperV provider to reuse existing hvsock
entries if found. This is possible due to Podman's current
limitation of running only one HyperV machine at a time.

As a result, administrator privileges are only needed for the first initial
machine setup (when the registry is empty). Subsequent machines can be created by users in the
"Hyper-V Administrators" group without being Admin.

Hvsock entries are no longer deleted on each machine removal; cleanup
is handled when the last machine gets removed.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-11-20 16:51:31 +01:00