Commit Graph

23915 Commits

Author SHA1 Message Date
Miloslav Trmač 1d7ec1ef5f Use the config digest to compare images loaded/pulled using different methods
Historically, non-schema1 images had a deterministic image ID == config digest.
With zstd:chunked, we don't want to deduplicate layers pulled by consuming the
full tarball and layers partially pulled based on TOC, because we can't cheaply
ensure equivalence; so, image IDs for images where a TOC was used differ.

To accommodate that, compare images using their configs digests, not using image IDs.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-22 19:36:02 +02:00
Miloslav Trmač bf8f2b5551 Simplify the additional store test
When looking up the current-store image ID, do that
from the same output where we verify that the ID is from the
current store, instead of listing images twice.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-22 19:15:46 +02:00
Miloslav Trmač 3bc6072142 Fix the store choice in "podman pull image with additional store"
The test got the stores RW status backwards.

Before zstd:chunked, both image IDs should be the same, so this used
to make no difference.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-22 19:15:46 +02:00
openshift-merge-bot[bot] 215543895d
Merge pull request #24339 from mheon/bump_530_rc1
Bump to v5.3.0-rc1
2024-10-22 15:41:56 +00:00
Matt Heon 6a11e75c48 Bump to v5.3.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-22 10:31:53 -04:00
Matt Heon d306e80127
Bump to v5.3.0-rc1
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-22 10:31:29 -04:00
openshift-merge-bot[bot] 678943d131
Merge pull request #24338 from mheon/quota_on_volume_root
Set quota on volume root directory, not _data
2024-10-22 14:16:41 +00:00
Matt Heon 23ab7b858a Set quota on volume root directory, not _data
This will appease the higher-level quota logic. Basically, to
find a free quota ID to prevent reuse, we will iterate through
the contents of the directory and check the quota IDs of all
subdirectories, then use the first free ID found that is larger
than the base ID (the one set on the base directory). Problem:
our volumes use a two-tier directory structure, where the volume
has an outer directory (with the name of the actual volume) and
an inner directory (always named _data). We were only setting the
quota on _data, meaning the outer directory did not have an ID,
and the ID-choosing logic thus never detected that any IDs had
been allocated and always chose the same ID.

Setting the ID on the outer directory with PROJINHERIT set makes
the ID allocation logic work properly, and guarantees children
inherit the ID - so _data and all contents of the volume get the
ID as we'd expect.

No tests as we don't have a filesystem in our CI that supports
XFS quotas (setting it on / needs kernel flags added).

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

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-22 08:49:56 -04:00
openshift-merge-bot[bot] beb35627a3
Merge pull request #24336 from containers/renovate/github.com-opencontainers-runc-1.x
fix(deps): update module github.com/opencontainers/runc to v1.2.0
2024-10-22 11:17:56 +00:00
openshift-merge-bot[bot] 57095a9e62
Merge pull request #24335 from giuseppe/test-set-soft-ulimit
test: set soft ulimit
2024-10-22 11:09:41 +00:00
openshift-merge-bot[bot] f4227e887c
Merge pull request #24275 from Luap99/wait-condition
libpod API: only return exit code without conditions
2024-10-22 10:53:12 +00:00
renovate[bot] 1a5ff0765e
fix(deps): update module github.com/opencontainers/runc to v1.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-22 10:22:45 +00:00
openshift-merge-bot[bot] f2766a674a
Merge pull request #24332 from cgwalters/delete-vagrantfile
Vagrantfile: Delete
2024-10-22 10:20:12 +00:00
Giuseppe Scrivano 94878af151
test: set soft ulimit
when the current soft limit is higher than the new value, ulimit fails
to set the hard limit as (tested on Rawhide):

[root@rawhide ~]# ulimit -n -H 1048575
-bash: ulimit: open files: cannot modify limit: Invalid argument

to avoid the problem, set also the soft limit:

[root@rawhide ~]# ulimit -n -H
12345678
[root@rawhide ~]# ulimit -n -H 1048575
-bash: ulimit: open files: cannot modify limit: Invalid argument
[root@rawhide ~]# ulimit -n -SH 1048575
[root@rawhide ~]# ulimit -n -H
1048575

commit 71d5ee0e04 introduced the issue.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-22 12:05:07 +02:00
Colin Walters ef26488fd7 Vagrantfile: Delete
This hasn't been touched in 7 years and Vagarant is no longer
a default entrypoint for many people. We have other things
documented in CONTRIBUTING.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-10-21 18:44:55 -04:00
openshift-merge-bot[bot] 4319fac0a7
Merge pull request #24327 from rst0git/pod-restore
Enable pod restore with crun
2024-10-21 18:09:30 +00:00
Radostin Stoyanov 642b61a091 Enable pod restore with crun
`CRRuntimeSupportsPodCheckpointRestore()` is used to check if the current
container runtime (e.g., runc or crun) can restore a container into an
existing Pod. It does this by processing output message to check if the
`--lsm-mount-context` option is supported.  This option was recently
added to crun [1], however, crun and runc have slightly different output
messages:

```
$ crun restore--lsm-mount-contextt
restore: option '--lsm-mount-context' requires an argument
Try `restore --help' or `restore --usage' for more information.
```

```
$ runc restore --lsm-mount-context
ERRO[0000] flag needs an argument: -lsm-mount-context
```

This patch updates the function to support both runtimes.

[1] https://github.com/containers/crun/pull/1578

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-10-21 17:37:20 +01:00
openshift-merge-bot[bot] e4d6fa7740
Merge pull request #24326 from Luap99/vendor
vendor: update c/{buildah,common,image,storage}
2024-10-21 15:13:20 +00:00
Paul Holzinger 2e94ca5816
vendor: update c/{buildah,common,image,storage}
Update to latest main to see if everything passes in preparation for the
first 5.3 release candidate.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-21 15:42:49 +02:00
openshift-merge-bot[bot] 1ca42f0a16
Merge pull request #24314 from mtrmac/composefs-enforcing-vfs
Update 330-corrupt-images.bats for composefs behavior change
2024-10-21 09:42:15 +00:00
Miloslav Trmač fdc9feea0e Fix 330-corrupt-images.bats in composefs test runs
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-18 23:44:04 +02:00
openshift-merge-bot[bot] 290d94d3c0
Merge pull request #24300 from edsantiago/flake-fix-checkpoint-test
CI: e2e: fix checkpoint flake
2024-10-18 16:42:44 +00:00
openshift-merge-bot[bot] d3df5c5994
Merge pull request #24305 from Luap99/quadlet-pasta
quadlet: make user units wait for network
2024-10-18 15:55:59 +00:00
Paul Holzinger 67e0fa8b89
quadlet: add default network dependencies to all units
There is no good reason for the special case, kube and pod units
definitely need it. Volume and network units maybe not but for
consistency we add it there as well. This makes the docs much easier to
write and understand for users as the behavior will not differ.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 14:01:22 +02:00
Paul Holzinger 57b022782b
quadlet: ensure user units wait for the network
As documented in the issue there is no way to wait for system units from
the user session[1]. This causes problems for rootless quadlet units as
they might be started before the network is fully up. TWhile this was
always the case and thus was never really noticed the main thing that
trigger a bunch of errors was the switch to pasta.

Pasta requires the network to be fully up in order to correctly select
the right "template" interface based on the routes. If it cannot find a
suitable interface it just fails and we cannot start the container
understandingly leading to a lot of frustration from users.

As there is no sign of any movement on the systemd issue we work around
here by using our own user unit that check if the system session
network-online.target it ready.

Now for testing it is a bit complicated. While we do now correctly test
the root and rootless generator since commit ada75c0bb8 the resulting
Wants/After= lines differ between them and there is no logic in the
testfiles themself to say if root/rootless to match specifics. One idea
was to use `assert-key-is-rootless/root` but that seemed like more
duplication for little reason so use a regex and allow both to make it
pass always. To still have some test coverage add a check in the system
test to ask systemd if we did indeed have the right depdendencies where
we can check for exact root/rootless name match.

[1] https://github.com/systemd/systemd/issues/3312

Fixes #22197

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:43:48 +02:00
Paul Holzinger 203ab6573b
add new podman-user-wait-network-online.service
This service is meant to be used by quadlet as replacement for
network-online.target as this does not work for rootless users.

see #22197

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:43:45 +02:00
Paul Holzinger a6c4e00e9a
contrib/systemd: switch user symlink for file symlinks
The reason being that I plan to add a unit that should only be used for
the user session and otherwise there is no way to only keep a unit in
user.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:40:45 +02:00
Paul Holzinger 1462b52090
Makefile: remove some duplication from install.systemd
Use a single loop for both the user and system service so we do not have
to duplicate the full paths every time.
In particular we can use `$^` to list all dependecies and then add the
not generated files to the loop as well to simplify this. And to make
things clear rename PODMAN_UNIT_FILES to PODMAN_GENERATED_UNIT_FILES so
readers immediately know they are generated and are safe to delete in
contrast to the .socket/.timer unit that are not and part of the git
history.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:37:58 +02:00
Paul Holzinger 21d0711a02
contrib/systemd: move podman-auto-update units
There is really no reason why these should be in separate dir.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-17 17:48:28 +02:00
openshift-merge-bot[bot] 740f1d1fc7
Merge pull request #24306 from Luap99/quadlet-root-test
quadlet: do not reject RemapUsers=keep-id as root
2024-10-17 14:27:07 +00:00
Paul Holzinger 9c6b1e20a3
quadlet: do not reject RemapUsers=keep-id as root
This is simply wrong, as of commit de63ad7044 --userns=keep-id is also
allowed as root.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-17 15:53:10 +02:00
Paul Holzinger ada75c0bb8
test/e2e: test quadlet with and without --user
This seems to be a testing gap, we need to test both for full coverage.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-17 15:53:10 +02:00
Ed Santiago fa920f54c7 CI: e2e: fix checkpoint flake
Two flakes seen in the last three months. One of them was in
August, so it's not related to ongoing criu-4.0 problems.

Suspected cause: race waiting for "podman run --rm" container
to transition from stopped to removed.

Solution: allow a 5-second grace period, retrying every second.

Also: add explanations to the Expect()s, remove unnecessary
code, and tighten up the CID check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-17 06:40:33 -06:00
openshift-merge-bot[bot] 993ecd5a05
Merge pull request #24261 from mheon/update_contributing
Thorough overhaul of CONTRIBUTING doc.
2024-10-17 11:03:36 +00:00
openshift-merge-bot[bot] 7d5377bb2e
Merge pull request #24238 from edsantiago/pasta-bytecheck
pasta udp tests: new bytecheck helper
2024-10-17 09:19:05 +00:00
Ed Santiago fe96c843bf APIv2 test fix: image history
I'm assuming this was buildah#5595: the COMMENT field moved around.
Deal with it, and add a few more checks while we're at it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-16 10:15:19 -06:00
Ed Santiago 67e39c1ec5 pasta udp tests: new bytecheck helper
...for debugging #24147, because "md5sum mismatch" is not
the best way to troubleshoot bytestream differences.

socat is run on the container, so this requires building a
new testimage (20241011). Bump to new CI VMs[1] which include it.

 [1] https://github.com/containers/automation_images/pull/389

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-16 10:15:19 -06:00
Ed Santiago a92958eb0c Document packaging process
High-level overview of packaging, intended for Linux distros.

Closes: RUN-1356

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-16 09:52:35 -06:00
openshift-merge-bot[bot] b65f3b19a5
Merge pull request #24295 from lsm5/rpm-spec-cleanup
[skip-ci] RPM: remove dup Provides
2024-10-16 14:27:59 +00:00
openshift-merge-bot[bot] ac5cbcb031
Merge pull request #24294 from containers/renovate/setuptools-75.x
Update dependency setuptools to ~=75.2.0
2024-10-16 14:11:23 +00:00
Lokesh Mandvekar cf124ee1bb
[skip-ci] RPM: remove dup Provides
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-10-16 19:37:13 +05:30
renovate[bot] 927cb7624c
Update dependency setuptools to ~=75.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-16 13:48:10 +00:00
openshift-merge-bot[bot] 12c03ed6fe
Merge pull request #24291 from edsantiago/bats-safer-mypod
System tests: safer pause-image creation
2024-10-16 13:46:31 +00:00
Ed Santiago 1ddb15c81f System tests: safer pause-image creation
The current mypod hack breaks down when running individual tests:

    $ hack/bats 010   <<< barfs because it does not want pause-image!

Reason: Bats does not provide any official way to tell if tests
are being run in parallel.

Workaround: use an undocumented way.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-16 06:02:23 -06:00
openshift-merge-bot[bot] 27d73b0cd0
Merge pull request #24289 from ThaddeusTreloar/fix/hyperv-powershell-path-sanitise
Added escaping to invoked powershell command for hyperv stubber.
2024-10-16 10:26:21 +00:00
openshift-merge-bot[bot] d7e0933030
Merge pull request #24288 from containers/renovate/github.com-opencontainers-selinux-1.x
Update module github.com/opencontainers/selinux to v1.11.1
2024-10-16 08:42:32 +00:00
openshift-merge-bot[bot] bd1abf05bb
Merge pull request #24284 from zackattackz/slices-clone
use slices.Clone instead of assignment
2024-10-16 07:14:34 +00:00
renovate[bot] 40d4f7240b
Update module github.com/opencontainers/selinux to v1.11.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-16 02:44:20 +00:00
ThaddeusTreloar 1227f19393 Added escaping to invoked powershell command for hyperv stubber.
Signed-off-by: ThaddeusTreloar <thaddeus.treloar@protonmail.com>
2024-10-16 13:16:39 +11:00
openshift-merge-bot[bot] a2eb5429b3
Merge pull request #24264 from edsantiago/try-try-again
CI: fix changing-rootFsSize flake
2024-10-15 22:05:42 +00:00