Commit Graph

12209 Commits

Author SHA1 Message Date
Jakub Guzik 914218c1e8 Unification of until filter across list/prune endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-24 00:56:00 +01:00
Jakub Guzik 5eab1b0742 Unification of label filter across list/prune endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-24 00:40:30 +01:00
OpenShift Merge Robot 860de13d4f
Merge pull request #9749 from jwillikers/generate-kube-persistent-volume-claim
Generate Kubernetes PersistentVolumeClaims from named volumes
2021-03-23 13:20:22 -07:00
OpenShift Merge Robot 9982923276
Merge pull request #9537 from TomSweeneyRedHat/dev/tsweeney/tz_check
Validate passed in timezone from tz option
2021-03-23 12:52:22 -07:00
OpenShift Merge Robot ae1529ca19
Merge pull request #9774 from TomSweeneyRedHat/dev/tsweeney/usrns_man
[CI:DOCS] Add note to mappings for user/group userns in build
2021-03-23 12:25:22 -07:00
Matej Vasek 4db4c65443 fixup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-23 18:07:36 +01:00
Matej Vasek aba3bbd059 fix: build endpoint for compat API
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-23 17:48:28 +01:00
OpenShift Merge Robot 4d3e71ad28
Merge pull request #9296 from edsantiago/test_buildah_bud
run buildah bud tests using podman
2021-03-23 04:57:13 -07:00
OpenShift Merge Robot 60c90c3add
Merge pull request #9778 from containers/dependabot/go_modules/k8s.io/api-0.20.5
Bump k8s.io/api from 0.20.1 to 0.20.5
2021-03-22 14:07:22 -07:00
OpenShift Merge Robot d0bd775c02
Merge pull request #9773 from jmguzik/containers-prune-filters-http-api
Fix containers list/prune http api filter behaviour
2021-03-22 10:17:24 -07:00
OpenShift Merge Robot 2cd37edf02
Merge pull request #9775 from jmguzik/system-prune-msg-fix
Fix system prune cmd user message with options
2021-03-22 09:57:26 -07:00
TomSweeneyRedHat fb628e32f4 [CI:DOCS] Add note to mappings for user/group userns in build
Add a note to the `--userns-uid-map` and `--userns-gid-map` options in
the `podman build` man page.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1930509

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-03-22 11:56:38 -04:00
OpenShift Merge Robot 9ec936a856
Merge pull request #9757 from jwhonce/wip/load
Cleanup /libpod/images/load handler
2021-03-22 08:18:56 -07:00
OpenShift Merge Robot c1f2f75f03
Merge pull request #9779 from containers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.3.0
Bump github.com/coreos/go-systemd/v22 from 22.1.0 to 22.3.0
2021-03-22 06:49:53 -07:00
dependabot[bot] 3b609a706d
Bump github.com/coreos/go-systemd/v22 from 22.1.0 to 22.3.0
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.1.0 to 22.3.0.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.1.0...v22.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 09:29:19 +00:00
dependabot[bot] 373d25cc67
Bump k8s.io/api from 0.20.1 to 0.20.5
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.20.1 to 0.20.5.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.20.1...v0.20.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 09:28:53 +00:00
OpenShift Merge Robot df1d5618dd
Merge pull request #9771 from edsantiago/bats
System tests: reenable a bunch of skipped tests
2021-03-22 01:17:52 -07:00
TomSweeneyRedHat 5b2e71dc5b Validate passed in timezone from tz option
Erik Sjolund reported an issue where a badly formated file
could be passed into the `--tz` option and then the date in the container
would be badly messed up:

```
erik@laptop:~$ echo Hello > file.txt
erik@laptop:~$ podman run --tz=../../../home/erik/file.txt --rm -ti
docker.io/library/alpine cat /etc/localtime
Hello
erik@laptop:~$ podman --version
podman version 3.0.0-rc1
erik@laptop:~$
```
This fix checks to make sure the TZ passed in is a valid
value and then proceeds with the rest of the processing.

This was first reported as a potential security issue, but it
was thought not to be.   However, I thought closing the hole
sooner rather than later would be good.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-03-21 17:25:35 -04:00
Jakub Guzik 1dfbdd5d98 Fix system prune cmd user message with options
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-21 18:03:31 +01:00
Ed Santiago 3baa9da4ed WIP: run buildah bud tests using podman
Set of scripts to run buildah's bud.bats test using
podman build in podman CI.

podman build is not 100% compatible with buildah bud.
In particular:

  * podman defaults to --layers=true; buildah to false
  * podman defaults to --force-rm=true; buildah to false
  * podman error exit status is 125; buildah is 2
  * differences in error messages, command-line arguments

Some of the above can be dealt with programmatically,
by tweaking the buildah helpers.bash (BATS helpers).
Some need to be tweaked by patching bud.bats itself.
This PR includes a patch that will, I fear, need to
be periodically maintained over time.

There will likely be failures when vendoring in a
new buildah, possibly because new tests were added
for new features that don't exist in podman, possibly
(I hope unlikely) if existing tests are changed in
ways that make the patch file fail to apply. I've
tried to write good instructions and to write the run
script in such a way that it will offer helpful hints
on failure. My instructions and code will be imperfect;
I hope they will be good enough to merit continued use
of this test (possibly with improvements to the instructions
as we learn more about real-world failures).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-21 06:59:01 -06:00
Jakub Guzik 907b34c46f Fix containers list/prune http api filter behaviour
The problem described in #9711 and followed by #9758 affects
containers as well. When user provides wrong filter input, error
message should occur, not fallback to full list/prune command.
This change fixes the issue. Additionally, there are error message
fixes for docker http api compat.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-20 22:56:01 +01:00
Ed Santiago afce37671f System tests: reenable a bunch of skipped tests
Checking for 'skip.*[0-9]{4,5}', and checking status on said
issues, finds several that have been closed. Let's see if
they're really fixed.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-20 08:21:46 -06:00
OpenShift Merge Robot ebc9871c93
Merge pull request #9762 from giuseppe/use-bounding-caps-for---privileged
security: use the bounding caps with --privileged
2021-03-19 16:00:32 -07:00
Jordan Williams 1e255b6df9
Generate Kubernetes PersistentVolumeClaims from named volumes
Fixes #5788

This commit adds support for named volumes in podman-generate-kube.
Named volumes are output in the YAML as PersistentVolumeClaims.
To avoid naming conflicts, the volume name is suffixed with "-pvc".
This commit adds a corresponding suffix for host path mounts.
Host path volumes are suffixed with "-host".

Signed-off-by: Jordan Williams <jordan@jwillikers.com>
2021-03-19 13:52:35 -05:00
Jhon Honce 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
OpenShift Merge Robot 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
Giuseppe Scrivano 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
Giuseppe Scrivano 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
dependabot[bot] 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
dependabot[bot] 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
OpenShift Merge Robot 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
Jakub Guzik 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
Giuseppe Scrivano 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
OpenShift Merge Robot 5d9b07096b
Merge pull request #9748 from vrothberg/lazy-vendoring
add a dependabot config to automate vendoring
2021-03-18 08:54:31 -07:00
Valentin Rothberg 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
OpenShift Merge Robot 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
dependabot-preview[bot] 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Jakub Guzik 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
OpenShift Merge Robot 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
Giuseppe Scrivano 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
Giuseppe Scrivano 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
Giuseppe Scrivano 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
Daniel J Walsh 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
Jakub Guzik 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
OpenShift Merge Robot 3d7a8cf2af
Merge pull request #9714 from rhatdan/build
Switch all builds to pull-never
2021-03-17 02:30:54 -07:00
OpenShift Merge Robot 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