Commit graph

1252 commits

Author SHA1 Message Date
OpenShift Merge Robot 01f747fdc3
Merge pull request #6168 from vrothberg/mount-tests
enable rootless mount tests
2020-05-11 15:12:42 +02:00
Valentin Rothberg e4ab0cfbc6 enable rootless mount tests
Remove the annotation from the umount command to make mount tests pass
and let podman-umount run as a non-root user.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-11 13:03:09 +02:00
Giuseppe Scrivano 76f8efc0d0
spec: fix order for setting rlimits
also make sure that the limits we set for rootless are not higher than
what we'd set for root containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-05-11 13:02:33 +02:00
Brent Baude 9b66d1321e enable rootless integration testing
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-10 09:09:07 -05:00
OpenShift Merge Robot 13db0f2b61
Merge pull request #6118 from baude/v2bindingsenforce
set binding tests to required
2020-05-08 17:57:10 +02:00
OpenShift Merge Robot f4e3ec5fd6
Merge pull request #6134 from vrothberg/systemd-unit-tests
fix and enable systemd system tests
2020-05-08 16:13:13 +02:00
Brent Baude 20407a2f1f fix pod stats flake
it appears that the pod stats flake can be attributed to the fact that the container being run is not fully running when the stats call is made.  because the stats call is in format of json, it fails when nil

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-08 09:05:37 -05:00
OpenShift Merge Robot 7c63059287
Merge pull request #6117 from vrothberg/v2-runlabel
container runlabel
2020-05-08 15:17:26 +02:00
Valentin Rothberg 42c6aa1a42 fix and enable systemd system tests
The systemd unit test never ran in CI and was broken for various
reasons.  Fix the test to execute Podman in systemd units and to also
run generated units files.

Note: more tests will be added in the future.  The simple check for now
will prevent regressions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-08 13:05:25 +02:00
Valentin Rothberg ff1c59065e
Merge pull request #6130 from vrothberg/pidfile
set --conmon-pidfile
2020-05-08 13:04:59 +02:00
OpenShift Merge Robot cc6a77cc88
Merge pull request #6078 from QiWang19/auth-common
auth pkg support emtpy argument & enable login test
2020-05-08 12:54:41 +02:00
Valentin Rothberg 676efd89d5 set --conmon-pidfile
The --conmon-pidfile was not set in the spec leading to failing systemd
units.  Also add a system test to prevent future regressions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-08 10:53:11 +02:00
Giuseppe Scrivano 99bdafba99
podman: split env variables in env and overrides
There are three different priorities for applying env variables:

1) environment/config file environment variables
2) image's config
3) user overrides (--env)

The third kind are known to the client, while the default config and image's
config is handled by the backend.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-07 14:16:50 -04:00
OpenShift Merge Robot 1d3cdf9a46
Merge pull request #5961 from QiWang19/manifest-remove-push
Manifest remove, push
2020-05-07 19:10:32 +02:00
baude e9a17da1c5 v2trust set and show
add podman image trust set and show

Signed-off-by: baude <bbaude@redhat.com>
Signed-off-by: bbaude <bbaude@DESKTOP-SH5EG3J.localdomain>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-07 09:55:52 -05:00
Valentin Rothberg 61828cf480 container runlabel
Implement container runlabel for v2.  Local client only.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-07 16:18:39 +02:00
Qi Wang 45f731aa49 enable login/logut unspecified args
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-07 09:48:13 -04:00
Sujil02 2080421cad Enables port test
Adds port subcommand for containers
Updates check for no args when all flag is set.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-05-06 16:06:41 -04:00
OpenShift Merge Robot 8b5df5b5d9
Merge pull request #6092 from vrothberg/v2-kube
add {generate,play} kube
2020-05-06 20:34:13 +02:00
Valentin Rothberg f269be3a31 add {generate,play} kube
Add the `podman generate kube` and `podman play kube` command.  The code
has largely been copied from Podman v1 but restructured to not leak the
K8s core API into the (remote) client.

Both commands are added in the same commit to allow for enabling the
tests at the same time.

Move some exports from `cmd/podman/common` to the appropriate places in
the backend to avoid circular dependencies.

Move definitions of label annotations to `libpod/define` and set the
security-opt labels in the frontend to make kube tests pass.

Implement rest endpoints, bindings and the tunnel interface.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-06 17:08:22 +02:00
Qi Wang 5621f5199d Manifest remove, push
Implements podman manifest remove and podman manifest push.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-06 10:54:28 -04:00
Matthew Heon ad9f776c5e Reenable systemd E2E tests
All functionality these require should be ported.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-06 10:33:18 -04:00
OpenShift Merge Robot 0eb905ff2c
Merge pull request #6096 from mheon/fix_small_issues
Add small fixes for 'podman run' from diffing inspect
2020-05-06 11:27:05 +02:00
OpenShift Merge Robot 7885b5cd52
Merge pull request #6063 from QiWang19/manifest-annotate
manifest annotate
2020-05-06 03:41:09 +02:00
Matthew Heon f7c3cfde77 Add small fixes for 'podman run' from diffing inspect
To try and identify differences between Podman v1.9 and master,
I ran a series of `podman run` commands with various flags
through each, then inspecting the resulting containers and diffed
the inspect JSON between each. This identified a number of issues
which are fixed in this PR.

