20322 Commits

Author SHA1 Message Date
5121c9eb0e libpod: check if cgroup exists before creating it
do not create the pod cgroup if it already exists.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:48 +02:00
38209ef49d libpod: refactor platformMakePod signature
accept only the resources to be used by the pod, so that the function
can more easily be used by a successive patch.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:48 +02:00
627ac1c96b libpod: destroy pod cgroup on pod stop
When the pod is stopped, we need to destroy the pod cgroup, otherwise
it is leaked.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:48 +02:00
9a347619d8 utils: export MoveUnderCgroup
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:47 +02:00
556db46a68 libpod: refactor code to new function
move the code to remove the pod cgroup to a separate function.  It is
a preparation for the next patch.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:44 +02:00
f8e1ec731e Merge pull request #19897 from edsantiago/e2e_check_stderr_checkpoint
e2e: use ExitCleanly() in checkpoint tests
2023-09-08 06:57:57 -04:00
7524753efb Merge pull request #19896 from baude/issue17019
[CI:DOCS]Remove use of --latest|-l from tutorial
2023-09-08 06:56:40 -04:00
6ee8f73d41 Merge pull request #19885 from rhatdan/kube
Add support for kube  securityContext.procMount
2023-09-08 06:56:05 -04:00
5d6ec27e95 Merge pull request #19892 from edsantiago/StopSignal_default_name
StopContainer: display signal num when name unknown
2023-09-08 11:42:34 +02:00
65bddfcd25 e2e: use ExitCleanly() in checkpoint tests
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Clean command-line replace, with one manual reversion (commented)

And -- duh! -- skip the stderr check on Debian!

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 20:20:28 -06:00
4796802320 [CI:DOCS]Remove use of --latest|-l from tutorial
Remove the use of the "latest" flags because it cannot be used on
windows or mac.

Fixes #17019

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-09-07 17:57:34 -05:00
afeab39d10 CI test runner: upgrade tests rely on system tests
Prevent future occurrences of #19894, by making upgrade tests
run any time there's a change to system tests. That's overly
broad: upgrade tests only rely on test/system/helpers.bash,
not test/system/anything-else. IMHO the cost of CI breaking
is higher than the cost of running unnecessary jobs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 16:50:40 -06:00
c0d36b8ab8 Merge pull request #19894 from edsantiago/urgent_ci_fix
URGENT: fix broken CI
2023-09-07 17:49:13 -05:00
59bd6a74a0 run --rmi: "cannot remove" is a warning, not an error
When the "rmi" part of "run --rmi" fails due to image being in use
by another container (or for any reason, actually), issue a warning
message, not an error.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:30:22 -06:00
70cf9740f1 StopContainer: display signal num when name unknown
Under some circumstances podman tries to kill a container
using signal 37, for which unix.SignalName() returns "".
Not helpful. So, when that happens, show "(signal number)".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:13:14 -06:00
6f913f5f37 URGENT: fix broken CI
PR #19878 (checking for warnings in system tests) broke upgrade tests.

Reason: my long-ago "optimization" in which, if a PR touches only
tests in X, do not run tests in Y. Unfortunately, upgrade tests
rely on code in the system-test directory. I don't know if this
is fixable; nor if it's an acceptable tradeoff. Please discuss.

Sorry, everyone.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:05:30 -06:00
e546aebb32 Merge pull request #19889 from vrothberg/restart-kill
podman: don't restart after kill
2023-09-07 21:28:17 +02:00
0c72726f01 Merge pull request #19878 from edsantiago/bats_check_stderr
sys tests: run_podman: check for unwanted warnings/errors
2023-09-07 17:26:59 +02:00
16f2dd36bb Merge pull request #19887 from rhatdan/kube1
Tmpfs should not be mounted noexec
2023-09-07 16:19:24 +02:00
b83485022d Add support for kube securityContext\.procMount
Fixes: https://github.com/containers/podman/issues/19881

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-07 09:49:11 -04:00
589867d716 podman: don't restart after kill
Also add a new `StoppedByUser` field to the container-inspect state
which can be useful during debugging and is now also used in the
regression test.  Note that I moved the `false` check one test above
such that we can compare the previous Podman version which should just
be stuck in the `wait $ctr` command since it will continue restarting.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-07 15:18:02 +02:00
2d7d8d1d10 Tmpfs should not be mounted noexec
The logic here makes little sense, basically the /tmp and /var/tmp are
always set noexec, while /run is not.  I don't see a reason to set any
of the three noexec by default.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-07 08:06:55 -04:00
c2575f726d sys tests: run_podman: check for unwanted warnings/errors
With few exceptions, commands that exit 0 should not emit any
messages with level=warning or =error. Let's start enforcing
that in run_podman.

Allow one-off exceptions, typically when we're testing an
actual warning condition (usual case: "podman stop" where it
times out to SIGKILL). Exceptions are specified via:

    run_podman 0+w subcommand...
               ^^^---- or, rarely, 0+e

"0" stands for "expect exit status 0", which is the default
so it's implicit anyway. The +w / +e (or even +we) is the
new part. I have added it to tests where necessary.

And, because life is what it is, add two global exceptions:

  - Debian. Because runc has too many flakes.
  - kube. Ditto. Kube commands emit lots of nasty error
    messages (yes, level=error) that don't seem to affect
    results.

