Commit Graph

24671 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] a9b28bd6f6
Merge pull request #25551 from Luap99/packit-arch
[skip-ci] packit: fix missing fedora arches
2025-03-14 10:26:38 +00:00
openshift-merge-bot[bot] d1d8f3334f
Merge pull request #25520 from Honny1/fix-hc-inf-log
Fix HealthCheck log destination, count, and size defaults
2025-03-13 18:59:34 +00:00
openshift-merge-bot[bot] 79e05ca199
Merge pull request #25575 from giuseppe/test-not-safe-for-parallel
libpod: improve createRootlessContainer
2025-03-13 17:35:40 +00:00
openshift-merge-bot[bot] 0e94821ba1
Merge pull request #25573 from Luap99/minor-fixes
Some minor follow up fixes from PR comments
2025-03-13 17:16:11 +00:00
Giuseppe Scrivano a2953dad10
libpod: improve createRootlessContainer
do not run the expensive pmount.GetMounts() function if it is not
needed.

As a follow-up for commit c9c44d400c, do
not restore the propagation flag for the parent mount to shared unless
it was changed to slave first.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-03-13 16:55:11 +01:00
Paul Holzinger a1008a1294
libpod: add missing return in WaitForConditionWithInterval()
AS pointed out by Valentin on #25491, it is not an actual bug but this
is makes it more clear how it works and should not confuse readers why
this case has no return.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-13 14:10:33 +01:00
Paul Holzinger 5207feebd4
pkg/domain/infra/abi/play.go: fix one comment
It did start there, as pointed out by Ygal on #25481.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-13 14:08:48 +01:00
Paul Holzinger 94cacea064
docs: fix some minor issues
As pointed out by Tom on the PR #25397.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-13 14:06:20 +01:00
openshift-merge-bot[bot] 6e34514553
Merge pull request #25397 from Luap99/artifact-mount
add artifact mount support
2025-03-13 12:53:34 +00:00
openshift-merge-bot[bot] ff20289d24
Merge pull request #25550 from containers/renovate/setuptools-75.x
chore(deps): update dependency setuptools to ~=75.9.1
2025-03-13 10:43:02 +00:00
Jan Rodák fff42ac232
Fix HealthCheck log destination, count, and size defaults
GoLang sets unset values to the default value of the type. This means that the destination of the log is an empty string and the count and size are set to 0. However, this means that size and count are unbounded, and this is not the default behavior.

Fixes: https://github.com/containers/podman/issues/25473
Fixes: https://issues.redhat.com/browse/RHEL-83262

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-03-12 21:27:00 +01:00
renovate[bot] 18abb18c9a
chore(deps): update dependency setuptools to ~=75.9.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-12 19:03:18 +00:00
Paul Holzinger c05908a7f6
libartifact: NewArtifactStore() reject relative paths
The oci layout code can handle a relative path find but all paths
returned by the code then will alos be relative, this can be bad and
result in bugs if something ever changes the cwd. The graphroot path we
pass should already be always absolute, so just add a sanity check here
given libartifact is planned to be moved as sperate lib and we cannot
assume anything about the path we will be given there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:15 +01:00
Paul Holzinger 9e94dc53b2
add new artifact mount type
Add a new option to allow for mounting artifacts in the container, the
syntax is added to the existing --mount option:
type=artifact,src=$artifactName,dest=/path[,digest=x][,title=x]

This works very similar to image mounts. The name is passed down into
the container config and then on each start we lookup the artifact and
the figure out which blobs to mount. There is no protaction against a
user removing the artifact while still being used in a container. When
the container is running the bind mounted files will stay there (as the
kernel keeps the mounts active even if the bind source was deleted).
On the next start it will fail to start as if it does not find the
artifact. The good thing is that this technically allows someone to
update the artifact with the new file by creating a new artifact with
the same name.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:14 +01:00
Paul Holzinger f6e2d94409
test/e2e: improve createArtifactFile()
There is no need whatsoever to run container to populate a random file,
this is just much slower than just writing some random bytes directly
without having to run a container and run dd in it.

