10298 Commits

Author SHA1 Message Date
af36d444a5 Clean up temporary file.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-12-15 16:07:43 +01:00
999d40d2c7 Merge pull request #8692 from rhatdan/network
[CI:DOCS] Cleanup CNI Networks on reboot
2020-12-14 10:42:50 -05:00
2854cdcd58 Merge pull request #8714 from edsantiago/more_journald_rootless_skips
RHEL gating tests: more journald exceptions
2020-12-14 10:40:34 -05:00
0fd31e2994 Merge pull request #8696 from Luap99/podman-events-until
podman events allow future time for --until
2020-12-14 09:33:42 -05:00
803c078d3b Merge pull request #8693 from giuseppe/drop-valid-id-in-userns-check
podman: drop checking valid rootless UID
2020-12-14 09:31:20 -05:00
e5741b984e Merge pull request #8689 from bblenard/issue-8672-volume-prune
Add volume prune --filter support
2020-12-14 09:22:30 -05:00
4d7e05f9ba RHEL gating tests: more journald exceptions
Followup to #8284, due to my not having noticed #8096.

RHEL gating tests are failing again due to rhbz#1895105, the
one where we can't run journalctl rootless on RHEL. #8284 fixed
this for some RHEL builds of older podman, but I missed #8096
which added yet another logs test.

This brings us to three journalctl exceptions, which means
it gets complicated because I have to refactor it all.

**THIS IS NOT SUSTAINABLE**. We need some way to have a similar
setup in CI, with a permission-less rootless login, so we don't
add yet another logs test some day and discover, months later,
that it doesn't work on RHEL and then have to go into crisis
mode.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-14 06:40:46 -07:00
bdbf47f606 Merge pull request #8699 from Luap99/network-flag-completion
shell completion for the network flag
2020-12-14 08:32:52 -05:00
a0204ada09 Add volume prune --filter support
This change adds support for the `--filter` / `?filters` arguments on
the `podman volume prune` subcommand.

  * Adds ParseFilterArgumentsIntoFilters helper for consistent
    Filter string slice handling
  * Adds `--filter` support to podman volume prune cli
  * Adds `?filters...` support to podman volume prune api
  * Updates apiv2 / e2e tests

Closes #8672

Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
2020-12-12 20:07:04 -06:00
f7bd0a495a shell completion for the network flag
Complete all the options e.g. `container:`,`ns:`,`host`, etc...

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-12 19:10:25 +01:00
a226e6ed31 Merge pull request #8553 from baude/composeci
add compose regression to ci
2020-12-12 06:50:25 -05:00
36bec385f3 Merge pull request #7718 from QiWang19/sign-multi-arch
Sign multi-arch images
2020-12-12 03:46:31 -05:00
1d50245a20 Merge pull request #8676 from jwhonce/issues/7806
Refine public key usage when remote
2020-12-11 23:10:11 -05:00
fbcd44567c Merge pull request #8688 from rhatdan/start
Handle --rm when starting a container
2020-12-11 21:54:55 -05:00
74fcd9fef3 podman events allow future time for --until
The podman events aren't read until the given timestamp if the
timestamp is in the future. It just reads all events until now
and exits afterwards.
This does not make sense and does not match docker. The correct
behavior is to read all events until the given time is reached.

This fixes a bug where the wrong event log file path was used
when running first time with a new storage location.
Fixes #8694

This also fixes the events api endpoint which only exited when
an error occurred. Otherwise it just hung after reading all events.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-11 23:15:09 +01:00
6730556e2f Sign multi-arch images
podman image sign handles muti-arch images.
--all option to create signature for each manifest from the image manifest list.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-11 14:15:56 -05:00
cb91bf96e0 add compose test descriptions
adding compose test descriptions and validations.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-11 10:07:13 -06:00
b0a287ce46 Merge pull request #8686 from Luap99/logs-stderr
podman logs honor stderr correctly
2020-12-11 10:38:17 -05:00
f3e69d7300 test-compose: rewrite to new subdir form
...in which we use all-local tests

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-11 09:27:42 -06:00
82d7b9f2e2 add compose regression to ci
to prevent any regressions, we should be running regression tests using
compose.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-11 09:26:29 -06:00
47af0afbd1 WIP: test docker-compose
git-fetch a set of docker-compose examples

Add a mechanism for 'curl'ing to verify that service is up.

For each docker-compose directory:
  1) test that it comes up
  2) use 'curl' to confirm that the service is up
  3) bring it back down

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-11 09:23:50 -06:00
99ac30a882 Merge pull request #8690 from zhangguanzhang/apiv2-wrong-ImgName
Fix Wrong img name used when creating a container from an image which had multi names
2020-12-11 10:20:16 -05:00
335c59e7dc Merge pull request #8691 from Luap99/network-compat
Fix some network compat api problems
2020-12-11 10:04:28 -05:00
f711f5a68d podman: drop checking valid rootless UID
do not check whether the specified ID is valid in the user namespace.

crun handles this case[1], so the check in Podman prevents to get to
the OCI runtime at all.

$ podman run --user 10:0 --uidmap 0:0:1 --rm -ti fedora:33 sh -c 'id; cat /proc/self/uid_map'
uid=10(10) gid=0(root) groups=0(root),65534(nobody)
        10          0          1

