Commit graph

7439 commits

Author SHA1 Message Date
Ashley Cui
649c074bf5
Merge pull request #28042 from mheon/backports_580_rc1
Backports and release notes for v5.8.0-RC1
2026-02-09 20:10:48 -05:00
Paul Holzinger
6bec23fd04
Merge pull request #27660 from mheon/58_migrate_db
[v5.8] Add migration code for BoltDB to SQLite
2026-02-09 16:06:57 +01:00
Paul Holzinger
949d406ed1 test/system: skip podman volumes with XFS quotas on fedora
It fails due selinux, it is unlcear why so I filled #27759 for now to
track that so we can get the image update merged.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-06 15:36:47 -05:00
Matt Heon
63ea75a599 Deterministically order pod inspect fields
There are two fields I'm worried about: shared namespaces and pod
containers. Both are generated via loops over maps and are thus
non-deterministic in ordering. Throw a sort on each to fix the
order so we can actually diff `podman pod inspect` output.

Signed-off-by: Matt Heon <mheon@redhat.com>
2026-02-06 15:36:47 -05:00
ZuhairM7
4e3dd47967 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>
2026-02-06 15:36:47 -05:00
Jan Rodák
86b6c75cef 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>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-06 15:36:47 -05:00
0xdvc
35c602bfbb 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>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-06 15:36:47 -05:00
axel7083
243b623629 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>
2026-02-06 15:36:47 -05:00
Aaron Ang
8423b3bbd0 Clamp rootless rlimits to host on format
Signed-off-by: Aaron Ang <aaron.angyd@gmail.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-06 15:36:47 -05:00
Aaron Ang
58a15f1500 Add ulimits to podman update API
Signed-off-by: Aaron Ang <aaron.angyd@gmail.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-06 15:36:47 -05:00
ryanmccann1024
484858710c 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>
2026-02-06 15:36:47 -05:00
flouthoc
790f21d355 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>
2026-02-06 15:36:47 -05:00
flouthoc
ed79cdfd6a 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>
2026-02-06 15:36:47 -05:00
xiaolinny
e8c334f3cb chore: fix the inconsistent method names in the comments
Signed-off-by: xiaolinny <xiaolincode@outlook.com>
2026-02-06 15:36:47 -05:00
Ricardo Branco
479b363020 test/system: Update test to handle new error message from runc 1.3.3
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-06 15:36:47 -05:00
Byounguk Lee
f1dcf63a91 Fixes #27421 aritfact push and pull with authfile
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
2026-02-06 15:36:47 -05:00
shiavm006
87bb060531 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>
2026-02-06 15:36:47 -05:00
Dmitry Konishchev
8b8390522b Escape RequiresMountsFor value
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2026-02-06 15:36:47 -05:00
Dmitry Konishchev
d5b72d973a Introduce assert-has-key assertion
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2026-02-06 15:36:47 -05:00
Dmitry Konishchev
62f1e1176e Rename misleading assertion name
Signed-off-by: Dmitry Konishchev <konishchev@gmail.com>
2026-02-06 15:36:47 -05:00
tomsweeneyredhat
415e3fc4c8 [CI:DOCS]Fix minor typo in buildah test
After the tests had all but passed on #27343, I noted
a minor typo.  This corrects the one character flaw.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-02-06 15:36:47 -05:00
Zifei Tong
ee88292812 Add system test
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
2026-02-06 15:36:47 -05:00
Kir Kolyshkin
99136fbc4c test/e2e: fix 'block all syscalls' seccomp for runc
Error messages between runc and crun are not synchronized, and
in some case exit codes can be different, too.

Commit dd1bcabae9 ("CI: use local registry, part 2 of 3: fix tests")
removed the special case handling for runc from the
"podman run --seccomp-policy image (block all syscalls)"
test case, and so it fails, for example, like this:

	  Error: failed to connect to container's attach socket: /tmp/podman-e2e-2877753109/subtest-1698249469/p/root/overlay-containers/62585e98da7dc3fdb32d3b6de0980c762a8a6cde008ed35c68727fb97f5369c7/userdata/attach: no such file or directory
	  [FAILED] Command exited with status 127 (expected 126)