In order of discovery:
- Podman v2 gave short names for images, where Podman v1 gave the
  fully-qualified name. Simple enough fix (get image tags and use
  the first one if they're available)
- The --restart flag was not being parsed correctly when a number
  of retries was specified. Parsing has been corrected.
- The -m flag was not setting the swap limit (simple fix to set
  swap in that case if it's not explicitly set by the user)
- The --cpus flag was completely nonfunctional (wired in its
  logic)

Tests have been added for all of these to catch future
regressions.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-05 20:21:01 -04:00
Qi Wang 1090d4d5d9 manifest annotate
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-05 15:01:32 -04:00
OpenShift Merge Robot 864aec8bb0
Merge pull request #6081 from baude/v2system
v2 system subcommand
2020-05-05 20:49:17 +02:00
baude 25312bb5b4 v2 system subcommand
add system df, info, load, renumber, and migrate

Refactor for specialized libpod engines

add the ability to prune images, volumes, containers, and pods

Signed-off-by: baude <bbaude@redhat.com>
2020-05-05 12:24:33 -05:00
OpenShift Merge Robot fb6eca50ba
Merge pull request #6088 from edsantiago/bats_check_usage
BATS help test: check usage string
2020-05-05 17:32:25 +02:00
OpenShift Merge Robot 9db97dbab8
Merge pull request #6080 from baude/v2stats
v2 podman stats
2020-05-05 17:29:56 +02:00
baude b5a235df90 v2 podman stats
Signed-off-by: baude <bbaude@redhat.com>
2020-05-05 08:46:51 -05:00
Ed Santiago 29d39e35e4 BATS help test: check usage string
Now that we've agreed that usage messages should match
what the user typed, confirm it. IOW 'podman foo --help'
should not issue a usage message for 'podman container foo'.

Fix one broken instance, 'unpause'.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-05 07:19:58 -06:00
Matthew Heon 7ac3d906b5 Rework port parsing to support --expose and -P
As part of this, make a major change to the type we use to
represent port mappings in SpecGen (from using existing OCICNI
structs to using our own custom one). This struct has the
advantage of supporting ranges, massively reducing traffic over
the wire for Podman commands using them (for example, the
`podman run -p 5000-6000` command will now send only one struct
instead of 1000). This struct also allows us to easily validate
which ports are in use, and which are not, which is necessary for
--expose.

Once we have parsed the ports from the new struct, we can produce
an accurate map including all currently requested ports, and use
that to determine what ports need to be exposed (some requested
exposed ports may already be included in a mapping from --publish
and will be ignored) and what open ports on the host we can map
them to.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-04 20:57:27 -04:00
OpenShift Merge Robot 51d0be4204
Merge pull request #6051 from rhatdan/containers.conf
Fixes for test/e2e/containers_conf_test.go
2020-05-04 11:08:43 +02:00
OpenShift Merge Robot bffd3f5134
Merge pull request #6060 from sujil02/systemprune-v2
And system prune feature for v2.
2020-05-01 21:08:50 +02:00
Daniel J Walsh 1218d70915
Remove skip on containers.conf tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:33 -04:00
Daniel J Walsh 730fbc7628
Properly handle containers.conf devices
We need to add the default devices listed in containers.conf

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:26 -04:00
Sujil02 b94862171b And system prune feature for v2.
Adds podman system prune for v2.
Refactoring for code reuse from pods containers images and volume prune.
Adds and enables testcases to support the added feature.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-05-01 13:57:16 -04:00
OpenShift Merge Robot 226e0da6fe
Merge pull request #6057 from baude/v2networking
v2networking enable commands
2020-05-01 18:27:16 +02:00
baude 98e71583a4 add provided cni networks to spec gen
enable final integration tests for networking.

Signed-off-by: baude <bbaude@redhat.com>
2020-05-01 09:20:52 -05:00
OpenShift Merge Robot 1230499e45
Merge pull request #6016 from giuseppe/fix-create
v2, podman: fix create and entrypoint tests
2020-05-01 15:32:00 +02:00
baude 52371057cd fix commands without input
in cases where commands require input and we dont provide it, we often would segv.  This can be attributed in many cases to the subcommand not picked up the cobra Args attribute or neither had them.

Signed-off-by: baude <bbaude@redhat.com>
2020-04-30 15:10:49 -05:00
Ed Santiago 91a42fefcb System tests: help messages: check required-arg
If a usage message is of the form '... [flags] ARGNAME',
where ARGNAME is all-caps and not in brackets, it must
be a required argument. Try running podman subcommand
without ARGNAME, and make sure that podman bails out
with an informative message. (Since this message is
freeform in each subcommand, not Cobra-generated,
we have a lot of possible variations to check for).

Fix podman login/logout Use messages to indicate that
REGISTRY is now optional (as of #5233).

This test has actually been in place for over a year but
due to a typo on my part -- a missing space -- it was
not being run. "For want of a space, much testing was lost".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-30 14:55:10 -05:00
baude e88a418528 v2networking enable commands
Enable the networking commands for v2.

Signed-off-by: baude <bbaude@redhat.com>
2020-04-30 14:53:54 -05:00
Sujil02 c3c030f550 Enable prune integration test. Fixes container prune.
Fixes container prune to prune created and configured containers.
Disables couple of system prune test as not yet in with v2.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-04-30 12:03:09 -04:00
Giuseppe Scrivano aef7836b38
test: enable start tests
`docker start` doesn't resolve partial ID -> full ID, adapt test.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-30 15:49:12 +02:00
Giuseppe Scrivano 1d34977b4c
test: enable remaining run tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-30 11:33:37 +02:00
Giuseppe Scrivano 9c67a9c155
test: enable entrypoint tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-30 11:33:36 +02:00
Giuseppe Scrivano ed7a9739e4
test: enable create tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-30 11:33:35 +02:00
Qi Wang 75eeb40f41 testv2: enable attach test
testv2: enable attach test

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-29 23:47:15 -04:00