Commit Graph

26364 Commits

Author SHA1 Message Date
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
openshift-merge-bot[bot]
046206fe53 Merge pull request #27488 from lsm5/packit-rpm-test
Packit/TMT: Exclude podman packages from podman-next for tests
2025-11-26 14:36:33 +00: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
openshift-merge-bot[bot]
4ca9158f2d Merge pull request #27604 from Luap99/migrate
podman system migrate fixes when pause process and conmon got killed
2025-11-25 19:31:33 +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
Brent Baude
90a03ca080 Merge pull request #27584 from salim-b/patch-1
docs: improve note about Quadlet TimeoutStartSec
2025-11-24 09:34:21 -06:00
openshift-merge-bot[bot]
7958d910aa Merge pull request #27589 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps to 22d50c5
2025-11-24 11:51:18 +00:00
renovate[bot]
99a7f9f38d fix(deps): update common, image, and storage deps to 22d50c5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-23 01:08:30 +00:00
Salim B
7b30d9cd3f docs: further tweaks
Signed-off-by: Salim B <git@salim.space>
2025-11-22 01:17:47 +01:00
Salim B
d1c2afc941 docs: improve note about Quadlet TimeoutStartSec
Signed-off-by: Salim B <git@salim.space>
2025-11-22 00:51:01 +01: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]
f3d38d3974 Merge pull request #27564 from containers/renovate/go-golang.org-x-crypto-vulnerability
fix(deps): update module golang.org/x/crypto to v0.45.0 [security]
2025-11-21 12:00:27 +00: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
openshift-merge-bot[bot]
91816d9042 Merge pull request #27555 from l0rd/iptables-rm
Remove iptables references from tests, docs and WSL config
2025-11-21 10:45:03 +00:00
openshift-merge-bot[bot]
3922526b94 Merge pull request #27572 from containers/renovate/actions-checkout-6.x
[skip-ci] Update actions/checkout action to v6
2025-11-21 10:02:32 +00:00
Mario Loriedo
343a196448 Remove iptables references in docs
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-21 01:10:19 +01:00
Mario Loriedo
aa5361ac53 Remove iptables references in upgrade tests
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-21 01:02:22 +01:00
Mario Loriedo
bd02d6fd74 Remove iptables from Podman prerequisites
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-21 01:01:47 +01:00
Mario Loriedo
db9e0b97f6 Remove iptables references in system tests
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-11-21 01:01:47 +01: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
openshift-merge-bot[bot]
f1b80bf0e9 Merge pull request #27558 from eriksjolund/systemctl-for-nologin-accounts
podman-systemd.unit.5: document /sbin/nologin accounts
2025-11-20 23:13:05 +00:00
openshift-merge-bot[bot]
516feff8ec Merge pull request #27568 from grey3228/fix/avoid_potential_nil_deref_in_img_rm
avoid potential nil ptr deref in image rm
2025-11-20 23:10:11 +00:00
Erik Sjölund
7741e047dd podman-systemd.unit.5: document /sbin/nologin accounts
Add command:
sudo systemctl --machine username@ --user list-unit-files

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

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2025-11-20 21:01:42 +01: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]
b9dc4762f5 Merge pull request #27561 from Honny1/fix-validatepr
Add --network=host to validatepr container for GitHub access
2025-11-20 18:18:52 +00:00
renovate[bot]
a23b90b119 [skip-ci] Update actions/checkout action to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 16:43:50 +00:00
openshift-merge-bot[bot]
3dc94c825f Merge pull request #27570 from Luap99/new-images
New images 2025-11-20
2025-11-20 16:42:44 +00: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
Paul Holzinger
e70076f809 New images 2025-11-20
from https://github.com/containers/automation_images/pull/428

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-20 15:59:21 +01:00
Mikhail Dmitrichenko
8411881ab2 avoid potential nil ptr deref in image rm
In function rm variable `report` might be initialized as nil as a result
of call
`registry.ImageEngine().Remove(registry.Context(), args, imageOpts)`.
Then, there is a call `registry.SetExitCode(report.ExitCode)` without
explicit nil check before. Check `len(rmErrors) > 0` doesn't guarantee
that report is a non-nil value.
So such call may lead to nil deref.

This commit adds check `report` for nil before its dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
2025-11-20 17:22:18 +03:00
lstocchi
b62c82bff6 move HasAdminRights to windows pkg
this commit moves the HasAdminRights func from the wsl package to a generic windows package as this could also be used by the HyperV provider.

Signed-off-by: lstocchi <lstocchi@redhat.com>
2025-11-20 15:20:57 +01:00
openshift-merge-bot[bot]
7cd9b81b43 Merge pull request #26727 from ryanmccann1024/feature/26588-exec-no-session
feat(exec): Add --no-session flag for improved performance
2025-11-20 10:28:15 +00:00
openshift-merge-bot[bot]
dfdd3b5074 Merge pull request #27557 from baude/issue27556
Ignore prompt if stdin not a tty on machine start
2025-11-20 10:03:32 +00:00