6532 Commits

Author SHA1 Message Date
c895d844d4 Merge pull request #5120 from nalind/varlink-build-id
LibpodAPI.BuildImage: don't require a name for the new image
2020-02-07 03:25:11 +01:00
fc5ed23560 Merge pull request #5119 from mheon/bump-1.8.0
Bump to v1.8.0
2020-02-07 02:58:15 +01:00
93b9008540 build(deps): bump github.com/containers/image/v5 from 5.2.0 to 5.2.1
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.2.0...v5.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-06 20:49:48 -05:00
e6c7ccc067 LibpodAPI.BuildImage: don't require a name for the new image
When we finish building an image, we try to look up its ID by looking up
the image using the name that we were asked to assign to the image.  If
we weren't asked to assign a name to the image, that would produce an
error.  The BuildImage() API we're using returns the image's ID anyway,
so we can skip the lookup and just return the ID directly.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-02-06 17:41:46 -05:00
dc940f90d8 Bump to v1.8.1-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-02-06 17:22:58 -05:00
2ced9094d4 Bump to v1.8.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
v1.8.0
2020-02-06 17:22:56 -05:00
0d006f742a Merge pull request #5118 from baude/podmansystemservicesucks2
[CI:DOCS]update contrib systemd user
2020-02-06 23:18:30 +01:00
e894bfe6a4 [CI:DOCS]update contrib systemd user
one more update

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-06 16:05:49 -06:00
35eb2381a6 Merge pull request #5111 from mheon/service_to_system_service
Move podman-service to podman-system-service
2020-02-06 23:03:12 +01:00
3b47bda863 Merge pull request #5117 from baude/podmansystemservicesucks
[CI:DOCS]fix systemd files for apiv2
2020-02-06 22:47:22 +01:00
f2d6e711c7 [CI:DOCS]fix systemd files for apiv2
the paths and instructions for running the new api via systemd needed updates due to a change in the command.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-06 15:34:09 -06:00
5dcb68ed1f Merge pull request #5116 from mheon/release_notes_1.8.0_final
[CI:DOCS] Update release notes for final release of v1.8.0
2020-02-06 22:23:34 +01:00
aa2f71f110 Update release notes for final release of v1.8.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-02-06 16:08:29 -05:00
21a80e53b5 Merge pull request #5099 from mheon/fix_pod_cgroup_pids
Only modify conmon cgroup if we have running containers
2020-02-06 19:53:48 +01:00
9e55bcc304 Cirrus: Never run prune on other branches
This is needed because the prune container image will be built from
other branches as they are made.  If the behavior of this or the imgts
image diverges from that of master, random VM images could be "cleaned"
unexpectedly.  By hard-coding this task to the master branch only,
it should never run anywhere else.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 13:47:58 -05:00
41b735af05 Move podman-service to podman-system-service
Fixes #5108

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-02-06 13:41:57 -05:00
62111bceb7 Merge pull request #5098 from rhatdan/memory-swap
Special case memory-swap=-1
2020-02-06 18:51:05 +01:00
3e37f69e2b Add dockerfile to mirror fedora-minimal
This is needed to provide this image under quay.io/libpod/ namespace
to provide some resiliency to automated testing (should other
repositories be unavailable)

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 12:01:50 -05:00
f2fe37ea67 Merge pull request #5048 from TomSweeneyRedHat/dev/tsweeney/install.md
Move install.md to podman.io, leave link page
2020-02-06 16:46:47 +01:00
eed2ad9ef2 Only modify conmon cgroup if we have running containers
If there are no running containers - for example, if the pod was
just created - the cgroup in question may not exist (under
certain circumstances that we're not 100% sure about). However,
regardless, we don't need to set a PID limit, as nothing will be
making cleanup processes (no running conmon processes), so not
changing the cgroup is safe regardless.

Fixes #5072

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-02-06 10:20:54 -05:00
fa5e95837e Merge pull request #5089 from baude/fixswaggeraddvalidate
fix swagger docs and make sure docs validation runs
2020-02-05 23:28:41 +01:00
98431050b4 Merge pull request #5056 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.12.0
build(deps): bump github.com/onsi/ginkgo from 1.11.0 to 1.12.0
2020-02-05 22:21:57 +01:00
c0b14ee29a fix swagger docs and make sure docs validation runs
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-05 14:16:25 -06:00
fc0673f561 Merge pull request #5062 from vrothberg/update-image
vendor github.com/containers/image/v5@v5.2.0
2020-02-05 18:14:53 +01:00
100d2fdcfd Special case memory-swap=-1
We document that memory-swap==-1 means unlimited, but currently we
won't allow the user to specify the -1 value.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-05 10:37:51 -05:00
107fd64970 Merge pull request #5090 from openSUSE/containerfile-location-test
Add Containerfile location e2e test
2020-02-05 07:13:32 -08:00
fb8c49479e Merge pull request #5052 from mheon/cleanup_net_on_restart
Tear down network when restarting containers
2020-02-05 00:59:07 -08:00
baec9f3b10 vendor github.com/mtrmac/gpgme@v0.1.2
Fixes a build regression on CentOS 7 and RHEL 7 with older gpgme
versions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-05 09:56:25 +01:00
801977b40d vendor github.com/containers/image/v5@v5.2.0
See release notes:
	https://github.com/containers/image/releases/tag/v5.2.0

Fixes: #4877
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-05 09:55:50 +01:00
56a9c6ae57 Add Containerfile location e2e test
As a follow up of the location fix in #5080 we now add an e2e test for
that use case.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-05 09:03:53 +01:00
4bb55161e9 Add /swagger/ endpoint to serve swagger yaml to clients
The provided yaml file will describe the current Podman REST API.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-02-04 16:39:54 -07:00
5092c078ec Merge pull request #5085 from rhatdan/close
Close tarSource when finished using it
2020-02-04 13:57:43 -08:00
348e58b59a Merge pull request #5075 from mheon/filter_forces_all
Force --all when --filter is passed to podman ps
2020-02-04 13:22:57 -08:00
fac8318cb0 Merge pull request #5082 from baude/spec
[CI:DOCS] Spec proposal
2020-02-04 12:33:33 -08:00
805c5a5bb6 Merge pull request #5086 from baude/fmtbeforelint
{CI:DOCS] run gofmt before lint
2020-02-04 12:06:59 -08:00
c1a5346713 [CI:DOCS]addition of specgen package
warning: the naming of this might change as well as the location.

this is a build on a PR from mheon from last year that proposes a shift from our current approach of creating containers based on the arbitrarily made createconfig.  the new approach would be to have a specification that is detached from the podman cli.  the spec could then be generated and used to make a container.  this theoretically is the beginning of a long-needed refactor involving how we get from the cli -> libpod | apiv2 -> libpod with code re-use and less duplication.

the intent is to build the apiv2 container creation based on this approach only.  wiring to the podman cli will happen after the fact.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-04 13:46:51 -06:00
0577493688 {CI:DOCS] run gofmt before lint
the linting task identifies gofmt issues; therefore it makes more sense to run our make gofmt first, which actually fixes the gofmt issues.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-04 13:15:22 -06:00
bda3009401 Merge pull request #5033 from sujil02/new-test
Adding test to check Tag and list images endpoints in apis.
2020-02-04 10:58:59 -08:00
b702134edc Merge pull request #5080 from openSUSE/containerfile-context-fix
Fix wrong Containerfile location on build
2020-02-04 10:45:10 -08:00
646e1944a2 build(deps): bump github.com/onsi/ginkgo from 1.11.0 to 1.12.0
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.11.0 to 1.12.0.
- [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.11.0...v1.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-04 13:41:18 -05:00
03faf97aa0 Close tarSource when finished using it
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1797599

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-04 13:12:06 -05:00
537352cc3e Merge pull request #5079 from openSUSE/error-image-size
Wrap error for failing ImageSize calls
2020-02-04 07:12:56 -08:00
07a8ab09e0 Add backend code for pod network options
This adds network-related options to the pod in the database. We
are going to add the CLI frontend in further patches.

In short, this should greatly improve the ability of pods to
configure networking, once the CLI parsing is added.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-02-04 10:07:14 -05:00
ee5b749e65 Force --all when --filter is passed to podman ps
When we filter, it should be out of all containers, not just
running ones, by default - this is necessary to ensure Docker
compatability.

Fixes #5050

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-02-04 09:52:25 -05:00
4567f39800 Initial implementation of a spec generator package
The current Libpod pkg/spec has become a victim of the better
part of three years of development that tied it extremely closely
to the current Podman CLI. Defaults are spread across multiple
places, there is no easy way to produce a CreateConfig that will
actually produce a valid container, and the logic for generating
configs has sprawled across at least three packages.

This is an initial pass at a package that generates OCI specs
that will supersede large parts of the current pkg/spec. The
CreateConfig will still exist, but will effectively turn into a
parsed CLI. This will be compiled down into the new SpecGenerator
struct, which will generate the OCI spec and Libpod create
options.

The preferred integration point for plugging into Podman's Go API
to create containers will be the new CreateConfig, as it's less
tied to Podman's command line. CRI-O, for example, will likely
tie in here.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-02-04 08:10:23 -06:00
59328a22db Fix wrong Containerfile location on build
Podman does select the wrong Containerfile if the current working
directory contains a Containerfile but we specify one from a different
location.

Reproducer:
```
> mkdir 1
> echo FROM scratch > Containerfile
> echo FROM golang > 1/Containerfile
> podman build -f 1/Containerfile -t test
STEP 1: FROM scratch
```

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-04 14:47:33 +01:00
b8a2818e70 Wrap error for failing ImageSize calls
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-04 14:21:59 +01:00
28eb296653 Merge pull request #5060 from vrothberg/v2-libpod-image-endpoints
[CI:DOCS] swagger: v2: libpod/images/{import,load,pull}
2020-02-04 05:11:25 -08:00
05e04b4a64 Merge pull request #5073 from baude/sepnetoptions
seperate container create network options
2020-02-04 01:51:09 -08:00
84381df810 swagger: v2: libpod/images/{import,load,pull}
Note: this commit is merely adding swagger documentation and the golang
stubs and types for the proposed endpoints.  The implementation will
follow in separate individual changes in the future.

The ultimate goal is to prevent the libpod API from exposing the rather
complex /images/create endpoint from Docker and split it into easier to
implement, use and comprehend endpoints with a more narrow focus.

 # Import

Add the v2 swagger documentation for the libpod/images/import endpoint.
Note that we have intend to have separate backend and not mix it up with
load since import allows for specifying a URL instead of a local
tarball.

 # Load

Complete the v2 swagger documentation for the libpod/images/load
endpoint.  Note that we are accounting for future plans to be able to
load multiple images from one oci/docker archive by returning an array
of image-load responses.

Also move the (incomplete) implementation of the generic endpoint to the
corresponding package and create a stub for the libpod handler, which
will be implemented once there's an agreement on the proposed API.

 # Pull

Add the v2 swagger documentation for the libpod/images/pull endpoint.
Similar to the load endpoint, we return an array since more than one
image can be pulled when the `all-tags` parameter is set.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-04 10:45:54 +01:00