19179 Commits

Author SHA1 Message Date
d68121a609 Add default ulimit test for gen kube
Add a test for generate kube to verify that the ulimit
annotation is not set for the default case when the user
doesn't set any ulimits.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-06-02 11:19:59 +00:00
57797d8559 Merge pull request #18771 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.9.3
2023-06-02 07:08:02 -04:00
1b7df2e99e Merge pull request #18770 from containers/renovate/github.com-coreos-stream-metadata-go-0.x
fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.2
2023-06-02 06:22:57 -04:00
81d64547f1 feat: add insecure registry troubleshooting solution
Signed-off-by: fatelei <fatelei@gmail.com>
2023-06-02 14:50:13 +08:00
1768bf1509 fix(deps): update module golang.org/x/tools to v0.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 23:40:32 +00:00
7e550f78e1 fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 22:09:12 +00:00
28934897e3 e2e: GetPort(): safer allocation of random ports
Intented to fix an obscure, unlikely race condition in which (I
think) two parallel jobs called GetPort() and were assigned the
same port.

Also, add actual proper testing to two HTTP-registry tests, and
Skip a third that's a waste of cycles (filed #18768)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-01 16:04:34 -06:00
2c9f18182a The removeContainer function now accepts a struct
We had something like 6 different boolean options (removing a
container turns out to be rather complicated, because there are a
million-odd things that want to do it), and the function
signature was getting unreasonably large. Change to a struct to
clean things up.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
4e6efbbbb3 Revert "test/e2e: fix "podman run ipcns ipcmk container test""
This reverts commit 9bd833bcfd07bf2b3c258a617d88255327b91669.

With the fix for `podman rm -fa` merged, we no longer require
this patch.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
b75ff3a8fa Add a test for removing dependencies with rm -fa
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
bafb3d6cc5 Revert "ginkgo-v2 cleanup workaround for #18180"
This reverts commit c4b9f4b34e75da3df5b40fd8e8d42dde224cbd1c.

This was a temporary workaround until a fix for #18180 landed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:27 -04:00
ef1a22cdea Fix a deadlock when removing pods
The infra container would try to remove the pod, despite the pod
already being in the process of being removed - oops. Add a check
to ensure we don't try and remove the pod when called by the
`podman pod rm` command.

Also, wire up noLockPod - it wasn't previously wired in, which is
concerning, and could be related?

Finally, make a few minor fixes to un-break lint.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:27:25 -04:00
8cb5d39d43 Pods now return what containers were removed with them
This probably should have been in the API since the beginning,
but it's not too late to start now.

The extra information is returned (both via the REST API, and to
the CLI handler for `podman rm`) but is not yet printed - it
feels like adding it to the output could be a breaking change?

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:24:59 -04:00
bc1a31ce6d Make RemoveContainer return containers and pods removed
This allows for accurate reporting of dependency removal, but the
work is still incomplete: pods can be removed, but do not report
the containers they removed as part of said removal. Will add
this in a subsequent commit.

Major note: I made ignoring no-such-container errors automatic
once it has been determined that a container did exist in the
first place. I can't think of any case where this would not be a
TOCTOU - IE, no reason not to ignore them. The `--ignore` option
to `podman rm` should still retain meaning as it will ignore
errors from containers that didn't exist in the first place.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 16:24:56 -04:00
e8d7456278 Add an API for removing a container and dependencies
This is the initial stage of implementation. The current API
functions but does not report the additional containers and pods
removed. This is necessary to properly display results to the
user after `podman rm --all`.

The existing remove-dependencies code has been removed in favor
of this more native solution.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-06-01 15:32:50 -04:00
a7e23d341d Merge pull request #18756 from Luap99/tz
libpod: fix timezone handling
2023-06-01 14:16:20 -04:00
e91f6f16bf Merge pull request #15867 from boaz0/closes_15754
Fix: display online_cpus in compat REST API
2023-06-01 11:03:14 -04:00
50f934587f Merge pull request #18758 from Luap99/systemd-restart
test/system: quadlet use correct systemd restart policy
2023-06-01 07:52:02 -04:00
511d668a33 Merge pull request #18765 from containers/renovate/github.com-godbus-dbus-v5-digest
fix(deps): update github.com/godbus/dbus/v5 digest to 7623695
2023-06-01 06:46:40 -04:00
2e2e009b1d Merge pull request #18763 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.9.2
2023-06-01 05:11:09 -04:00
543b809495 systests: fixes for coping with extra systemd image
We _usually_ have only one image in store, $IMAGE, but it's
perfectly fine to also have $SYSTEMD_IMAGE also. Fix a few
tests so they can handle that condition.

