7285 Commits

Author SHA1 Message Date
54e075326a Merge pull request #26683 from TomSweeneyRedHat/dev/tsweeney/skip_diff_tests
Skip rather than comment bad diff tests
2025-07-28 14:11:09 +00:00
81d6d90195 Improve handling of --publish and incompatible NetNS modes
Handling is improved by:
- Inverting detection logic so all incompatible NetNS modes that can't be used with
the `--publish` option will now print a warning to the user.
- Updating the --publish documentation
- Extract detection logic out to it's own function with a note to keep
  docs in sync.

Note: path mode was added after this warning logic was added:
- https://github.com/containers/podman/pull/8230
- https://github.com/containers/podman/pull/16386

Relates-to: https://github.com/containers/podman/issues/26663

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-07-28 20:20:05 +10:00
426e787beb Fix (podman artifact push --creds)
Actually use the parsed values.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-07-25 22:33:39 +02:00
7f2908afcf podman: add --creds and --cert-dir to create/run
Add --creds flag to podman create and podman run commands to support
registry authentication during image pulling.

Without this flag, users must perform a separate `podman pull
--creds/--cert-dir` first and then remember to specify `--pull=never`.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-07-25 17:45:23 +02:00
dcd187946d Skip rather than comment bad diff tests
I hastily commented out some tests that were problematic
for the vendor of Buildah v1.41 into Podman main (5.6 to be)
in #26666.

@luap99 noted that I should have skipped them, this PR removes
the comments and puts the Skip into play.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-24 09:26:56 -04:00
eabb64ddaf Merge pull request #26666 from TomSweeneyRedHat/dev/tsweeney/buildah_v1.41.0
Bump Buildah to v1.41.0
2025-07-24 12:24:28 +00:00
12b7a334ae Merge pull request #26628 from 2004joshua/build_context
Feat: send additional build contexts as tar files for remote builds
2025-07-24 11:04:32 +00:00
f3e3aace95 Temp fix for #26680
Comment out the problematic "podman diff container and image with same name" test
in test/e2e/diff_test.go.  This became a problem with Buildah v1.41 and
if possible, should be addressed by Podman v5.6 final.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 20:51:55 -04:00
6aa70f07c2 Update "podman diff container and image with same name" e2e test
Update the "podman diff container and image with same name" e2e test to
not expect a built image to include /etc, since newer buildah won't
include an item in a layer if it was only created in a rootfs in order
to have something mounted onto it while processing a RUN instruction.
A few exceptions are still made for the sake of conformance tests.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:57:48 -04:00
7bc9691045 buildah-bud tests: handle "-t oci:" and such, skip a new --output
Teach our patched version of run_buildah() to notice when a build tries
to write the output image to an oci:/oci-archive:/docker-archive:/dir:
location, and for those cases, adjust the command to commit the image to
local storage and then copy it to the desired location.

It's a hack on top of a hack.  I don't love it, but here we are.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:56:08 -04:00
73f3e98947 Feat: send additional build contexts for remote builds
Fixed the --build-context flag to properly send files for remote builds. Previously
only the main context was sent over as a tar while additional contexts were passed as
local paths and this would cause builds to fail since the files wouldn't exist.

New changes modifies the Build API to use multipart HTTP requests allowing multiple
build contexts to be used. Each additional context is packaged and
transferred based on its type:
- Local Directories: Sent as tar archives
- Git Repositories: link sent to the server where its then cloned
- Container Images: Image reference sent to the server, it then pulls the image there
- URLs/archives: URL sent to the server, which handles the download

Fixes: #23433

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
2025-07-23 11:34:38 -04:00
97103ffef5 Add Buildah build's passwd test helper
Add the passwd test helper used by Buildah's build
test system.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
cfdf27b350 test/system: add quadlet drop-in regression test for subdirs
Test to ensure subdir overwrites work correctly, see #26555.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-22 16:34:37 +02:00
051676bc97 Merge pull request #26330 from flouthoc/quadlet-work
Add support for `podman quadlet`
2025-07-21 12:36:48 +00:00
f293c1a179 Initial implementation of podman quadlet commands
This adds `podman quadlet list`, `podman quadlet install`,
`podman quadlet rm` and `podman quadlet print`.