[1] https://github.com/containers/crun/pull/556

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-11 15:43:33 +01:00
2e0a9c453b Cleanup CNI Networks on reboot
CNI sometimes leaves Network information in /var/lib/cni/networks
when the system crashes or containers do not shut down properly.

This PR will cleanup these left over files, so that container engines
will get a clean enviroment when the system reboots.

Related to: https://github.com/containers/podman/issues/3759

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-11 09:18:38 -05:00
2a35387e9e Fix some network compat api problems
Network create could panic when used with a json body like this:
`{"Name":"net","IPAM":{"Config":[]}}`

The network scope for list and inspect should not be empty. It can
be swarm, global or local. We only support local networks so
hardcode this field to local.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-11 14:16:05 +01:00
fb25f737e5 Fix Wrong image tag is used when creating a container from an image with multiple tags
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-12-11 20:02:41 +08:00
098e0a7885 Handle --rm when starting a container
podman start should follow the same behaviour as podman run when removing a
container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-11 06:07:14 -05:00
dd954781e6 Merge pull request #8633 from baude/bindings3
Bindings refactor
2020-12-11 05:36:08 -05:00
7dd1da3787 Refine public key usage when remote
* Move all public key handling into one AuthMethod. Prioritize ssh-agent
  keys over identity files.
* Cache server connection when tunneling, saves one RoundTrip on ssh
  handshake

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-10 15:32:37 -07:00
ba545c49a2 podman logs honor stderr correctly
Make the ContainerLogsOptions support two io.Writers,
one for stdout and the other for stderr. The logline already
includes the information to which Writer it has to be written.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-10 22:24:43 +01:00
ead8b5be0f Bindings refactor
this is step one of refactoring our golang binaries.  we will no be
using structs to pass optional options.  required options will still
arguments to the binding itself.

the structs then have a generator to create helper functions which
should then be added to the git repo.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-10 12:53:08 -06:00
6823a5d6cc Merge pull request #8664 from rhatdan/prune
Add --filter to podman system prune
2020-12-10 13:32:41 -05:00
2bb149034b Merge pull request #8681 from Luap99/fix-image-exists-panic
Fix panic in libpod images exists endpoint
2020-12-10 10:16:41 -05:00
3fa61f0004 Fix panic in libpod images exists endpoint
The libpod images exists endpoint panics when called with
a non existing image and therefore returns 500 as status
code instead of the expected 404.

A test is added to ensure it is working.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-10 14:35:17 +01:00
deb00425c2 Merge pull request #8678 from containers/dependabot/go_modules/github.com/containernetworking/plugins-0.9.0
Bump github.com/containernetworking/plugins from 0.8.7 to 0.9.0
2020-12-10 07:38:02 -05:00
eaa19a1c10 Merge pull request #8641 from umohnani8/play
Do not pull if image domain is localhost
2020-12-10 05:20:48 -05:00
eb9e774304 Bump github.com/containernetworking/plugins from 0.8.7 to 0.9.0
Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 0.8.7 to 0.9.0.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](https://github.com/containernetworking/plugins/compare/v0.8.7...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-10 05:15:22 -05:00
9216be2008 Merge pull request #8636 from containers/dependabot/go_modules/github.com/containers/storage-1.24.3
Bump github.com/containers/storage from 1.24.1 to 1.24.3
2020-12-09 17:28:18 -05:00
eb053df784 Merge pull request #8670 from rhatdan/caps
Properly handle --cap-add all when running with a --user flag
2020-12-09 16:04:45 -05:00
15cdcdca76 Add --filter to podman system prune
Also document the allowable filters in podman system prune, podman image prune
and podman container prune.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 16:01:13 -05:00
c20bd35589 Fix storage.conf to define driver in the VM
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 15:09:39 -05:00
2605dd82bf Bump github.com/containers/storage from 1.24.1 to 1.24.3
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.24.1 to 1.24.3.
- [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.24.1...v1.24.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 15:09:38 -05:00
059c2ee739 Merge pull request #8669 from giuseppe/unmask-also-cover-ro-paths
security: honor systempaths=unconfined for ro paths
2020-12-09 15:04:41 -05:00
4511cb3852 Merge pull request #8659 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.7.0
Bump github.com/opencontainers/selinux from 1.6.0 to 1.7.0
2020-12-09 15:02:48 -05:00
43567c6539 Merge pull request #8657 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.4
Bump github.com/onsi/gomega from 1.10.3 to 1.10.4
2020-12-09 15:00:37 -05:00
6db3e9bfeb Merge pull request #8653 from rhatdan/buildah
Honor the --layers flag
2020-12-09 14:58:28 -05:00
da062b5bd0 Merge pull request #8635 from Luap99/shell-completion-test
Add system test for shell completion
2020-12-09 14:47:05 -05:00
1ace9e3ba6 Properly handle --cap-add all when running with a --user flag
Handle the ALL Flag when running with an account as a user.

Currently we throw an error when the user specifies

podman run --user bin --cap-add all fedora echo hello

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 14:21:16 -05:00
176be90e0a security: honor systempaths=unconfined for ro paths
we must honor systempaths=unconfined also for read-only paths, as
Docker does:

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-09 19:26:23 +01:00