Similar to #18442

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 05:35:21 -06:00
c17c190f89 Merge pull request #19882 from edsantiago/e2e_exitcleanly
e2e: use ExitCleanly() in attach & build tests
2023-09-07 12:27:05 +02:00
24e9e946cc Merge pull request #19883 from containers/renovate/setuptools-68.x
chore(deps): update dependency setuptools to ~=68.2.0
2023-09-07 06:23:28 -04:00
1211518e82 chore(deps): update dependency setuptools to ~=68.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-07 02:07:32 +00:00
465150f10c e2e: use ExitCleanly() in attach & build tests
Small steps toward RUN-1907: replace Exit(0) with ExitCleanly()
in ginkgo tests in two test files. Also, when practical,
replace ALPINE with CITEST_IMAGE.

There are still many thousands of instances left to fix. I will
be submitting in reviewable chunks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-06 17:11:38 -06:00
c11ac807f9 Merge pull request #19759 from rhatdan/docs
[CI:DOCS] Some distros do not default to docker.io for shortname searches
2023-09-06 22:04:38 +02:00
27495981ce Some distros do not default to docker.io for shortname searches
Fixes: #18910

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-06 13:37:08 -04:00
af17ddaeed Merge pull request #19871 from giuseppe/accept-empty-capabilities
security: accept empty capabilities list
2023-09-06 17:16:52 +02:00
2806378c1a Merge pull request #19872 from edsantiago/systest_fix_eaddrinuse
systests: random_free_port: fix EADDRINUSE flake
2023-09-06 16:06:49 +02:00
74a7d61f5c Merge pull request #19869 from containers/renovate/github.com-cyphar-filepath-securejoin-0.x
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.2.4
2023-09-06 16:04:17 +02:00
30abd7f1af security: accept empty capabilities list
allow the image to specify an empty list of capabilities, currently
podman chokes when the io.containers.capabilities specified in an
image does not contain at least one capability.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-06 14:55:28 +02:00
c32cfb1d01 systests: random_free_port: fix EADDRINUSE flake
Fixes infrequent but annoying flake in which system tests
call random_free_port(), get a nice-looking port, then
fail with "bind: address already in use".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-06 06:10:40 -06:00
3e5b28b1d4 Merge pull request #19867 from siretart/siretart/tests/fcos
Restrict fcos_test to amd64, arm64
2023-09-06 11:05:22 +02:00
f14360f707 Merge pull request #19863 from mheon/fix_18874
Ignore spurious container-removal errors
2023-09-06 10:18:52 +02:00
d7b7b20831 Merge pull request #19866 from containers/renovate/github.com-containers-libhvee-digest
fix(deps): update github.com/containers/libhvee digest to 56fb235
2023-09-06 10:11:22 +02:00
3c0728df30 Merge pull request #19865 from containers/renovate/github.com-docker-docker-24.x
fix(deps): update module github.com/docker/docker to v24.0.6+incompatible
2023-09-06 10:08:28 +02:00
1004f53d04 Merge pull request #19864 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.13.0
2023-09-06 10:05:44 +02:00
a5798e9f5a fix(deps): update module github.com/cyphar/filepath-securejoin to v0.2.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 08:04:39 +00:00
14735f1724 Merge pull request #19862 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.15.0
2023-09-06 10:02:55 +02:00
dbfc3e7e00 Restrict fcos_test to amd64, arm64
Allows tests to pass on i386 again

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2023-09-05 21:50:52 -04:00
7b2fc5f8d0 fix(deps): update github.com/containers/libhvee digest to 56fb235
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 01:06:39 +00:00
2aec77f1fe Merge pull request #19861 from edsantiago/manifest_test_cleanup
systests: manifest zstd test: lots of tiny cleanups
2023-09-06 01:04:35 +02:00
0a913d578d fix(deps): update module github.com/docker/docker to v24.0.6+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 22:18:41 +00:00
f9fd402210 fix(deps): update module golang.org/x/tools to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 20:48:58 +00:00
52e1acf86c Merge pull request #19850 from containers/renovate/actions-checkout-4.x
[skip-ci] Update actions/checkout action to v4
2023-09-05 22:48:08 +02:00
71549c642f Ignore spurious container-removal errors
When removing a container's dependency, getting an error that the
container has already been removed (ErrNoSuchCtr and
ErrCtrRemoved) should not be fatal. We wanted the container gone,
it's gone, no need to error out.

[NO NEW TESTS NEEDED] This is a race and thus hard to test for.

Fixes #18874

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-09-05 14:35:37 -04:00
e5bf0f96d7 fix(deps): update module golang.org/x/net to v0.15.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 18:05:34 +00:00
fdf694fcff systests: manifest zstd test: lots of tiny cleanups
Primarily, build test images FROM scratch, not alpine, to
avoid image pulls and network flakes and potential pull-
the-rug-out errors if the base alpine image changes.

This was much more complicated than it should've been,
because creating unique arch-specific FROM-scratch images
triggered a weird manifest bug, filed as #19860.

Also:
- add a teardown() to clean up manifests
- remove test for skopeo (skopeo is required for sys tests)
- remove unnecessary intermediate tmpdir
- deduplicate, by looping over amd+arm
- fix indentation
- and, finally, clean up dangling images (this was the initial
  reason behind my diving in here. Such a simple thing, I thought.)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-05 11:36:29 -06:00