Commit Graph

7032 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] 0a0d05b3e3
Merge pull request #25781 from kolyshkin/rm-goimports
Use golangci-lint fmt for pkg/bindings
2025-04-04 09:38:25 +00:00
openshift-merge-bot[bot] 76eea47fb3
Merge pull request #25743 from kolyshkin/freebsd-golangci-lint
Add freebsd golangci lint run; fix remaining freebsd warnings
2025-04-03 18:30:54 +00:00
Kir Kolyshkin 9d4e820264 Use golangci-lint fmt for pkg/bindings
golangci-lint v2 introduced a new command, fmt, which runs configured
formatters (see formatters in .golangci.yml).

Use this for generated files. Drop separate goimports binary.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-03 10:41:14 -07:00
Jan Rodák b5a1b512c9
Fix overwriting the Healthcheck configuration from the image
If the --health-cmd flag is not specified, other flags such as --health-interval, --health-timeout, --health-retries, and --health-start-period are ignored if the image contains a Healthcheck. This makes it impossible to modify these Healthcheck configuration when a container is created.

Fixes: https://github.com/containers/podman/issues/20212
Fixes: https://issues.redhat.com/browse/RUN-2629

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-04-03 15:52:05 +02:00
openshift-merge-bot[bot] 61693432e6
Merge pull request #25732 from kolyshkin/ginkgo
test/tools/vendor: drop ginkgo
2025-04-03 13:21:43 +00:00
Jan Kaluza 9277643ead Set the IDMappings also when RootfsOverlay is used.
This is related to #23292 and is needed to replace
pause image container with pause container based
on the rootfs.

Without this change, the GIDs and UIDs are not mapped
in the rootfs container which use overlay if --userns=auto
is used. This leads to an error mounting /dev/pts with gid=5,
becuase GID 5 simply does not exist in the pause container
using rootfs.

All the tests pass with this change, but I have to admit
I did not find out why the original code has been introduced.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-04-03 11:55:45 +02:00
Kir Kolyshkin c6189c5b51 test/checkseccomp: add linux build tag
This is a linux-only binary.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
xixishidibei 040385ef9b chore: fix function name in comment
Signed-off-by: xixishidibei <xixishidibei@outlook.com>
2025-04-02 21:26:27 +08:00
David Negstad 684126e426 Suppress failing bud tests in remote
Signed-off-by: David Negstad <David.Negstad@microsoft.com>
2025-04-01 14:54:34 -07:00
Kir Kolyshkin 275e77d1fa test/tools/vendor: drop ginkgo
It appears[1] that ginkgo binary can be easily built from the top-level
vendor, so it does not make sense to have a second copy in test/tools
(and a hassle of keeping the two in sync).

Inspired by [1], [2], and a run of make localtest, which shows:

> Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
>   Ginkgo CLI Version:
>     2.22.1
>   Mismatched package versions found:
>     2.23.3 used by podman, common, containers, parse, quadlet, rootlessport, abi, tunnel, libpod, events, file, shm, logs, annotations, libpod, utils, apiutil, auth, ctime, abi, expansion, utils, emulation, env, errorhandling, machine, compression, connection, define, ocipull, provider, proxyenv, qemu, command, shim, vmconfigs, rootless, signal, specgen, generate, kube, specgenutil, systemd, generate, notifyproxy, parser, timetype, trust, util, utils

[1]: af29bb5b6e (r2020246403)
[2]: e6c7ec94e2 (r2020230241)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-01 14:24:41 -07:00
Kir Kolyshkin 4eb75f68cf test/e2e: fix unused linter warning
This is shown when golangci-lint is run with --tests=false

> test/e2e/config.go:7:2: var fedoraMinimal is unused (unused)
> 	fedoraMinimal     = "quay.io/libpod/systemd-image:20240124"
> 	^
> test/e2e/config.go:18:2: var volumeTest is unused (unused)
> 	volumeTest        = "quay.io/libpod/volume-plugin-test-img:20220623"
> 	^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:30:43 -07:00
Kir Kolyshkin 91113c46ef test/utils: suppress ST1001 warnings
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 0f975f8526 ci: rm allow-unused from nolintlint settings
This was added by commit 84e42877a ("make lint: re-enable revive"),
making nolintlint became almost useless.

