7261 Commits

Author SHA1 Message Date
7a3bfbf076 podmanV2: implement logs
Implement the `podman {container} logs` for the v2 client. The remote
client does not yet support it.  There's some more work needed for the
rest api; some options are missing (e.g., printing names) while others
are broken (e.g., the until http parameter).

The remote parts will be tackled in a future change.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-09 11:55:10 +02:00
46227e0b03 Merge pull request #5768 from mtrmac/make-vendor
Fix (make vendor)
2020-04-09 10:37:54 +02:00
4503650f41 test: enable preserve fds test for crun
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 10:17:43 +02:00
d3cfa7a23c test: fix exec preserve-fds test
it specifies a fd is passed down but we are not really doing it, and
it triggers the wrong fd to be closed by Podman after the OCI runtime
invocation.

Closes: https://github.com/containers/libpod/issues/5769

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 10:17:42 +02:00
3c94fa9cc7 Merge pull request #5758 from rhatdan/exitcode
Set exit codes on errors.
2020-04-09 03:02:55 +02:00
1229350377 Merge pull request #5748 from baude/v2imageformat
podmanv2 images user format
2020-04-09 03:00:40 +02:00
82bd7589e7 Set exit codes on errors.
podmanV2 run fedora /etc
Should exit with 126
podmanV2 run fedora /etc/foobar
Should exit with 127
podmanv2 run --fobar fedora echo hello
Should exit with 125
podmanv2 run fedora bash -c "exit 100"
Should exit with 100

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-08 15:54:35 -04:00
f71e4d3d3e Merge pull request #5388 from lsm5/tests-apiv2-kill-exists
add tests for container kill and exists
2020-04-08 21:50:45 +02:00
1791fe62a3 Merge pull request #5761 from dmitris/patch-1
update the latest version to 1.8.2
2020-04-08 21:00:58 +02:00
55c74b6dbe Run (make vendor)
... now that it actually runs (go mod tidy).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-04-08 20:43:28 +02:00
439485f096 Fix (make vendor)
(export a=b command args) does not run (command args) with a=b,
it sets $a to b, and marks variables $a $command $args as exported,
i.e. (command args) is not run.

So we were not actually running (go mod tidy).

Fix that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-04-08 20:42:02 +02:00
55eea9127a logformat: handle apiv2 results, add anchor links
apiv2 tests emit TAP-compliant output; recognize it and
highlight it the same way we do BATS tests.

Add anchor links to TAP output, so other tools (e.g.
cirrus-flake-summarize) can link to particular lines

And, remove a "-f" from "wait" in test-apiv2; looks
like there's some version of bash used in some CI VM
that doesn't grok it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-08 12:10:24 -06:00
e95a6d315b update the latest version to 1.8.2
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
2020-04-08 17:14:23 +02:00
ce35fe3730 add tests for kill and exists
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-04-08 10:46:57 -04:00
8ce23775a6 v2podman ps alter formats
in order to get the go templating to work for custom input, we now use structure methods instead of template map funcs.  this requires some manipulation of fields so that the funcs can have the proper names.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-08 09:11:26 -05:00
291ad7fbd9 Merge pull request #5759 from rhatdan/fix
run/create were processing options after the image name
2020-04-08 15:58:48 +02:00
4829136dab run/create were processing options after the image name
flags.SetInterspersed(false)

Needs to be added to allow options to be used within the containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-08 08:33:34 -04:00
522dcd604e Merge pull request #5756 from TomSweeneyRedHat/dev/tsweeney/buildahv1.14.7
Bump Buildah to v1.14.7
2020-04-08 12:44:24 +02:00
878570bf70 Merge pull request #5724 from zypA13510/patch-1
man page: add note about issue with SELinux
2020-04-08 12:42:05 +02:00
e0847f5457 V2 podman system service
* Added support for system service
* Enabled linting on the varlinkapi source, needed to support V2
  service command
* Added support for PODMAN_SOCKET

Skip linting deprecated code

