7635 Commits

Author SHA1 Message Date
ab518cdba0 Merge pull request #6115 from rhatdan/env
podman: split env variables in env and overrides
2020-05-07 21:44:47 +02:00
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
1d3cdf9a46 Merge pull request #5961 from QiWang19/manifest-remove-push
Manifest remove, push
2020-05-07 19:10:32 +02:00
0799e52d15 Merge pull request #6108 from baude/v2trust
v2trust set and show
2020-05-07 18:40:48 +02:00
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
fb7bdfb823 Merge pull request #6109 from TomSweeneyRedHat/dev/tsweeney/rst_tuts
[CI:DOCS] Add link to Tutorials to docs homepage
2020-05-07 15:45:59 +02:00
7cd2e35203 Merge pull request #6107 from sujil02/enableport
Enables port test
2020-05-07 10:01:22 +02:00
76b964485f [CI:DOCS] Add link to Tutorials to docs homepage
Just create a quick link to the tutorials on GitHub
so they'll show on docs.podman.io.  I've not done rst
format before, so fingers crossed!

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-06 20:22:19 -04:00
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
062c7b8a94 Merge pull request #6091 from rhatdan/v2
Eliminate race condition on podman info
2020-05-06 22:00:32 +02:00
ab67664d34 Merge pull request #6087 from containers/dependabot/go_modules/github.com/containers/storage-1.19.1
Bump github.com/containers/storage from 1.19.0 to 1.19.1
2020-05-06 20:36:37 +02:00
8b5df5b5d9 Merge pull request #6092 from vrothberg/v2-kube
add {generate,play} kube
2020-05-06 20:34:13 +02:00
22bf906e8c Merge pull request #6104 from mheon/reenable_volumels_test
Reenable systemd E2E tests and one build E2E test
2020-05-06 20:29:16 +02:00
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
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
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
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
7885b5cd52 Merge pull request #6063 from QiWang19/manifest-annotate
manifest annotate
2020-05-06 03:41:09 +02:00
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
1090d4d5d9 manifest annotate
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-05 15:01:32 -04:00
864aec8bb0 Merge pull request #6081 from baude/v2system
v2 system subcommand
2020-05-05 20:49:17 +02:00
86f7dbc4cb Bump github.com/containers/storage from 1.19.0 to 1.19.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.19.0 to 1.19.1.
- [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.19.0...v1.19.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-05 13:35:24 -04:00
ad27532b6c Eliminate race condition on podman info
There is a potential of a race condition where
a container is removed while podman is looking
up information on the total containers.  This can
cause podman info to fail with an error
"no such container".

This change ignores the failure.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-05 13:33:41 -04:00
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
fb6eca50ba Merge pull request #6088 from edsantiago/bats_check_usage
BATS help test: check usage string
2020-05-05 17:32:25 +02:00
9db97dbab8 Merge pull request #6080 from baude/v2stats
v2 podman stats
2020-05-05 17:29:56 +02:00
e6235ef8f1 Merge pull request #6076 from vrothberg/rmi-v2.2
image removal: refactor part 2
2020-05-05 17:25:04 +02:00
4a1331d0af Merge pull request #6077 from rhatdan/v2
Fix errors found when comparing podman v1 --help versus V2
2020-05-05 15:57:08 +02:00
b5a235df90 v2 podman stats
Signed-off-by: baude <bbaude@redhat.com>
2020-05-05 08:46:51 -05:00
c313eec620 Merge pull request #6079 from mheon/add_expose
Rework port parsing to support --expose and -P
2020-05-05 15:21:37 +02:00
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
e1be837a4f Merge pull request #6082 from TomSweeneyRedHat/dev/tsweeney/trub1
[CI:DOC] Add linger to troubleshooting
2020-05-05 10:23:30 +02:00
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
fa3986125e [CI:DOC] Add linger to troubleshooting
Adding a troubleshooting note about how to configure systemd
to linger for detached containers in rootless mode.  This came
up in an email stream on the Podman mailing list today and
answered by @mheon

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-04 19:36:24 -04:00
6ed3b8841f Fix errors found when comparing podman v1 --help versus V2
Mainly add missing commands to podman image, podman containers, podman system

Also fix some informations messages and descriptions.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-04 14:16:34 -04:00
01aad516e0 Merge pull request #6069 from pr0PM/patch-1
Updated the broken links for the docs.
2020-05-04 18:50:25 +02:00
050f71977e Updated the broken links for the docs.
All the links updated here were pointing to ```./docs/*``` and now have been updated to ```./docs/source/markdown/*```.

Signed-off-by: pr0PM <pmprateek88@gmail.com>
2020-05-04 21:43:36 +05:30
a8dc0fceb9 Merge pull request #6074 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.6.0
Bump github.com/sirupsen/logrus from 1.5.0 to 1.6.0
2020-05-04 16:06:01 +02:00
7f97896c59 image removal: refactor part 2
Continue the refactoring of image removal.  I didn't manage to break all
the following changes into smaller and easier to digest commits due to
time constraints:

 * Return an error slice instead of a single error. Use multierror only
   in the client/frontend.  Reflect that in the types.

 * Use the batch image removal in the client while preserving the more
   rest-idiomatic single-image removal endpoint.

 * Add a new handler for the single-image removal endpoint to make it
   share the same code as the batch endpoint.

 * Expose bindings for the single and batch endpoints, so we can
   properly test them.

 * Add several convenience functions for error handling to
   pkg/errorhandling.

 * Set the correct error type in libpod to set the exit code to 2 when
   one or more containers are using an image.

 * Massage the bindings tests a bit and tackle compilation errors.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-04 16:01:45 +02:00
2e79d60d3e Bump github.com/sirupsen/logrus from 1.5.0 to 1.6.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.5.0 to 1.6.0.
- [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.5.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-04 08:21:35 -04:00
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
7b941462d4 Merge pull request #6066 from TomSweeneyRedHat/dev/tsweeney/fixquayio
[CI:DOC]Use full repo name in podmanimage Dockerfiles
2020-05-03 14:24:41 +02:00
36d36ec2a4 [CI:DOC]Use full repo name in podmanimage Dockerfiles
In the Buildah images, we had a problem where the testing image
was installed with an older version of Buildah than the stable
image.  This was apparently due to quay.io using Docker and Dockerhub
which has a version of Fedora that did not let testing
version of Buildah to be installed as it should have been.

This change fully specifies the name of the fedora image to
use.  This has not been a problem in Podman, but I'm carrying
this change here to avoid future problems.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-01 17:54:33 -04:00
0fd8242f91 Merge pull request #6058 from rhatdan/coverity
Fix errors found in coverity scan
2020-05-01 21:32:22 +02:00
54fa377faf Merge pull request #6061 from QiWang19/getlogin
check --get-login when login
2020-05-01 21:29:46 +02:00
bffd3f5134 Merge pull request #6060 from sujil02/systemprune-v2
And system prune feature for v2.
2020-05-01 21:08:50 +02:00
7d37f4bbfe Fix errors found in coverity scan
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:33 -04:00
1218d70915 Remove skip on containers.conf tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:33 -04:00
97fcbfcbec cgroupsns was not following containers.conf
Implement ParseCgroupsNamespace to handle defaults.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:33 -04:00
4a2765c498 Properly handle default capabilities listed in containers.conf
If user/admin specifies a different list of default capabilties
we need to honor these.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-01 15:00:26 -04:00