Commit Graph

7434 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]
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
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
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]
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
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
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
ryanmccann1024
61cbc0c3ee feat(exec): Add --no-session flag for improved performance
Fixes: #26588

For use cases like HPC, where `podman exec` is called in rapid succession, the standard exec process can become a bottleneck due to container locking and database I/O for session tracking.

This commit introduces a new `--no-session` flag to `podman exec`. When used, this flag invokes a new, lightweight backend implementation that:

- Skips container locking, reducing lock contention
- Bypasses the creation, tracking, and removal of exec sessions in the database
- Executes the command directly and retrieves the exit code without persisting session state
- Maintains consistency with regular exec for container lookup, TTY handling, and environment setup
- Shares implementation with health check execution to avoid code duplication

The implementation addresses all performance bottlenecks while preserving compatibility with existing exec functionality including --latest flag support and proper exit code handling.

Changes include:
- Add --no-session flag to cmd/podman/containers/exec.go
- Implement lightweight execution path in libpod/container_exec.go
- Ensure consistent container validation and environment setup
- Add comprehensive exit code testing including signal handling (exit 137)
- Optimize configuration to skip unnecessary exit command setup

Signed-off-by: Ryan McCann <ryan_mccann@student.uml.edu>
Signed-off-by: ryanmccann1024 <ryan_mccann@student.uml.edu>
2025-11-19 12:44:48 -05:00
Jan Rodák
d22e50eac9 test/system: remove deprecated cgroupsv1 skip check
Remove skip_if_rootless_cgroupsv1 call from quadlet tests since
cgroupsv1 is deprecated and no longer needs special handling

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-11-19 14:26:25 +01:00
openshift-merge-bot[bot]
fb7e99786e Merge pull request #27384 from flouthoc/multi-file-quadlet
quadlet install: add support for multiple quadlets in a single file
2025-11-18 16:01:08 +00:00
flouthoc
c22c3271bb quadlet install: multiple quadlets from single file should share app
Quadlets installed from `.quadlet` file now belongs to a single
application, anyone file removed from this application removes all the
other files as well.

Assited by: claude-4-sonnet

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-11-17 10:23:28 -08:00
openshift-merge-bot[bot]
af91cae1c5 Merge pull request #27271 from lsm5/podman6-no-cgv1
Podman6: Remove cgroupsv1
2025-11-14 17:03:59 +00:00
Matej Vašek
65411d53c9 Revert "Fix copyUIDGID parameter inversion in Docker compat API"
This reverts commit 2b848cca36.

The official Docker API documentation was misleading here.
Testing shown that old podman behaviour was correct.
In docker copyUIDGID=true means that primary container uid/gid is used,
not the uid/gid from the tar stream.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-11-14 12:39:04 +01:00
renovate[bot]
613ac5bd73 chore(deps): update dependency pytest to v9.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-12 20:40:53 +00:00
Lokesh Mandvekar
036bf7b44f test/system: delete CgV1 skips and skipped CgV2 tests
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Lokesh Mandvekar
4970fd26e4 test/e2e: delete CgV1 skips, delete tests skipped on Cgv2
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:34 -05:00
Paul Holzinger
5c1ed12d8d enable gofumpt formatter
Based on our discussion gofumpt won the vote so use that one via
golangci-lint.

https://github.com/containers/podman/discussions/27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-11 12:32:46 +01:00
openshift-merge-bot[bot]
631d15bd27 Merge pull request #27496 from containers/renovate/pytest-9.x
Update dependency pytest to v9
2025-11-10 20:21:50 +00:00
openshift-merge-bot[bot]
481c5d9fab Merge pull request #27484 from xiaolinny/main
chore: fix the inconsistent method names in the comments
2025-11-10 20:18:48 +00:00
renovate[bot]
37c3a75ce0 Update dependency pytest to v9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 18:52:02 +00:00
flouthoc
e787b4f503 quadlet: add support for multiple quadlets in a single file
Enable installing multiple quadlets from one file using '---' delimiters.
Each section requires '# FileName=<name>' comment for custom naming.
Single quadlet files remain unchanged for backward compatibility.

Assited by: claude-4-sonnet

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-11-10 08:25:48 -08:00
openshift-merge-bot[bot]
2c40377dc9 Merge pull request #27472 from Luap99/test-fixes
various different test fixes
2025-11-10 15:03:16 +00:00
openshift-merge-bot[bot]
80840578be Merge pull request #27395 from nalind/grpc-noop
Parse grpc requests on the service socket
2025-11-10 13:45:27 +00:00
xiaolinny
4e169dac8f chore: fix the inconsistent method names in the comments
Signed-off-by: xiaolinny <xiaolincode@outlook.com>
2025-11-10 15:24:17 +08:00
Paul Holzinger
950db09587 test/system: fix broken podman_runtime
This got broken during the remote testing rewrite to enable tls testing
in commit feb36e4fe6. The problem is the function didn't use the proper
podman command with the remote arg so it tried to connect to the default
socket with remote testing.

And in the checkpoint file we use it before the PODMAN_CMD was defined
so fix this by moving the basic_setup before and the use the variable
PODMAN_RUNTIME instead of having to do another info call.