or this:

	  time="2025-08-29T17:16:52-07:00" level=error msg="cannot start a container that has stopped"
	  Error: `/usr/bin/runc start 63ce789f7037d9545cde832d29343704cab842e7288046407d0efa347d5ecb77` failed: exit status 1
	  [FAILED] Command exited 126 as expected, but did not emit 'OCI runtime error: runc: read from the init process'

(depending on runc version, phase of the moon etc.)

We can not reasonably expect a specific error message and exit code in
such an unusual scenario, but let's try.

With this commit, the above test passes successfully on my machine.

Tested with:

	make localintegration FOCUS="block all syscalls" OCI_RUNTIME=/usr/local/bin/runc
	make remoteintegration FOCUS="block all syscalls" OCI_RUNTIME=/usr/local/bin/runc

While at it, simplify the error message check for crun (we don't have to
check for the entire message, [the same] substring is fine for both
local and remote cases).

Fixes: dd1bcabae9 ("CI: use local registry, part 2 of 3: fix tests")
Reported-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-02-06 15:36:47 -05:00
Lewis Denny
f76be2a94d [play_kube] Add validation to container image field
Fixes: #27784

Signed-off-by: Lewis Denny <lewisdenny@me.com>
2026-02-06 15:36:47 -05:00
Ricardo Branco
b4202348ad test: Fix PODMAN_BATS_LEAK_CHECK
This variable is set by hack/bats and it fails if PODMAN_CMD is unset.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-06 15:36:47 -05:00
Paul Holzinger
763b7b3821 test/system: fix log timestamp work around
We have the full nanosecond precision now also in the remote API after
commit 60a5a476d5.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-06 15:36:47 -05:00
Ricardo Branco
b847c344f6 test: Fix --hostuser octal UID test flakiness
The test for issue #19800 depended on finding a system user with an
octal UID. This approach was fragile because system users found on the
host may have a different UID in the testing image.

Use the rootless user ID instead which is likely to be octal anyway as
new user IDs start with 1000.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-06 15:36:47 -05:00
Ricardo Branco
2f348b3c19 test/e2e: Skip privileged container test if NoNewPrivs is set
On systems with NoNewPrivs set, this test fails.
https://www.thkukuk.de/blog/no_new_privs/

Signed-off-by: Ricardo Branco <rbranco@suse.de>
2026-02-06 15:36:47 -05:00
Anders F Björklund
abc9a6ff29 Don't assume v1.41 is the default docker
The test was assuming v1.41, set v1.40 explicitly for the call.

And assume that the default version is using the newer syntax.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2026-02-06 15:36:47 -05:00
Anders F Björklund
d93268f286 Bump Compat API version to supported v1.44
All API versions before version 1.44 are now deprecated,
starting with Docker client version 1.29 giving an error:

"API version 1.41 is not supported by this client"

Previously it was backward-compatible for more than 10 years,
with version 1.24 being the version in classic Docker 1.12.

It seems like API code changes were already added?

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>

