23895 Commits

Author SHA1 Message Date
9abc17f1e1 chore: fix some function names in comment
Signed-off-by: shenpengfeng <xinhangzhou@icloud.com>
2024-10-29 17:57:31 +08:00
2f6fca6edc Merge pull request #24358 from Luap99/healthcheck-startup-leak
healthcheck: do not leak startup service
2024-10-25 16:03:17 +00:00
584109fc56 Merge pull request #24366 from containers/renovate/github.com-containers-gvisor-tap-vsock-0.x
fix(deps): update module github.com/containers/gvisor-tap-vsock to v0.8.0
2024-10-25 13:34:51 +00:00
c0f4e2ce67 healthcheck: do not leak service on failed stop
We reset the failed unit to not leak it, however we did so before
stopping, this is wrong because when the stop fails we will again have a
failed unit. The correct thing is to reset after the stop because once
it is stopped it cannot create new errors.

I found this using the following reproducer and this is enough to fix
it:
```
while :; do
cid=$(podman run -d --name foo --health-cmd /home/podman/healthcheck \
	--health-startup-cmd /home/podman/healthcheck \
	quay.io/libpod/testimage:20241011 /home/podman/pause)
podman healthcheck run $cid
podman rm -fa
sleep 2
systemctl --user list-units --failed | grep $cid && break
done
```

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-25 15:27:05 +02:00
6069cdda00 healthcheck: do not leak statup service
The startup service is special because we have to transition from
startup to the normal unit. And in order to do so we kill ourselves (as
we are run as part of the service). This means we always exited 1 which
causes systemd to keep us failure and not remove the transient unit
unless "reset-failed" is called. As there is no process around to do
that we cannot really do this, thus make us exit(0) which makes more
sense.

Of course we could try to reset-failed the unit later but the code for
that seems more complicated than that.

Add a new test from Ed that ensures we check for all healthcheck units
not just the timer to avoid leaks. I slightly modified it to provide a
better error on leaks.

Fixes: 0bbef4b830 ("libpod: rework shutdown handler flow")
Fixes: #24351

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-25 13:47:59 +02:00
45e1ffb799 fix(deps): update module github.com/containers/gvisor-tap-vsock to v0.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-25 02:14:39 +00:00
2da21d1524 Merge pull request #24359 from Honny1/startu-healthcheck-inspect
Show Startup HealthCheck configuration with `podman inspect`
2024-10-24 16:25:35 +00:00
afedb83917 Add Startup HealthCheck configuration to the podman inspect
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-10-24 13:49:51 +02:00
70d581029b Merge pull request #24263 from edsantiago/packaging-doc
Document packaging process
2024-10-23 20:55:41 +00:00
beea471498 Merge pull request #24347 from edsantiago/treadmill-updates
buildah treadmill: documentation and process updates
2024-10-23 20:19:47 +00:00
c8c9e6338d Merge pull request #24350 from maximiliankolb/docs_typo
doc: Remove whitespace before comma
2024-10-23 20:17:04 +00:00
d2ba730f33 buildah version display: use progress()
...to make it stand out just a little more.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
825eed4bde new showrun() for displaying and running shell commands
Equivalent to print() + system(). Shows individual commands
being run, which may help a developer understand and replicate
actions if they fail.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
9db04e87b6 Buildah treadmill: redo the .cirrus.yml tweaks
Initial purpose of treadmill PR was to run buildah-bud tests
early, and not run anything else if they fail. This was to
catch vendoring problems and not be distracted by flakes.
This was done by inspecting and massaging .cirrus.yml.

As of #21639 this code was a silent NOP because the entire
CI tree was overhauled. Here we make that work again.

