11535 Commits

Author SHA1 Message Date
417f362811 Cleanup /libpod/images/load handler
* Remove orphaned code
* Add meaningful error from LoadImageFromSingleImageArchive() when
  heuristic fails to determine payload format
* Correct swagger to output correct types and headers

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-19 09:25:12 -07:00
5325957d53 Merge pull request #9735 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.15.2
Bump github.com/onsi/ginkgo from 1.15.1 to 1.15.2
2021-03-19 08:06:04 -07:00
adf652e2a1 vendor: drop replace for github.com/syndtr/gocapability
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-19 15:17:12 +01:00
e85cf8f4a2 security: use the bounding caps with --privileged
when --privileged is used, make sure to not request more capabilities
than currently available in the current context.

[NO TESTS NEEDED] since it fixes existing tests.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-19 15:17:11 +01:00
f46b34ecd2 Bump github.com/containers/common from 0.35.0 to 0.35.3
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.35.0 to 0.35.3.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.35.0...v0.35.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 15:03:28 +01:00
61e3b152fc Merge pull request #9758 from jmguzik/volumes-networks-http-fix
Fix volumes and networks list/prune filters in http api
2021-03-19 07:01:03 -07:00
2c967c376a Merge pull request #9760 from containers/dependabot/go_modules/k8s.io/apimachinery-0.20.5
Bump k8s.io/apimachinery from 0.20.4 to 0.20.5
2021-03-19 06:58:01 -07:00
5a18b5eb7f Bump k8s.io/apimachinery from 0.20.4 to 0.20.5
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.20.4 to 0.20.5.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.20.4...v0.20.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 11:26:10 +00:00
c4a5513730 Merge pull request #9734 from containers/dependabot/go_modules/github.com/containers/storage-1.28.0
Bump github.com/containers/storage from 1.25.0 to 1.28.0
2021-03-19 03:49:17 -07:00
aa2d6e6e6c Fix volumes and networks list/prune filters in http api
This is the continuation work started in #9711. It turns out
that list/prune commands for volumes in libpod/compat api have
very dangerous error handling when broken filter input is supplied.
Problem also affects network list/prune in libpod. This commit
unifies filter handling across libpod/compat api and adds sanity
apiv2 testcases.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-19 00:09:29 +01:00
ec1651fbf1 Bump github.com/containers/storage from 1.25.0 to 1.28.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.25.0 to 1.28.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.25.0...v1.28.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-18 20:27:25 +01:00
5d9b07096b Merge pull request #9748 from vrothberg/lazy-vendoring
add a dependabot config to automate vendoring
2021-03-18 08:54:31 -07:00
1ca74b00d7 add a dependabot config to automate vendoring
While dependabot has turned out great to automate updating dependencies,
a major painpoint was that we had to manually run `make vendor` for each
and every commit.  It was causing noise.

Adding the config file to `.github/dependabot.yml` will take of also
updating the `./vendor` tree.  `containers/common` is using this config
for a while successfully.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-18 15:18:13 +01:00
629183bd7f Merge pull request #9710 from jmguzik/network-prune-filters-http-api
Network prune filters for http api (compat and libpod)
2021-03-18 06:32:29 -07:00
a596d1f5d0 Bump github.com/onsi/ginkgo from 1.15.1 to 1.15.2
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.15.1 to 1.15.2.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.15.1...v1.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-18 14:18:47 +01:00
77b3a2df64 Merge pull request #9739 from giuseppe/use-latest-crun-runc
Latest crun/runc should handle blkio-weight test
2021-03-18 05:45:27 -07:00
6f6cc1cce6 Merge pull request #9736 from jmguzik/fix-image-prune-cmd-message
fix user message image prune --all
2021-03-17 17:56:32 -07:00
8ea02d0b60 network prune filters for http compat and libpod api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-18 00:01:50 +01:00
b819f14001 Merge pull request #9717 from nalind/error-race
[NO TESTS NEEDED] pkg/bindings/images.Build(): fix a race condition in error reporting
2021-03-17 14:31:39 -07:00
8da5fd8209 test: check for io.stat existence on cgroup v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-17 21:35:11 +01:00
592aae4f92 test: fix test for last crun/runc
there was a documentation issue for the kernel that reported the range
to be different than on cgroup v1.

The issue has been fixed in crun/runc.  Adapt the test.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-17 18:41:16 +01:00
1c873c7da8 test: simplify cgroup path
with cgroup v2, the cgroupns is enabled by default.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-17 16:39:40 +01:00
af3499db5a Latest crun/runc should handle blkio-weight test
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-17 16:39:39 +01:00
82858a97c4 fix user message image prune --all
User message was the same as in the case of no flag provided.
This commit aligns message with the one used in docker.

[NO TESTS NEEDED]

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-17 13:09:48 +01:00
3d7a8cf2af Merge pull request #9714 from rhatdan/build
Switch all builds to pull-never
2021-03-17 02:30:54 -07:00
9439b699b8 Merge pull request #9728 from ashley-cui/secretdocs
[CI:DOCS] removing secrets is safe for in-use secrets
2021-03-17 02:27:54 -07:00
3d01d42f26 Docs: removing secrets is safe for in-use secrets
Add docs explaining that it is safe to remove a secret that is in use by
a container: secrets are copied and mounted into the container at
creation

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-16 16:18:58 -04:00
21f229a3dd Downgrade github.com/coreos/go-systemd/v22
Downgrade github.com/coreos/go-systemd/v22 to a version that will build
against systemd headers that we have on CentOS 8.  This also pulls in
github.com/varlink/go.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-03-16 16:15:06 -04:00
e8918ff10b pkg/bindings/images.Build(): fix a race condition in error reporting
In nTar(), don't return the error value when the goroutine that's
populating the error value can continue running long after nTar()
returns.  Instead, wrap the Close() method of the pipe that we're
returning in a function that collects those errors, along with any error
we get from closing the pipe, and returns them from Close() wrapper.