And, cleanup:
 - remove a no-longer-useful test ("podman load NEWNAME",
   functionality that was removed 2+ years ago in #8877)
 - reorder some tests in the image-mount test, to make
   them safer and easier to understand
 - use no-such-image, not no-such-container, in image-mount test.
   Computer don't care, but this human felt confused for a sec.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-01 11:04:31 +02:00
34c258b419 libpod: fix timezone handling
The current way of bind mounting the host timezone file has problems.
Because /etc/localtime in the image may exist and is a symlink under
/usr/share/zoneinfo it will overwrite the targetfile. That confuses
timezone parses especially java where this approach does not work at
all. So we end up with an link which does not reflect the actual truth.

The better way is to just change the symlink in the image like it is
done on the host. However because not all images ship tzdata we cannot
rely on that either. So now we do both, when tzdata is installed then
use the symlink and if not we keep the current way of copying the host
timezone file in the container to /etc/localtime.

Also note that we need to rebuild the systemd image to include tzdata in
order to test this as our images do not contain the tzdata by default.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2149876

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-01 11:04:13 +02:00
22424eb5d7 fix(deps): update github.com/godbus/dbus/v5 digest to 7623695
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 03:15:04 +00:00
7987d2ee0a fix(deps): update module golang.org/x/tools to v0.9.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-31 23:41:38 +00:00
249f0463eb Merge pull request #18721 from Cydox/fix-ulimit-pr
fix ulimit issue
2023-05-31 16:53:49 -04:00
5543de25d5 Merge pull request #18747 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.6
2023-05-31 12:53:51 -04:00
4173f942f1 test/system: quadlet use correct systemd restart policy
Systemd doesn't support `never` and logs a warning, systemd uses no as
default so we do not have to specify it at all.

Check systemd.service(5) for the systemd docs.

Fixes #18743

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-31 18:50:16 +02:00
af5b1d6e80 Merge pull request #18643 from eriksjolund/use-imperative-form
man pages and command help: unify verb forms
2023-05-31 11:16:23 -04:00
b9bdfea8e7 Merge pull request #18752 from edsantiago/log_k8s_race
systests: minimize race-condition window
2023-05-31 10:23:30 -04:00
0d7702bd93 Merge pull request #18744 from edsantiago/quadlet_race
systests: fix race in quadlet tests
2023-05-31 10:20:52 -04:00
19d39091b3 Merge pull request #18755 from edsantiago/dont_bg_run_podman
systests: fix improper backgrounding of run_podman
2023-05-31 10:13:08 -04:00
45e93014c5 Merge pull request #18730 from tmds/authfilepath_non_linux
[CI:DOCS] authfile.md: add default path of file for Windows/macOS.
2023-05-31 09:01:52 -04:00
0372bf4bdd systests: minimize race-condition window
Reduce sleep-loop time in logs test, from 1s to 0.1s,
to make 'podman stop' take effect more quickly. With 1s,
and testing with 1s resolution, we get flakes.

Fixes: #17826

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-31 06:38:17 -06:00
1a34e1f855 systests: fix improper backgrounding of run_podman
run_podman cannot be backgrounded. Use $PODMAN instead.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-31 06:20:35 -06:00
b7d4da671b Merge pull request #18734 from edsantiago/image-rm-race
e2e: make BuildImage parallel-safe
2023-05-31 05:33:36 -04:00
f097728891 set max ulimits for rootless on each start
Signed-off-by: Jan Hendrik Farr <github@jfarr.cc>
2023-05-31 09:20:31 +00:00
5c7d50f08c Fix: display online_cpus in compat REST API
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2023-05-31 07:41:30 +03:00
bd62119f36 fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-31 03:09:02 +00:00
72d4cede29 systests: fix race in quadlet tests
The new exit-code propagation test is racy: 'podman wait' can
fail if the service container has already been cleaned up by
systemd.

Solution: run the inspect and wait tests opportunistically, i.e.,
only if those commands succeed. If they fail, confirm that they
fail with ENOSUCHCONTAINER. This may silently lose us some
coverage ... but none of it is important. The important
test, systemctl final status, remains.

Also, as drive-bys:
 - add a FIXME comment documenting another race condition
   that I'm not bothering to fix right now

 - give distinct names to unit files, for readability in
   test failures

Fixes: #18732

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-30 13:38:51 -06:00
c9c5cb2224 Merge pull request #18741 from containers/renovate/github.com-burntsushi-toml-1.x
fix(deps): update module github.com/burntsushi/toml to v1.3.0
2023-05-30 15:31:52 -04:00
710315d33c Merge pull request #18577 from rhatdan/build
Support podman --remote when Containerfile is not in context directory
2023-05-30 13:53:02 -04:00
f48fa11131 fix(deps): update module github.com/burntsushi/toml to v1.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 16:13:20 +00:00
fa61bb2594 Merge pull request #18736 from Luap99/completion-panic
completion: fix panic in simplePathJoinUnix()
2023-05-30 12:11:59 -04:00
77bd041a96 Merge pull request #18731 from containers/renovate/github.com-stretchr-testify-1.x
Update module github.com/stretchr/testify to v1.8.4
2023-05-30 11:03:18 -04:00
88e78456db e2e: make BuildImage parallel-safe
"image rm concurrent" test is still failing, even after #18664:

    Error: no contents in "/tmp/podman_test967723851/Dockerfile"

Probable cause: the images are built in parallel, and p.BuildImage()
writes one single Dockerfile. (This almost certainly renders the
test less effective than intended, since the generated images
might end up being identical).

Solution: write and use a uniquely-named Dockerfile

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-30 08:16:26 -06:00
370e1132ce completion: fix panic in simplePathJoinUnix()
When we do path completion in images a user could try to complete a
simple relative path, e.g. podman run $IMAGE e... should complete to etc
if this path exists in the image. Right now we panic in this case as the
current check didn't account for an empty string in simplePathJoinUnix().
In such a case return the path directly because we can not alter what
the user typed on the cli and must return a path without slash as well
in order for the shell to suggest the completion.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2209809

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-30 16:09:19 +02:00
0ab95af371 Merge pull request #18729 from containers/renovate/github.com-rootless-containers-rootlesskit-1.x
Update module github.com/rootless-containers/rootlesskit to v1.1.1
2023-05-30 08:36:43 -04:00
46456f5f15 Update module github.com/stretchr/testify to v1.8.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 11:05:50 +00:00
585d715bb9 authfile.md: add default path of file for Windows/macOS.
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2023-05-30 11:16:34 +02:00
01012a0807 Update module github.com/rootless-containers/rootlesskit to v1.1.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-30 08:19:36 +00:00