Also, in #20947 I enhanced this script to run rootless
bud tests but neglected to updated the comments. Do so now.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
a925c9f831 Buildah treadmill: more allow-empty options
Handle the condition where the second commit (the one making
podman-specific changes) is empty.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
ba8375c9e4 Buildah treadmill: improve test-failure instructions
This time, in the vendor script itself.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
ee9c681f31 Buildah treadmill: improve wording in test-fail instructions
Clarify, expand, fix a typo. These are the instructions
shown when the **patching** step fails, typically when
buildah's helpers.bash is changed in a way that conflicts
with our make-it-work-in-podman patches.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
eb90154975 doc: Remove whitespace before comma
Signed-off-by: Maximilian Kolb <mail@maximilian-kolb.de>
2024-10-23 19:44:24 +02:00
e2ebf81cb5 Merge pull request #24346 from containers/renovate/github.com-checkpoint-restore-checkpointctl-1.x
fix(deps): update module github.com/checkpoint-restore/checkpointctl to v1.3.0
2024-10-23 17:01:45 +00:00
da783f3f70 fix(deps): update module github.com/checkpoint-restore/checkpointctl to v1.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-23 14:00:43 +00:00
0712c18d9c Merge pull request #24337 from Luap99/expose-ports-ps
ps: fix display of exposed ports
2024-10-23 13:58:28 +00:00
0cdb9b3b22 ps: fix display of exposed ports
This fixes two problems, first if a port is published and exposed it
should not be shown twice. It is enough to show the published one.

Second, if there is a huge range the ports were no grouped causing the
output to be unreadable basically. Now we group exposed ports like we do
with the normal published ports.

Fixes #23317

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-23 15:03:30 +02:00
73fb6623cd ps: do not loop over port protocol
This can never included a comma in the protocol so it just complicated
things for no reason, we never needed this and commit edc3dc5e11 already
ensures this cannot happen.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-23 14:56:26 +02:00
71c9744f72 Merge pull request #24343 from dgibson/bug24342
test/system: Fix spurious "duplicate tests" failures in pasta tests
2024-10-23 11:23:03 +00:00
7fbf2baf0a Merge pull request #24245 from it-a-me/pasta_readme
readme: Add reference to pasta in the readme
2024-10-23 09:27:33 +00:00
390aec18b2 readme: Add reference to pasta in the readme
Fixes #24244

Signed-off-by: Carter Wobbe <wobbe.carter@gmail.com>
2024-10-22 20:57:40 -07:00
5b131b8273 test/system: Fix spurious "duplicate tests" failures in pasta tests
As an internal consistency check, the pasta tests check for duplicated test
cases by grepping a log file for a parsed test id.  However it uses
grep -F for the purpose which will not perform an exact match, but a
substring match.  There are some tests which generate an id which is a
substring of the id for other tests, so when test order is randomised, this
can cause a spurious failure.  This can happen in practice when running
the test in parallel with very high concurrency (e.g. -j 100).

Fix this by adding the -x option to grep, which only checks for full line
exact matches.

Fixes: https://github.com/containers/podman/issues/24342

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-10-23 14:02:53 +11:00
410f7965f7 Merge pull request #24286 from mtrmac/compare-image-configs
Update system tests to handle zstd:chunked images
2024-10-22 19:38:48 +00:00
6fd0e227b4 Improve "podman load - from URL"
Don't assume that the loaded image will be deduplicated
with the server image.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-22 19:36:14 +02:00
77ef28c14f Try to repair c/storage after removing an additional image store
The additional image store feature assumes that images / layers
in the additional store never go away, while we do remove it after
this test. Try to repair the store.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-10-22 19:36:03 +02:00
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
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
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
215543895d Merge pull request #24339 from mheon/bump_530_rc1
Bump to v5.3.0-rc1
2024-10-22 15:41:56 +00:00
6a11e75c48 Bump to v5.3.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-22 10:31:53 -04:00
d306e80127 Bump to v5.3.0-rc1
Signed-off-by: Matt Heon <mheon@redhat.com>
v5.3.0-rc1
2024-10-22 10:31:29 -04:00
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
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
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
57095a9e62 Merge pull request #24335 from giuseppe/test-set-soft-ulimit
test: set soft ulimit
2024-10-22 11:09:41 +00:00
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
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
f2766a674a Merge pull request #24332 from cgwalters/delete-vagrantfile
Vagrantfile: Delete
2024-10-22 10:20:12 +00:00
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 71d5ee0e04eb61802b7c59166d88eac19c563ff7 introduced the issue.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-22 12:05:07 +02:00
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
4319fac0a7 Merge pull request #24327 from rst0git/pod-restore
Enable pod restore with crun
2024-10-21 18:09:30 +00:00
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
e4d6fa7740 Merge pull request #24326 from Luap99/vendor
vendor: update c/{buildah,common,image,storage}
2024-10-21 15:13:20 +00:00
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
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