In Build(), if the Close() method returns an error, at least log it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-03-16 14:14:32 -04:00
604459b404 Merge pull request #9711 from jmguzik/volume-prune-fix-http-compat
Fix for volumes prune in http compat api when using filters
2021-03-16 11:32:32 +01:00
0f954e2371 Merge pull request #9695 from jmguzik/array-inspect-network-fix
Fix array instead of one elem network http api
2021-03-16 11:31:33 +01:00
d9f84692c1 Merge pull request #9589 from troyready/add_compat_auth_endpoint
add /auth for docker compatibility
2021-03-16 11:26:32 +01:00
72ddf2fb96 Merge pull request #9719 from edsantiago/bats
System test cleanup
2021-03-16 11:25:33 +01:00
310eae4ba4 Switch all builds to pull-never
Fixes: https://github.com/containers/buildah/issues/2779

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-16 06:19:58 -04:00
963d19c759 System test cleanup
- cp test: clean up stray image

- build test: add workaround for #9567 (ultra-slow ubuntu).
  We're seeing CI flakes (timeouts) due to ubuntu 2004 being
  absurdly slow. Workaround: double our timeout on one specific
  test when ubuntu + remote.

- build test: clean up new copy-from test (from #9275).
  The test was copy-pasted from buildah system tests, without
  really adapting for podman environment (e.g. it was using
  images that we don't use here, and would cause pulls, which
  will cause flakes). Rewrite test so it references only $IMAGE,
  remove some confusing/unnecessary stuff, selectively run
  parts of it even when rootless or remote, and add a
  test to confirm that copy-from succeeded.

- load test: add error-message test to new load-invalid (#9672).
  Basically, make sure the command fails for the right reason.

- play test (kube): use $IMAGE, not alpine; and add pause-image
  cleanup to teardown()

- apiv2 mounts test: add a maintainability comment in a tricky
  section of code; and tighten up the mount point test.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-15 15:27:06 -06:00
f4b2d597a8 Fix for volumes prune in http compat api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-15 20:17:05 +01:00
e7dc59252b Merge pull request #9716 from Luap99/remote-libpod
Do not leak libpod package into the remote client
2021-03-15 14:25:30 -04:00
8de5607039 Fix remote client timezone test
The New York timezone changes between summer and winter time.
Make sure the test allows both timezones.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-15 15:56:57 +01:00
57e8c66322 Do not leak libpod package into the remote client
Some packages used by the remote client imported the libpod package.
This is not wanted because it adds unnecessary bloat to the client and
also causes problems with platform specific code(linux only), see #9710.

The solution is to move the used functions/variables into extra packages
which do not import libpod.

This change shrinks the remote client size more than 6MB compared to the
current master.

[NO TESTS NEEDED]
I have no idea how to test this properly but with #9710 the cross
compile should fail.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-15 14:02:04 +01:00
762148deb6 Split libpod/network package
The `libpod/network` package should only be used on the backend and not the
client. The client used this package only for two functions so move them
into a new `pkg/network` package.

This is needed so we can put linux only code into `libpod/network`, see #9710.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-15 14:01:52 +01:00
955aaccc55 fix use with localhost (testing)
Signed-off-by: troyready <troy@troyready.com>
2021-03-12 10:48:03 -08:00
9251b6c8cf add /auth for docker compatibility
This endpoint just validates credentials:
https://github.com/moby/moby/blob/v20.10.4/api/swagger.yaml#L7936-L7977

Fixes: #9564
Signed-off-by: troyready <troy@troyready.com>
2021-03-12 10:39:15 -08:00
fc02d16e72 Merge pull request #9684 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.8.1
Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
2021-03-12 12:15:27 -05:00
605df430d9 Merge pull request #9703 from jmguzik/endpoint-networks
[NO TESTS NEEDED] create endpoint for querying libpod networks
2021-03-12 12:14:27 -05:00
0d6673e16c Merge pull request #9699 from jwhonce/wip/tests
Delete all containers and pods between tests
2021-03-12 11:36:30 -05:00
5b22ddd08e Merge pull request #9697 from edsantiago/fedora_gating_test_hang
sdnotify tests: try real hard to kill socat processes
2021-03-12 13:34:27 +00:00
3803d0a4a9 create endpoint for querying libpod networks
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-12 13:06:08 +01:00
12fb9e4653 Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.8.0...v1.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-12 06:15:31 -05:00
660a72993c sdnotify tests: try real hard to kill socat processes
podman gating tests are hanging in the new Fedora CI setup;
long and tedious investigation suggests that 'socat' processes
are being left unkilled, which then causes BATS to hang when
it (presumably) runs a final 'wait' in its end cleanup.

The two principal changes are to exec socat in a subshell
with fd3 closed, and to pkill its child processes before
killing the process itself. I don't know if both are needed.
The pkill definitely is; the exec may just be superstition.
Since I've wasted more than a day of PTO time on this, I'm
okay with a little superstition. What I do know is that with
these two changes, my reproducer fails to reproduce in over
one hour of trying (normally it fails within 5 minutes).

AND, update: only rawhide (f35) leaves stray socat processes
behind. f33 and ubuntu do not, so 'pkill -P' fails.

I really have no idea what's going on.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-11 16:21:51 -07:00
7b0155cf78 Fix array instead of one elem network http api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-12 00:03:03 +01:00