Also fix the debug log output to correctly log the podman commands with
all arguments on a single line.

Fixes: feb36e4fe6 ("Implement TLS API Support")
Fixes: #27266

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:56 +01:00
Paul Holzinger
c31104f84e test/system: fix artifact test cleanup
Make sure to rmeove the artifact but we don't need to remove the
testfiles as they are part under PODMAN_TMPDIR which gets removed by
default so don't bother with that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:56 +01:00
Paul Holzinger
09cf145f39 test/system: merge artifact tests into single file
There is no need for several files here, it just means the setup and
helpers get duplicated.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
348617fba6 test/system: rework artifact created test
- use nanoseconds, so we don't need to sleep a full second do put the
  time forward.
- use the --format option instead of jq
- run test via remote as well
- don't use static file content

Fixes: #27265

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
9eba688ffa test/system: remove 701-artifact-created.bats
The tests there are a duplicate compared to the 702 file.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
ad34a695de test/system: do not run artifact test in parallel
They do not seem safe to use concurrently, see #27264.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
f89e2d3ac8 test/system: skip flaky restore test on debian
Somehow this only flakes on debian as it seem the /etc/hosts file on the
host system changes and thus causes a false postive with the
before/after restore comparison.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:55 +01:00
Paul Holzinger
b63a210dd9 test/e2e: try to fix clean up after terminated build flake
It is failing with:
replacing mount point ".../root/overlay/xxx/merged": directory not empty

First, the build does not need network so ensure we don't leak network
allocations by killing it. Second, kill is always async so ensure to
wait for the actul build process exit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-11-07 19:02:54 +01:00
Ricardo Branco
14cb9d2a6c test/system: Update test to handle new error message from runc 1.3.3
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-11-07 11:54:06 +01:00
openshift-merge-bot[bot]
4609271590 Merge pull request #27420 from givensuman/T-27095-add-apparmor-quadlet-key
Add AppArmor key to quadlet containers
2025-11-06 11:23:35 +00:00
openshift-merge-bot[bot]
ce561680bd Merge pull request #27431 from nimdrak/27421
Fixed #27421 aritfact push and pull with authfile
2025-11-06 10:08:39 +00:00
Byounguk Lee
c581e0b392 Fixes #27421 aritfact push and pull with authfile
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
2025-11-06 05:26:36 +00:00
givensuman
e7b50c33df Add AppArmor key to quadlet .container files
Fixes: #27095
Signed-off-by: givensuman <givensuman@duck.com>
2025-11-05 18:15:52 -05:00
openshift-merge-bot[bot]
23e6a89d36 Merge pull request #27379 from Honny1/fix-copyuidguid
Fix copyUIDGID parameter inversion in Docker compat API
2025-11-05 08:04:30 +00:00
openshift-merge-bot[bot]
eb63a1f38d Merge pull request #27005 from zifeitong/newer
Fix podman build "newer" pull policy
2025-11-04 15:17:37 +00:00
shiavm006
c0ae1a9bac Fix remote client rejecting empty --detach-keys string
The remote client (podman --remote) was incorrectly throwing an error
when --detach-keys="" was specified for attach, run, or start commands.
According to documentation and the v1.7.0 release notes, specifying an
empty string should disable detaching, not cause an error.

Fixes: #27414

Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-11-04 09:12:02 +05:30
Nalin Dahyabhai
be82989be3 Add a no-op GRPC responder service to the podman system service
Add a bare minimum GRPC service to the podman system service socket.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-11-03 11:14:32 -05:00
openshift-merge-bot[bot]
8aea109e42 Merge pull request #27333 from Honny1/search-tests-without-net
Eliminate network dependencies in `podman search` e2e tests with mock registry
2025-10-31 19:33:10 +00:00
openshift-merge-bot[bot]
01b669346e Merge pull request #27387 from mheon/remove_boltdb
Remove BoltDB state support
2025-10-28 17:41:05 +00:00
Matt Heon
f5bc2abe4c Remove BoltDB state support
This also includes a number of significant changes to the SQLite
state made possible by removal of the legacy DB.

1. Enable database unit tests for SQLite state, with numerous
   tweaks to get tests passing. Most notable changes are to
   container removal - where we previously didn't return an error
   if there was no container to remove - and RemovePodContainers,
   which I don't think ever worked properly from my reading of
   the failures.
2. Removal of AddContainerToPod/RemoveContainerToPod. On SQLite,
   these functions are identical to AddContainer/RemoveContainer
   and there is no reason to retain duplicates.
3. Removal of SafeRewriteContainerConfig - it's identical to
   RewriteContainerConfig in SQLite, no reason to have duplicate
   entrypoints.

As an exciting side-note, this removes Podman's requirement that
containers and pods cannot share a name, which was a BoltDB
restriction only.

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2025-10-28 12:09:04 -04:00
Dmitry Konishchev
601a072b51 Escape RequiresMountsFor value
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 20:01:45 +03:00
Dmitry Konishchev
c8ba67f6b9 Introduce assert-has-key assertion
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 19:57:35 +03:00
Dmitry Konishchev
23057fd5ed Rename misleading assertion name
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2025-10-27 19:23:51 +03:00