Signed-off-by: Matt Heon <mheon@redhat.com>
Co-authored-by: flouthoc <flouthoc.git@gmail.com>
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-07-18 13:57:11 -07:00
c1cf4b0d89 podman rm: handle case where conmon was killed
When conmon was killed podman rm -f currently fails but running it again
then works which doesn't really makes sense. We should properly remove
the contianer even if conmon is dead.

In fact the code already handles ErrConmonDead as stop error when we
remove the container but this error was never thrown anywhere. To fix
this throw ErrConmonDead instead of ErrInternal because that is not an
intenral error if something else killed conmon.

With this we can correctly cleanup and remove the container. The fact
that this works on the first try is important for quadlet units as they
only run the ExecStopPost= command once to remove it.

Fixes: #26640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
8b1f06bf8f podman inspect: fix error difference between local and remote
There is no reason for local and rmeote to use a different error that
just differs in quoting. Make them consitent to simplify the tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
f3761f97d1 Merge pull request #26619 from Craig-Spencer-12/exec-pid-leak-test
Fix test that checks for podman exec leaks
2025-07-15 09:38:01 +00:00
6b9a3066b6 Merge pull request #26631 from Luap99/autoupdate-error
podman auto-update: include container in invalid policy message
2025-07-14 17:34:37 +00:00
55296e1c44 Fix test that checks for podman exec leaks
Updated helper function "find_exec_pid_files" and called it the "podman exec - leak check" test.

Fixes: #26616

Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-14 12:18:17 -04:00
b05b9d043d Merge pull request #26533 from ArthurWuTW/26506
volume export: refuse to write to terminal (TTY)
2025-07-14 15:58:56 +00:00
b48eb6e2fb volume export: refuse to write to terminal (TTY)
Prevent `podman volume export` from showing raw tar contents directly to the terminal (STDOUT). If not redirected and without output flag, error message is expected.

Fixes: #26506

Signed-off-by: Arthur Wu <lion811004@gmail.com>
2025-07-14 10:20:22 -04:00
e55270a51a podman auto-update: include container in invalid policy message
I noticed recently when I made a typo that then auto-update errored but
it did not tell me which container was incorrect so I had to check all
containers myself. Include the container ID in the error to make it
clear which container has the issue.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-14 14:34:22 +02:00
4bc22a4b3c Update module github.com/go-viper/mapstructure/v2 to v2.3.0 [SECURITY]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 12:31:17 +00:00
c305a932cc Merge pull request #26609 from Luap99/bindings-fixes
pkg/bindings/containers: some attach/logs handling fixes
2025-07-11 14:16:31 +00:00
e28445e9da Merge pull request #26575 from ypu/journalctl
System tests: Update the journalctl function to ignore No entry message
2025-07-11 13:36:54 +00:00
d07dd054df Merge pull request #26607 from ygalblum/quadlet-image-pull-policy
Quadlet - add support for the Policy key for .image files
2025-07-11 08:13:38 +00:00
047d231008 test/e2e: podman update make env check stricter
We don't need a tty here and then we are able to check for the
exact output.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-10 19:57:16 +02:00
439448c287 Quadlet - add support for the Policy key for .image files
Resolves: #26446

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-07-10 13:06:38 -04:00
5e44c17309 Clarifies error message when using an improperly formatted secret with kube
Fixes: #26586

Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-10 12:19:28 -04:00
c735f8e237 Update the journalctl function to ignore No entry message
For currently version of journalctl, --user option only works when
the persistent storage is enabled. So we need to check this option
before we use it. Otherwise a set of tests will failed with can
not find expected output from journalctl with rootless user.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2025-07-08 20:29:32 +08:00
cd807f8ff6 Quadlet - print warning when fail to parse
Fixes: #26542

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-07-07 14:49:32 -04:00
c8272b23a5 Merge pull request #26552 from AgentEpsilon/quadlet-service-unsupported-keys
Quadlet - Error when units define User, Group, or DynamicUser in Serv…
2025-07-04 14:56:04 +00:00
00c431c3ca Merge pull request #26238 from ArthurWuTW/26102
tmpfs: Add support for noatime mount option
2025-07-04 10:55:02 +00:00
13816eb86f Fix podman inspect to correctly handle log_size_max
When generating Conmon's command line, we read containers.conf to
get log_size_max and used it if the container didn't override it.
However, `podman inspect` only reads from the container's own
config, and ignores containers.conf. Unify the way we determine
maximum log size with a single function and use it for both
inspect and containers.conf, and add a test for this behavior.

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

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-07-03 16:04:48 -04:00
31b4efcaec warn instead of error, lift logic to main.go
Signed-off-by: Evan Miller <miller.evan815@gmail.com>
2025-07-02 18:23:00 -07:00
2a6f190e8f Merge pull request #26540 from cevich/add_release_test
Add conditional release-checking system test
2025-07-02 12:34:47 +00:00
4b1f7bcb9a Quadlet - Error when units define User, Group, or DynamicUser in Service group
Fixes: #26543