Remove the ungodly amount of unused nolint annotations.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin cc4d904dd2 Fix QF1012 staticcheck warnings
> QF1012: Use fmt.Fprintf(...) instead of WriteString

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin f4f2580b0d ci: remove stylecheck linter
It is to be merged into staticcheck linter in golangci-lint v2.0.0.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
Kir Kolyshkin 0105131b5c Fix QF1003: could use tagged switch" staticcheck warning
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
renovate[bot] 0b1d3a963d
chore(deps): update dependency setuptools to v78
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 16:35:29 +00:00
openshift-merge-bot[bot] c6ce475e28
Merge pull request #25735 from Luap99/cdi-compose
test/compose: use --cdi-spec-dir not /etc/cdi
2025-03-31 16:01:40 +00:00
Paul Holzinger f07a95da0e
test/compose: use 4 spaces indentation
For consistency.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-31 15:00:12 +02:00
Paul Holzinger 9f422e1a77
test/compose: use cdi option over mount
So that we don't have to overwrite a system dir and also can test
rootless.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-31 14:58:56 +02:00
Paul Holzinger 926ad1172e
test/compose: remove cni reference
CNI is not being tested here for a long time, use a more appropriate
directory name.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-31 14:58:56 +02:00
openshift-merge-bot[bot] 5bca94944d
Merge pull request #25707 from Luap99/logs
podman logs: allow options after argument
2025-03-31 12:53:16 +00:00
openshift-merge-bot[bot] 490eb476a8
Merge pull request #25717 from jankaluza/cdi-spec-dir
Add cdi-spec-dir option to top level options
2025-03-28 13:52:20 +00:00
openshift-merge-bot[bot] 4f7b95de54
Merge pull request #25718 from ricardobranco777/runc
test: Fix runc error message
2025-03-28 13:19:13 +00:00
openshift-merge-bot[bot] d842b145f7
Merge pull request #25699 from johnschug/main
quadlet: add support for the UpheldBy option in the Install section
2025-03-28 12:43:42 +00:00
Ricardo Branco 392a8f4ac5
test: Fix runc error message
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-03-28 12:53:42 +01:00
Micah Chambers (eos) dce36131ae Add cdi-spec-dir option to top level options.
This commit adds new --cdi-spec-dir global option. This
option is used to add additional CDI spec paths.

Signed-off-by: Micah Chambers (eos) <mchambers@anduril.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-03-28 11:24:57 +01:00
Paul Holzinger 4bea200b26
podman logs: allow options after argument
Do not use the interspersed option for logs, it is not needed and just
restricts valid use cases.

Fixes #25653

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-28 10:39:35 +01:00
John Schug a0cae65c13 quadlet: add support for the UpheldBy option in the Install section
This adds support for the UpheldBy option in quadlet files. The UpheldBy option
is the counterpart to the Upholds option added in systemd v249 and is
similar to the existing WantedBy and RequiredBy options.

See https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Upholds=.

Signed-off-by: John Schug <john.ips.schug@gmail.com>
2025-03-27 15:48:46 -07:00
axel7083 ea5ed2a875 fix: mounting issue with single character volume on windows
fixes https://github.com/containers/podman/issues/25218

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2025-03-26 17:57:52 +01:00
openshift-merge-bot[bot] cb2466004f
Merge pull request #25645 from jankaluza/24418
Add support for --pids-limit in podman kube play.
2025-03-26 16:15:45 +00:00
openshift-merge-bot[bot] f5ab9d1530
Merge pull request #25687 from giuseppe/reenable-vfs-test
fix idmapped mounts test failure on vfs
2025-03-26 13:44:17 +00:00
openshift-merge-bot[bot] a918c91678
Merge pull request #25512 from findesgh/feature/#21256-extend-cidfile-support
Feature/#21256 extend cidfile support
2025-03-26 13:03:35 +00:00
openshift-merge-bot[bot] d4cfceeda5
Merge pull request #25681 from Honny1/fix-container-clone-with-hc
Fix container clone with configured Healthcheck
2025-03-26 11:38:14 +00:00
openshift-merge-bot[bot] 8d693d60dc
Merge pull request #25675 from jankaluza/25109
Add support for Retry= and RetryDelay= to Podman Quadlet.
2025-03-26 11:19:00 +00:00
Giuseppe Scrivano 1f3347ff3c
test: re-enable idmapped mounts test on vfs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-03-26 12:11:11 +01:00
Jan Rodák f94d613556
Fix container clone with configured Healthcheck
Fixes: https://github.com/containers/podman/issues/21630
Fixes: https://issues.redhat.com/browse/RUN-2632

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-03-26 11:01:18 +01:00
Jan Kaluza f15b0887c7 Add support for pids-limit annotation for podman kube play.
This commit adds new annotation called:

io.podman.annotations.pids-limit/$ctrname

This annotation is used to define the PIDsLimit for
a particular pod. It is also automatically defined
when newly added --pids-limit option is used.

Fixes: #24418

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-03-26 10:06:56 +01:00
Jan Kaluza 08a1c6d91e Add support for Retry= and RetryDelay= to Podman Quadlet.
This commit adds new Retry= and RetryDelay= options
to quadlet.go which result in --retry and --retry-delay
usage in podman run, image and build commands.

This allows configuring the retry logic in the systemd
files.

Fixes: #25109

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-03-26 09:01:28 +01:00
openshift-merge-bot[bot] b58250b35d
Merge pull request #25664 from victortoso/add-kube-subpath
Add volume SubPath in generate kube
2025-03-25 14:33:10 +00:00
Victor Toso 321634d599 Add volume SubPath in generate kube
Trying to generate a Pod yaml file when we are using --mount with
SubPath does not generate a VolumeMount with SubPath. This patch fixes
that.

Note that kube play does support SubPath since 95cc7e052, see:
    https://github.com/containers/podman/pull/16803

Signed-off-by: Victor Toso <victortoso@redhat.com>
2025-03-25 11:59:21 +01:00
flouthoc 7ca96702ee
buildah-bud: skip bud-with-mount-cache-like-buildkit
Following test needs unique cache in TMPDIR so cache of this test does
not conflicts with other tests however for this specific test there is
no convenient way to pass custom TMPDIR.

Skipping this test similar to this already exists in tests/bud.bats but
covers `--mount=type=cache,sharing=locked`

Read more discussion here: https://github.com/containers/podman/issues/25414
Closes: https://github.com/containers/podman/issues/25414

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-03-24 19:28:06 -07:00
Martin Glatzle f1527283d6 Make exec support --cidfile.
Fixes: #21256

Signed-off-by: Martin Glatzle <findessp@yandex.ru>
2025-03-21 17:46:47 +01:00
openshift-merge-bot[bot] 7d3ee5a5cd
Merge pull request #25635 from giuseppe/mask-thermal-paths
Mask thermal paths
2025-03-21 14:44:32 +00:00
openshift-merge-bot[bot] b2285f6d46
Merge pull request #25626 from jankaluza/24875
Add --env and --unsetenv to podman update.
2025-03-21 13:52:17 +00:00
Giuseppe Scrivano 260035d069
vendor: update common and buildah
vendor the following dependencies:

- https://github.com/containers/common/pull/2375
- https://github.com/containers/buildah/pull/6074

Closes: https://github.com/containers/podman/issues/25634

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-03-21 14:36:00 +01:00
Jan Kaluza 701aade262 Add --env and --unsetenv to podman update.
The --env is used to add new environment variable to container or
override the existing one. The --unsetenv is used to remove
the environment variable.

It is done by sharing "env" and "unsetenv" flags between both
"update" and "create" commands and later handling these flags
in the "update" command handler.

The list of environment variables to add/remove is stored
in newly added variables in the ContainerUpdateOptions.

The Container.Update API call is refactored to take
the ContainerUpdateOptions as an input to limit the number of its
arguments.

The Env and UnsetEnv lists are later handled using the envLib
package and the Container is updated.

The remote API is also extended to handle Env and EnvUnset.

Fixes: #24875

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-03-21 13:15:44 +01:00
renovate[bot] 0ca539c3ab
chore(deps): update dependency setuptools to v77
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 17:05:33 +00:00
openshift-merge-bot[bot] 5c9fd29808
Merge pull request #25617 from giuseppe/use-securejoin-openinroot
container: replace code with securejoin.OpenInRoot()
2025-03-19 13:37:37 +00:00
openshift-merge-bot[bot] 0031c9500a
Merge pull request #25625 from giuseppe/set-additional-gids-exec
libpod: fix handling of additional gids in exec
2025-03-19 13:26:39 +00:00