6755 Commits

Author SHA1 Message Date
e57253d068 Merge pull request #5143 from stefanb2/topic-pr-4477-2
docs: add workaround for --device with rootless containers (II)
2020-02-10 14:52:19 +01:00
5f34b2150b Merge pull request #5122 from mtrmac/image-object-creation
Simplify image object creation
2020-02-10 14:28:40 +01:00
e2a01603f2 Merge pull request #5064 from mheon/pod_network_opts
Add backend code for pod network options
2020-02-10 14:07:04 +01:00
185c82bc80 v2 api: /libpod/images/import
Implement the /libpod/images/import endpoint

Tested manually with curl:
curl -X POST --data-binary "@image.tar" --header "Content-Type: application/x-tar"

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-10 13:18:50 +01:00
926c9f8fbb v2 api: /libpod/images/load
Implement the /libpod/images/load endpoint.

Tested manually with curl:
curl -X POST --data-binary "@image.tar" --header "Content-Type: application/x-tar"

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-10 13:18:48 +01:00
76e2a0c5d3 v2 api: /libpod/images/pull
Implement the /libpod/images/pull endpoint and correct the swagger docs.
The reference parameter is mandatory and must either be a
c/image/docker/reference or a reference to the "docker://" transport as
the pull endpoint is meant to only support pulling images from a
registry.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-02-10 12:36:45 +01:00
20cb169874 docs: add workaround for --device with rootless containers (II)
Update documentation for crun >= 0.11.

See 6df930821d

Fixes #4477

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2020-02-10 11:19:33 +02:00
c588ae1428 Fix varlink code generation target.
Closes #5130.

varlink code generation was skipped when `uname -o` did not print "GNU/Linux".
However on some Linux systems (e.g. alpine) only "Linux" is printed
which results in cmd/podman/varlink/iopodman.go not being generated.
Thus the Makefile target condition has been changed to match "Linux".

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2020-02-09 21:25:59 +01:00
ee811431d2 Merge pull request #5107 from cevich/mirror_containers
Add mirroring dockerfiles
2020-02-09 16:17:56 +01:00
dafd212870 Modify Runtime.getImage to return a storage.Image
... because both callers only care about that aspect of the
return value.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
5b5bacbd95 Document an aspect of newFromStorage behavior
Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
972df82632 Introduce a Runtime.newImage constructor
... so that _all_ Image objects are created in a single place
that is easy to update.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
933edf4a37 Move Image.getLocalImage to Runtime.getLocalImage
Instead of the function updating image.InputName (the only reason for it
to need an image), have it return the updated value separately.

This will allow simplifying the constructors of Image further.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
1ab4038807 Remove the getLocalImage() call from Image.Size
All ways to create an Image{} have a non-nil .image field, and it
is never set to nil, so this is dead code.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
ede412f40f Use Runtime.NewFromLocal instead of open-coded copies
All code creating an Image by looking up a name now uses
Runtime.NewFromLocal.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
a433b858d2 Trivial simplification
Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
d9bfaf5197 Create two separate newImage instances in Runtime.New
This is not _trivially_ safe because newImage.getLocalImage()
modifies newImage.ImageName, but we overwrite that value anyway.

So, this should not change behavior, and it will make future refactoring
easier to verify.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:01 +01:00
0f0bac4ab3 Call NewImageRuntimeFromStore from NewImageRuntimeFromOptions
... so that there ultimately is only one constructor.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-02-07 23:36:00 +01:00
c02b3b5e13 Merge pull request #5129 from mheon/update_release_for_18
[CI:DOCS] Update readme to 1.8.0 release
2020-02-07 15:55:48 +01:00
86a51df18e Merge pull request #5126 from openSUSE/runtime-struct
Refactor runtime functions to pass options structure
2020-02-07 15:24:50 +01:00
562d3b09d0 Update readme to 1.8.0 release
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-02-07 09:16:13 -05:00
29d76a4cb2 Merge pull request #5104 from containers/dependabot/go_modules/github.com/containers/image/v5-5.2.1
build(deps): bump github.com/containers/image/v5 from 5.2.0 to 5.2.1
2020-02-07 14:36:50 +01:00
9bc171b86d Refactor runtime functions to pass options structure
This makes the code easier to read but should not change the overall
behavior.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-07 13:45:29 +01:00
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