13729 Commits

Author SHA1 Message Date
7b51acd4c4 APIv2 tests: fail on syntax/logic errors
(i.e. not test failures, but actual programming bugs).

We've had a number of syntax errors creep into this test, usually
caused by a missing backslash on a test command. I've long wanted
to 'set -e' but that causes other problems. This PR introduces
error handling via 'trap', with useful diagnostics on failure.

This PR also catches and fixes two previously-unknown bugs that
were causing tests to not actually run.

And, since /events takes eons on my high-uptime laptop, add /since

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-14 18:28:50 -07:00
b01a421f34 Merge pull request #12596 from edsantiago/apiv2_test_refactor
apiv2 tests: refactor complicated curls
2021-12-14 22:30:56 +01:00
c36fb8b113 Merge pull request #12595 from Luap99/network-id
fix network id handling
2021-12-14 20:56:55 +01:00
0a2eb7b185 apiv2 tests: refactor complicated curls
Some months ago, apiv2 tests got added that needed new
functionality: passing a tarball to the remote server.
There was no mechanism to do so in the 't' helper, so
these tests used complicated (and actually not-really-
working) curl commands.

This PR introduces and documents a new usage of 't', in
which passing an argument ending in '.tar' adds the
right magic syntax (--data-binary @PATH) to the existing
curl. This lets us use all standard 't' checks, making
for simpler tests and in the process fixing some bugs.

Also: drive-by fix of a typo bug in the networks test.

Also: set CONTAINERS_REGISTRIES_CONF when starting server
and when running direct podman, to avoid docker.io throttling.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-14 12:10:19 -07:00
888c778ee9 fix network id handling
We have to get the network ID from the network backend. With the
netavark backend we no longer use the sha from the name as ID.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 18:41:06 +01:00
a0894b5ecd Merge pull request #12586 from jmguzik/secret-cmd
Add secret list --filter to cli
2021-12-14 18:40:58 +01:00
1884bd8873 Merge pull request #12594 from TomSweeneyRedHat/dev/tsweeney/windoc2
[CI:DOCS] Update Windows Install Doc
2021-12-14 12:38:32 -05:00
e4e21522d1 Merge pull request #12091 from ananthb/docker-api-compat
Fixes #12063 Add docker compatible output after image build.
2021-12-14 18:32:57 +01:00
c134698fa1 Merge pull request #12593 from vrothberg/fix-11682
pause scope: don't use the global math/rand RNG
2021-12-14 17:52:57 +01:00
afdb4dc22f Update Windows Install Doc
Updates the Windows install doc to make it more clear.

Fixes: #11382

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-12-14 11:23:32 -05:00
3b9af150ab Merge pull request #12589 from containers/dependabot/go_modules/github.com/docker/docker-20.10.12incompatible
Bump github.com/docker/docker from 20.10.11+incompatible to 20.10.12+incompatible
2021-12-14 16:52:57 +01:00
52b12fe985 Fixes #12063 Add docker compatible output after image build.
Signed-off-by: Ananth Bhaskararaman <antsub@gmail.com>
2021-12-14 21:08:31 +05:30
65d5a2b68b pause scope: don't use the global math/rand RNG
Otherwise, we'll always get the same sequence of random numbers which
may lead to conflicts.  Also bump the number of maximum attempts to 10
instead of 3.

[NO NEW TESTS NEEDED] as I cannot enforce random number collisions.
Existing tests should continue be green and flake slightly less.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-14 16:34:54 +01:00
c501c1d642 Merge pull request #12585 from Luap99/network-ls-sort
network ls: show networks in deterministic order
2021-12-14 16:05:42 +01:00
5f1f62f0bb network ls: show networks in deterministic order
The new network backend stores the networks in a map so the returned
order is not deterministic. Lets sort the network names alphabetically
to ensure a deterministic order.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 13:52:38 +01:00
5a071d9f50 Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.11+incompatible to 20.10.12+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.11...v20.10.12)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-14 12:28:51 +00:00
4a060caeab Merge pull request #12588 from vrothberg/fix-12167
pprof flakes: bump timeout to 20 seconds
2021-12-14 13:25:39 +01:00
1fff76c3c3 pprof flakes: bump timeout to 20 seconds
This is the third and hopefully the last attempt to address the flakes
in the pprof tests.  We first bumped the timeouts to 2 seconds, then to
5, and since I am running out of ideas let's bump it now to 20 seconds.