Signed-off-by: Evan Miller <miller.evan815@gmail.com>
2025-07-02 00:34:46 -07:00
72393c1c53 Merge pull request #26522 from ygalblum/quadlet-pod-service-environment
Quadlet - Do not override existing Environment in Service group for Pod units
2025-07-01 19:25:06 +00:00
62bfeb5d88 Add conditional release-checking system test
Unfortunately on a number of occasions, Podman has been released
officially with a `-dev` suffix in the version number.  Assist in
catching this mistake at release time by the addition of a simple
conditional test.  Note that it must be positively enabled by a
magic env. var. before executing the system tests.

Also (thanks to @lsm5) update the TMT test to trigger the new
condition for future Fedora releases.

Signed-off-by: Chris Evich <cevich@redhat.com>
2025-06-30 11:28:32 -04:00
43b74b1754 Merge pull request #26322 from NotSoFancyName/issue-26247
quadlet: handle generate environment params that inherit from host
2025-06-30 11:44:33 +00:00
f1a1948b23 Quadlet - Do not override existing Environment in Service group for Pod units
Fixes: #26521

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-06-27 09:56:43 -04:00
09caf60687 remove test/framework/framework.go
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-26 19:37:16 +02:00
494287518b Merge pull request #26467 from ygalblum/secret-create-ignore
Secret create - add ignore option to allow noop
2025-06-26 15:25:52 +00:00
8761b67ca5 Merge pull request #26513 from Luap99/dns-flake
test/e2e: fix podman run check dns flake
2025-06-26 13:09:05 +00:00
683e9b2c94 Merge pull request #26434 from mheon/import_export
Add remote support for `podman volume import` and `podman volume export`
2025-06-25 19:48:14 +00:00
b5783ae1fb test/e2e: fix podman run check dns flake
For unknown reasons systemd-resolved sometimes responds with NXDOMAIN
instead REFUSED which it seems to use by default for a local name
without domain part. So the fact that this works at all right now is
super weird.

In any case we just want to make sure the name did not get resolved so
allow both here to fix the flake.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-25 16:58:10 +02:00
7780e28b45 Merge pull request #26491 from ArthurWuTW/25389
Pod YAML: Add support for `lifecycle.stopSignal`
2025-06-24 19:44:30 +00:00
bfc327a08e Secret create - add ignore option to allow noop
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-06-24 15:43:38 -04:00
1f1618fcb0 Merge pull request #26478 from ygalblum/pull-with-policy
Podman pull - add policy flag
2025-06-24 18:54:26 +00:00