<MH: Resolved cherry-pick conflict in tests>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-06 15:36:47 -05:00
MayorFaj
8eacbd8464 fix: correct env/envFrom precedence in kube play
Fixes: #27287

Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-06 13:46:37 -05:00
Mayowa Fajobi
eb118bafb4 Fix healthcheck argument with spaces split in Docker API (#27818)
Fixes: #26519

Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-06 13:46:37 -05:00
Danish Prakash
d941f62082 secrets/create: remove pipe check and allow interactive stdin
Previously, `secret create` required stdin to be a pipe when using `-`,
blocking interactive stdin forcing users to use insecure patterns like
`echo "secret" | podman secret create <name>`.

Remove the pipe check to allow interactive stdin.

Closes #18591, #27879

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-02-06 13:46:36 -05:00
shiavm006
e1408e5a35 Fix container export emitting incorrect event type.
Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2026-02-06 13:46:36 -05:00
givensuman
0747179589 Add AppArmor key to quadlet .container files
Fixes: #27095
Signed-off-by: givensuman <givensuman@duck.com>
2026-02-06 13:46:36 -05:00
MayorFaj
f111cedfce fix(logs): enhance timestamp format to include timezone in logs
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-06 13:46:36 -05:00
MayorFaj
dac1e82710 fix(logs): add tests for nanosecond precision in log timestamps
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
2026-02-06 13:46:36 -05:00
Colin Walters
06fe9b21c1 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>
2026-02-06 13:46:36 -05:00
Paul Holzinger
17d7be80c9 test/system: remove apk from build
We do not use that package that we install for the test anyway and doing
this networking connection is causing heavy flakes at the moment.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-06 13:46:36 -05:00
Winter M
ac22866156 libpod: fix healthchecks not executing every interval on linux
By default, systemd sets a limit of how many times a service can start,
which means that if you have a healthcheck that runs more often than the
limits, systemd will refuse to start it with a message like "Start request
repeated too quickly." emitted to the journal.

Signed-off-by: Winter M <winter@antithesis.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-06 13:46:36 -05:00
Vasileios Anagnostopoulos
fcaf1300d7 fix: skip execution of probes when initialDelaySeconds is not elapsed
According to the [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes)
the probes should be executed after the `initialDelaySeconds`. So to be
consistent with the kubernetes specs, skip the execution of the probes until
the `initialDelaySeconds` is elapsed.

Closes #27678

Signed-off-by: Vasileios Anagnostopoulos <anagnwstopoulos@hotmail.com>
2026-02-06 13:46:36 -05:00
Paul Holzinger
b81c17090d
Merge pull request #27804 from Honny1/dev/v5.8/jrodak/local-api-artifact-add
[v5.8] Artifact add optimization on macOS and Windows
2026-02-06 17:46:41 +01:00
Paul Holzinger
efff41698b
test/buildah-bud: skip failed remote test
This test does not work due its use of /proc/pid/fd which we cannot tar.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-02-06 16:40:42 +01:00
Matt Heon
b320fbcaff Add migration code for BoltDB to SQLite
This is gated behind a new option in `podman system migrate`,
`--migrate-db`.

The basic logic is simple:
* Podman is already configured to use BoltDB
* Open a new, fresh SQLite database to write into
* Migrate all database contents as they exist in BoltDB, to
  SQLite.
** Do this as simply as possible: grab the object from the old DB
   and write it into the new DB using the standard Add and Save
   functions.
* Set the new database in the Runtime, close the old one.
* Move the old database file so it won't be reused
* Show a warning if the user explicitly configured BoltDB in
  containers.conf

Our ability to test complex migration scenarios is limited, but
this should handle simple migrations easily.

Fixes #27628

Signed-off-by: Matt Heon <matthew.heon@pm.me>
2026-02-05 20:09:37 -05:00
Matt Heon
4fdb90e02c Deterministically order pod inspect fields
There are two fields I'm worried about: shared namespaces and pod
containers. Both are generated via loops over maps and are thus
non-deterministic in ordering. Throw a sort on each to fix the
order so we can actually diff `podman pod inspect` output.

Signed-off-by: Matt Heon <mheon@redhat.com>
2026-02-05 14:15:29 -05:00
Jan Rodák
3918d4ca75
[v5.8] Require absolute path for local API
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit 2f7094c0de)
2026-02-05 19:33:51 +01:00
Jan Rodák
6465c07d21
[v5.8] Add local artifact add API endpoint
Fixes: https://issues.redhat.com/browse/RUN-3385
Fixes: https://github.com/containers/podman/issues/26321

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit 91af437471)
2026-02-05 19:33:46 +01:00
Nicola Sella
bae88e1e5e
Add GET /quadlets/{name}/exists
Fixes: https://issues.redhat.com/browse/RUN-4068

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:56:03 +01:00
Nicola Sella
d6023e431f
Add DELETE /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3742

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:55:46 +01:00
Nicola Sella
f2fcc7f09c
Add POST /libpod/quadlets
Fixes: https://issues.redhat.com/browse/RUN-3743

Signed-off-by: Nicola Sella <nsella@redhat.com>
2026-02-05 14:53:34 +01:00