Since the timeouts poll, the tests will terminate much earlier but 20
seconds should now really be enough even under highly loaded CI VMs.

Fixes: #12167
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-14 10:59:56 +01:00
50501f49a3 Add secret list --filter to cli
This PR is a follow-up of #11431. It adds possibility of filtering
secret list based on id and name.

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
2021-12-14 10:41:03 +01:00
4543fd463e Merge pull request #12571 from vrothberg/fix-12566
compat build: adhere to q/quiet
2021-12-13 14:54:03 -05:00
b6ce7e19ec Merge pull request #12581 from cevich/disable_gitlab
[CI:DOCS] Cirrus: Temp. ignore gitlab task failures
2021-12-13 16:57:25 +01:00
8cb93ac103 Cirrus: Temp. ignore gitlab task failures
Appears related to https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28732
Log: https://cirrus-ci.com/task/5708221852680192?logs=setup#L433

Marking test to be ignored until I can figure out where/how to fix it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-12-13 10:31:01 -05:00
81a0a79844 compat build: adhere to q/quiet
Fixes: #12566
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-13 09:52:24 +01:00
e993b88c03 Merge pull request #12573 from Luap99/fix-test
fix e2e test missing network cleanup
2021-12-10 17:56:28 +00:00
47f4f149bd Merge pull request #12569 from vrothberg/fix-12167
pprof CI flakes: enforce 5 seconds grace period
2021-12-10 15:42:27 +00:00
bc191ca7d3 fix e2e test missing network cleanup
I noticed that this test will fail its flake rerun because the network
was not removed and it tried to create a network with the same name.
Also network disconnect works rootless now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-10 16:23:40 +01:00
a7690048b8 Merge pull request #12564 from Darkness4/main
rootless: declare TEMP_FAILURE_RETRY before usage (Fixes: #12563)
2021-12-10 15:10:30 +00:00
99bc00421b pprof CI flakes: enforce 5 seconds grace period
This gives the service 5 seconds to digest the signal and 5 more seconds
to shutdown.  Create a new variable to make bumping the timeout easier
in case we see re-flake in the future.

Fixes: #12167
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-10 15:01:44 +01:00
1d781ccbea [NO NEW TESTS NEEDED] rootless: declare TEMP_FAILURE_RETRY before usage (Fixes: #12563)
Signed-off-by: Nguyen Marc <nguyen_marc@live.fr>
2021-12-10 14:20:35 +01:00
f80a7fda74 Merge pull request #12555 from rhatdan/pod
--hostname should be set with podman create --pod new:PODNAME
2021-12-09 16:30:58 -05:00
b24f2ae901 Merge pull request #12547 from cevich/cached_swagger
[CI:DOCS] Cirrus: Use cached swagger binary
2021-12-09 18:11:28 +00:00
593d0907c5 --hostname should be set when using --pod new:foobar
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2030599

When you create pod, it shares the UTS namespace with Containers.
Currently the --hostname is not passed to the pod created when
you create a container and pod in the same command.

Also fix error message on supported --share flags

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-09 13:09:02 -05:00
c7ed2be8d2 Merge pull request #12556 from edsantiago/rm_rm_podman_pause_image
System tests: remove rm_pause_image()
2021-12-09 18:07:19 +00:00
9cfdffdfa3 Merge pull request #12557 from vrothberg/fix-11825
inotify: make sure to remove files
2021-12-09 17:45:22 +00:00
a63035be20 Cirrus: Use cached swagger binary
An error was observed in another PR while downloading the swagger
binary.  The error was relating to the upstream egress quota.  Obviously
our downloading it every time for each CI run isn't helping.  Fix this
by moving the download into the image-build process, and simply re-use
the already present binary here.

Ref: https://github.com/containers/automation_images/pull/103

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-12-09 12:14:44 -05:00
6d19ecadc8 inotify: make sure to remove files
Issue #11825 suggests that *rootless* Podman can run into situations
where too many inotify fds are open.  Indeed, rootless Podman has a
slightly higher usage of inotify watchers than the root counterpart
when using slirp4netns

Make sure to not only close all watchers but to also remove the files
from being watched.  Otherwise, the fds only get closed
when the files are removed.

[NO NEW TESTS NEEDED] since we don't have a way to test it.

Fixes: #11825
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-09 17:06:21 +01:00
18854f5666 System tests: remove rm_pause_image()
...it's not needed: teardown() already does it. Or, it would,
if it had been updated to deal with the new pause image naming
convention, which I've just done.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-09 08:23:43 -07:00
4a52a457d1 Merge pull request #12545 from vrothberg/fix-12477
generate systemd: support entrypoint JSON strings
2021-12-09 08:41:29 +00:00
02eaebda46 Merge pull request #12541 from flouthoc/remote_blank_entrypoint
specgen: honor empty args for entrypoint specified as `--entrypoint ""`
2021-12-08 16:50:20 +00:00
b526a0ccdc specgen: honor empty args for entrypoint
Users should be able to override containers entrypoint using
`--entrypoint ""` following works fine for podman but not for podman
remote.

Specgen ignores empty argument for entrypoint so make specgen honor
empty arguments.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-08 20:26:36 +05:30
2d517b687b generate systemd: support entrypoint JSON strings
Make sure to preserve the quoting of entrypoint JSON strings.

Fixes: #12477
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-08 15:51:23 +01:00
d6079debd8 Merge pull request #12529 from vrothberg/fix-12436
remove runlabel test for global opts
2021-12-08 14:42:19 +00:00
2d88c5f543 Merge pull request #12543 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.30.0incompatible
Bump github.com/uber/jaeger-client-go from 2.29.1+incompatible to 2.30.0+incompatible
2021-12-08 14:38:17 +00:00
6c05961baa Bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.29.1+incompatible to 2.30.0+incompatible.
- [Release notes](https://github.com/uber/jaeger-client-go/releases)
- [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber/jaeger-client-go/compare/v2.29.1...v2.30.0)

---
updated-dependencies:
- dependency-name: github.com/uber/jaeger-client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-08 12:25:53 +00:00
31be3a9f24 Merge pull request #12538 from giuseppe/fix-12535
utils: reintroduce moveToCgroup
2021-12-08 11:44:14 +00:00
d7f6f4e881 remove runlabel test for global opts
GLOBAL_OPTS haven't been supported for at least two major versions of
Podman.  The runlabel code is extremely fragile and I think it should
be rewritten before adding new features.

Fixes: #12436
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-08 11:37:13 +01:00
0999245e40 utils: reintroduce moveToCgroup
commit ee62711136339c5daf38e38859227d85b06fc32a introduced the
regression.

It was mistakenly removed as part of a cleanup, but this code is
needed by another code path, where we move conmon for the exec session
to the same cgroup used by conmon for the process.

Closes: https://github.com/containers/podman/issues/12535

[NO NEW TESTS NEEDED] it fixes a regression in the CI

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-08 09:31:31 +01:00
3b21ba2f62 Merge pull request #12531 from vrothberg/fix-11636
vendor c/image/v5@main
2021-12-07 21:10:19 +00:00
471defbd40 Merge pull request #12524 from Luap99/resolve-symlink
rootless netns: resolve all path components for resolv.conf
2021-12-07 21:08:21 +00:00
38f3ae3fd5 Merge pull request #12532 from lsm5/containers-common-rpm-version-copr
autocopr: distro conditionals for containers-common
2021-12-07 19:38:22 +00:00