Also the function accepted the number of bytes, however because dd uses
a minimum block size of 512 bytes it was actually numBytes * 1024 which
where written. That makes no sense so fix the two tests that depended on
the wrong number.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:14 +01:00
Paul Holzinger fe82fa85d2
pkg/specgenutil: rework volume/mount parsing
Use a helper struct to hold the mounts instead of returning 5+ return
values from the functions. This allows use to easily add more volume
types without having to update all return lines every time in the
future. And 5+ return values are really not readable anymore so this
should make it easier to follow the code.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:14 +01:00
Paul Holzinger 590bf8b79d
pkg/specgenutil: unexport Mounts()
The function is never used elsewhere so do not export it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:14 +01:00
Paul Holzinger 51cfcc65d5
correctly preallocate artifactDigests in ArtifactRm()
Will safe a few memory copies, we must do that only after namesOrDigests
was populated so the len() does not report zero.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:14 +01:00
Paul Holzinger b232ea3d18
create artifact store in the libpod runtime
Instead of duplicating the NewArtifactStore() call in many places and
having to make sure we always pass the same path to it define it as
function on the runtime. This allows any caller with access to the
libpod runtime to create the store easily.

This is suing a sync.OnceValues() function so the store is initialized
only once and only when actually needed.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:13 +01:00
Paul Holzinger 7c200a5f4c
libartifact: add BlobMountPaths()
The goal of this new interface is to expose the blob source path and the
target file name for a bind mount into a container.

libpod will call this and then take care of setting up the actual mounts
based on the returned paths.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:13 +01:00
Paul Holzinger 86a6539b76
libartifact: extract common code into helper
Create a getArtifactAndImageSource() function so this one can be shared
with the new mount blob API that is added next to avoid code
duplication.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:13 +01:00
Paul Holzinger 4cd19b7f7a
libartifact: fix comment on Extract()
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:13 +01:00
Paul Holzinger 618e37794e
libartifact: create FilterBlobOptions
The main point of this is so that I can share the same lookup logic
between Extract() and then the new blob path API I add next.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 19:42:13 +01:00
openshift-merge-bot[bot] 07c1f0b996
Merge pull request #25553 from l0rd/fix-latest-win-installer-download
Windows installer test: hardcode the ID of the latest GH release
2025-03-12 18:38:44 +00:00
openshift-merge-bot[bot] 9573519cca
Merge pull request #25452 from ygalblum/quadlet-warning-messages
Quadlet warning messages
2025-03-12 17:35:29 +00:00
Mario Loriedo 91072dc940 Win installer test: hardcode latest GH release ID
To avoid problems when automatically downloading
`latest` podman windows installer (e.g. the windows
installer hasn't been included in the GH release
because of a problems with the keys to sign it), we
are now hardcoding the version of Podman that is
used to test the upgrade from latest to current
version.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-03-12 17:44:26 +01:00
openshift-merge-bot[bot] 3e16ddc5e3
Merge pull request #25549 from lsm5/packit-git-commit-fix
[skip-ci] Packit: Fix action script for updating upstream commit id in rpm spec
2025-03-12 15:27:39 +00:00
Paul Holzinger 82426caf8a
packit: fix missing fedora arches
Silly mistake on my end, of course we want to build on both arches.

Fixes: 9eb4d27c5c ("packit: only build F41+")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-12 15:12:29 +01:00
openshift-merge-bot[bot] d9d8aa49bd
Merge pull request #25533 from Luap99/main-crypto
Update CI to go1.23 and golang.org/x/crypto v0.36.0
2025-03-12 13:32:07 +00:00
Lokesh Mandvekar 6ea7b192fa
[skip-ci] Packit: Fix action script for fetching upstream commit
This fixes multiple trailing quotes after the commit and also ensures
the older commit id will be correctly replaced by the newer id.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-03-12 17:37:12 +05:30
openshift-merge-bot[bot] 5eeaa43728
Merge pull request #25518 from Luap99/docker-v28
update docker to v28 and c/{common,image,storage} to main
2025-03-11 17:44:26 +00:00
openshift-merge-bot[bot] c6ab079e06
Merge pull request #25504 from Honny1/sys-reset-podman-socket
Fix `podman system reset` deletes the `podman.sock`
2025-03-11 17:39:17 +00:00
Paul Holzinger 9eb4d27c5c
packit: only build F41+
F40 stil has go 1.22 but we need to support go 1.23 now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 17:21:28 +01:00
Paul Holzinger 56e62948f7
go1.23: use std maps package
With go 1.23 the maps package was added in the std library. The linter
now wants us to use that. However the API chnaged as it returns an
iterator, thus we also have to use slices.Collect().

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 17:21:24 +01:00
Paul Holzinger b23249635d
vendor: bump to golang.org/x/crypto@v0.36.0
Fixes: CVE-2025-22869
Fixes: https://issues.redhat.com/browse/RHEL-81326
Fixes: https://issues.redhat.com/browse/RHEL-82777

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 16:57:35 +01:00
Paul Holzinger 05fc9d2d6b
cirrus: test only on f41/rawhide
Like commit d03e8ffc56, we need to bump to go 1.23 to get some
dependency updates for CVE fixes.