Rather than introduce bugs by correcting deprecated code, linting the
code is being skipped. Code that is being ported into V2 is being
checked.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-07 19:22:10 -07:00
af83322679 man page: add note about issue with SELinux
Signed-off-by: Yuping Zuo <zypA13510@users.noreply.github.com>
2020-04-08 08:07:28 +08:00
405bd5f49a Bump Buildah to v1.14.7
As the title says, bumping Buildah to v1.14.7

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-04-07 18:20:46 -04:00
b4840ec0d3 Merge pull request #5753 from rhatdan/vendor
Bump containers/image to v5.4.3
2020-04-07 22:24:31 +02:00
11c8b01e1d Merge pull request #5739 from jwhonce/wip/diff
V2 Podman diff(changes) support
2020-04-07 21:49:24 +02:00
cfd64d3e2c Bump containers/image to v5.4.3
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-07 14:23:59 -04:00
08fa3d511f Merge pull request #5744 from vrothberg/update-image
vendor c/image v5.4.2
2020-04-07 20:14:59 +02:00
9d0d9df6a1 Merge pull request #5157 from QiWang19/rootless-test-login
fix rootless login/logout tests
2020-04-07 19:32:09 +02:00
b3a3fc3ef6 Merge pull request #5749 from rhatdan/reset
podman info needs to be run within the user namespace
2020-04-07 19:23:05 +02:00
8289805f5d Merge pull request #5738 from baude/v2info
podmanv2 info
2020-04-07 19:00:57 +02:00
8ae28a55ac V2 podman diff(changes) support
* Ported CLI command
* Added API endpoint
* Added bindings
* Updated swagger (TODO: n endpoints, one handler)

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-07 09:39:46 -07:00
b0592e5540 podman info needs to be run within the user namespace
Accidently removed podman info from user namespace

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-07 10:02:50 -04:00
44f910c28c Merge pull request #5728 from openSUSE/pids.current
Do not error on pids.current stats if ctr.path is empty
2020-04-07 15:56:50 +02:00
90884ac2d2 podmanv2 images user format
honor the format provided by user for output

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-07 08:27:10 -05:00
013ecca895 podmanv2 info
add ability to run info for v2

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-07 07:15:09 -05:00
c0e29b4a31 Merge pull request #5734 from baude/v2run
v2podman run
2020-04-07 13:01:47 +02:00
42fcdbf1a8 vendor c/image v5.4.2
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-07 12:09:48 +02:00
7864afd6b2 Do not error on pids.current stats if ctr.path is empty
If the ctr.path is empty, then we do not try to access
`/sys/fs/cgroup/pids/pids.current` any more because this path will be
wrong in any case. We now return and do not set the PIDs stats.

Refers to https://github.com/cri-o/cri-o/issues/3522

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-04-07 09:03:30 +02:00
7f801b437f fix rootless login/logout tests
fix rootless login/logout tests. Since c/image can support peruser certs directory, this path uses $HOME dir as certs.d to avoid permission deny failures.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-06 18:01:45 -04:00
64b6a19733 Merge pull request #5478 from giuseppe/auto-userns
userns: support --userns=auto
2020-04-06 23:08:36 +02:00
1bfb96b540 v2podman run
add the ability to run a container

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 15:23:04 -05:00
843fa25890 Merge pull request #5716 from baude/v2ps
podmanv2 ps
2020-04-06 22:04:16 +02:00
7d95e0c47a Merge pull request #5507 from baude/newinfo
refactor info
2020-04-06 21:27:52 +02:00
0519fa0f1e Merge pull request #5726 from containers/dependabot/go_modules/github.com/containers/storage-1.18.2
build(deps): bump github.com/containers/storage from 1.18.1 to 1.18.2
2020-04-06 21:17:27 +02:00
a858b3a6a3 Merge pull request #5705 from rhatdan/reset
Cleanup whether to enter user namespace
2020-04-06 20:48:05 +02:00
e20ecc733c refactor info
the current implementation of info, while typed, is very loosely done so.  we need stronger types for our apiv2 implmentation and bindings.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:45:42 -05:00
b22254dc8b podmanv2 ps
add the ability to list containers

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:12:59 -05:00
e318b09b68 Merge pull request #5620 from cfelder/play-kube-networking
Add support for specifying CNI networks in podman play kube
2020-04-06 18:45:25 +02:00
09f553cc80 Merge pull request #5731 from baude/v2start
podmanv2 start
2020-04-06 18:03:34 +02:00
4b69cf0950 Merge pull request #5725 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.5.0
build(deps): bump github.com/opencontainers/selinux from 1.4.0 to 1.5.0
2020-04-06 16:47:06 +02:00
3a0a727110 userns: support --userns=auto
automatically pick an empty range and create an user namespace for the
container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-06 16:32:36 +02:00