Thus it will no longer build/test on F40, however F40 might get
rebased to go 1.23 soon then we can revert this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 16:55:33 +01:00
Paul Holzinger f2606c4230
fix deprecated docker v28 types
A lot of types are moved and now deprecated which causes lint issues.

IDResponse is copied into podman because that has no new 1 to 1
replacement. For some fields that we set as part of the docker API I
added the nolint directive as these fields might be used by API
consumers.

For the other types it is mostly a 1 to 1 move.

ParseUintList is deprecated but we can use the same function from
github.com/containers/storage/pkg/parsers instead.

Note that it containers breaking changes to pkg/bindings which we should
not do generally but given the prevoius commit already has a unavoidable
breaking change we might as well fix the IDResponse issue once now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 16:24:34 +01:00
Paul Holzinger 91a08235d1
vendor: update docker v28 and c/{common,image}
Update to the latest c/{common,image} which inclused an update to
docker v28, that update is NOT backwards compatible so I had to fix a
few types.

NOTE: handler.ExecCreateConfig is used directly by the bindings. Thus
this is an API break for pkg/bindings. Including docker types as part of
any stable pkg/bindings API was a very bad idea.

I see no way to avoid that unless we never want to docker v28, which is
not easy as the update comes in from c/image and maybe other packages.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 16:24:14 +01:00
openshift-merge-bot[bot] 264c8da0b9
Merge pull request #25501 from evidolob/update-gvisor
update gvproxy version to 0.8.4
2025-03-11 13:53:55 +00:00
openshift-merge-bot[bot] 47003f76db
Merge pull request #25528 from giuseppe/fix-mount-leak
update c/storage
2025-03-11 13:05:35 +00:00
Giuseppe Scrivano 2ffb3a19b3
vendor: update c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-03-11 11:03:41 +01:00
Giuseppe Scrivano c9c44d400c
libpod: do not cover idmapped mountpoint
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-03-11 11:03:41 +01:00
Yevhen Vydolob 48662fa32b update gvproxy version to 0.8.4
The 0.8.4 has one important fix[1], which could improve #25121.
Also it set all places to use same version of gvisor-tap-vsock
[1]https://github.com/containers/gvisor-tap-vsock/issues/474

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2025-03-11 09:51:52 +02:00
Jan Rodák 41924f870f
Prevents removal of `podman.sock` file using `podman system reset` command
The `podman system reset` removes the `RunDirectory` directory as part of the machine reset, where `podman.sock` is usually stored.

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

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-03-10 18:44:15 +01:00
Ygal Blum 02658bc4cc Quadlet - Propagate warnings and print errors and warnings as they occur
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2025-03-10 11:51:32 -04:00
openshift-merge-bot[bot] d39806258a
Merge pull request #25508 from Luap99/docs-machine-update
docs: update how the machine os is upgraded
2025-03-10 13:35:51 +00:00
Paul Holzinger 73799672cf
docs: update how the machine os is upgraded
Fixes: #22678

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-10 11:47:07 +01:00
openshift-merge-bot[bot] ac3074e90e
Merge pull request #25485 from danegsta/danegsta/cpwindows
Don't try to resolve host path if copying from stdin
2025-03-09 18:14:52 +00:00
openshift-merge-bot[bot] 2077faaf8f
Merge pull request #25466 from baude/issue18230
Do not allow mounting to machine dir /tmp
2025-03-09 05:00:08 +00:00
openshift-merge-bot[bot] b0077e0981
Merge pull request #25507 from Luap99/cirrus-rerun
.github: remove cirrus rerun action
2025-03-07 19:07:51 +00:00