2707 Commits

Author SHA1 Message Date
788bc36021 Simplify pullGoalFromPossiblyUnqualifiedName
Both imageParts and this function implicitly assume docker.Transport
troughout, so instead of pretending to be flexible about DefaultTransport,
just hard-code docker.ParseReference directly.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
e9721b757a Remove imageParts.transport
It is only ever set to DefaulTransport, and all of the code
is docker/reference-specific anyway, so there's no point in
making this a variable.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
99d2259f8a Simplify pullGoalFromPossiblyUnqualifiedName
After inlining assembleWithTransport, we have two branches with
the same prepending of decomposedImage.transport; move that out of
the branches.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
3d98c42a3f Inline imageParts.assembleWithTransport into callers
imageParts.transport is a constant, and the design of imageParts
is not transport-independent in any sense; we will want to eliminate
the transport member entirely.

As a first step, drop assembleWithTransport and inline an exact
equivalent into all callers.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
c19294c011 Record the original reference.Named in imageParts
We will eventually want to eliminate most members of imageParts
in favor of using the c/image/docker/reference API directly.

For now, just record the reference.Named value, and we will
replace uses of the other members before removing them.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:22 +01:00
6486e2c41b Drop image.DecomposeString, make image.Parts private imageParts again
Now that DecomposeString has no users, make the type private again.
Any new users of it should come with a rationale - and new users
of the "none"/"latest" handling of untagged/digested names that is
currently implemented should have an exceptionaly unusual rationale.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:06:58 +01:00
a6e668fac5 Don't call image.DecomposeString in imageInListToContainerImage
- It is used to fill Repository(misnamed)/Tag members which have no users;
  so it's completely unclear why this is useful.
- Given the mishandling of tags by imageParts.tag, at the very least
  all new code should primarily use reference.Named (even if
  after a decompose() to internally deal with unqualified names first),
  introducing new uses of original decompose() just reintroduces known
  trouble - so without any provided rationale, reverting seems
  a reasonable default action.
- This drags in all of libpod/image into the "remote client" build,
  which seems undesirable.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 03:55:44 +01:00
140ae25c4d Merge pull request #2141 from baude/remotetag
Add darwin support for remote-client
2019-01-13 09:34:33 -08:00
9ada9722ec Merge pull request #2137 from rhatdan/noexec
Add troubleshooting statement for homedirs mounted noexec
2019-01-13 09:16:46 -08:00
f31fdb2219 Merge pull request #2008 from harche/multi-arch
Use multi-arch images in test cases
2019-01-13 06:14:22 -08:00
d252c2ae08 Add troubleshooting statement for homedirs mounted noexec
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1651228

Users were surprised when they were not able to run a contianer on a noexec homedir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-13 06:22:10 -05:00
9493be69b3 Merge pull request #2148 from rhatdan/storage-opt
Set default storage options from mounts.conf file.
2019-01-12 10:08:13 -08:00
a08da37682 Merge pull request #2145 from baude/playcontainerintopod
podman play kube: add containers to pod
2019-01-12 07:20:36 -08:00
634236ae70 Set default storage options from mounts.conf file.
We were never loading the storage.conf file to grab mountOptions.

This is causing us to not use metacopyup option when running with
overlay.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-12 06:55:03 -05:00
5c86efb289 Merge pull request #2138 from giuseppe/rootless-pod-fix
rootless: fix usage of create --pod=new:FOO
2019-01-11 15:42:21 -08:00
e10baba326 podman play kube: add containers to pod
when defining containers, we missed the conditional logic to allow
the container to be defined with "WithPod" and so forth.  I had to
slightly modify the createcontainer process to pass a libpod.Pod
that could override things; use nil as no pod.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-11 14:01:57 -06:00
43c6da22b9 Add darwin support for remote-client
Add the ability to cross-compile podman remote for OSX.

Also, add image exists and tag to remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-11 11:30:28 -06:00
28c35cab87 Merge pull request #2135 from baude/varlinkprune
Add varlink support for prune
2019-01-11 06:18:29 -08:00
9368c24be6 Merge pull request #2113 from baude/remoteimages
remote-client support for images
2019-01-11 05:54:16 -08:00
b3eb23d671 Merge pull request #2102 from vrothberg/vendor-update
vendor: update everything
2019-01-11 05:39:12 -08:00
bd40dcfc2b vendor: update everything
* If possible, update each dependency to the latest available version.

* Use releases over commit IDs and avoid vendoring branches.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-11 13:38:11 +01:00
545f244212 vendor make target
Add a `make vendor` target calls `vndr` with a specified whitelist to
avoid deleting important files (currently the varlink/go project).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-11 13:12:14 +01:00
04a4ba9b73 rootless: create the userns immediately when creating a new pod
Closes: https://github.com/containers/libpod/issues/2124

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-11 11:52:12 +01:00
c4f054f102 rootless: join both userns and mount namespace with --pod
When --pod is specified then join both the user and mount namespace
for the pod so we can initialize the storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-11 11:52:11 +01:00
26f2b7debd Merge pull request #2105 from mheon/jsoniter
Use jsoniter instead of easyjson
2019-01-11 02:25:41 -08:00
b3e7be7a0b spec: add nosuid,noexec,nodev to ro bind mount
runc fails to change the ro mode of a rootless bind mount if the other
flags are not kept.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-11 10:34:30 +01:00
13bcf72ae4 Use multi-arch images in test case scripts
Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
2019-01-11 09:28:08 +05:30
7459c48863 Add varlink support for prune
Add the ability to prune unused images using the varlink
API.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-10 15:21:42 -06:00
3966d3bf4e Replace tab with spaces in MarshalIndent in libpod
The json-iterator package will panic on attempting to use
MarshalIndent with a non-space indentation. This is sort of silly
but swapping from tabs to spaces is not a big issue for us, so
let's work around the silly panic.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
de0d2b2ea6 Remove one more usage of encoding/json in libpod
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
a7089d84a3 Update vendor.conf for jsoniter vendor changes
The vndr tool isn't updating vendor.conf so do it manually.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
167d50a9fa Move all libpod/ JSON references over to jsoniter
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
1b761dbb02 Update json-iterator vendor to v1.1.5
We already have it vendored for a Kube package we import, but we
want a more recent version with additional bugfixes over the 1.0
release we originally had.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
07f3b147f1 Remove easyjson in preparation for switch to jsoniter
The jsoniter library does not require code generation, which is a
massive advantage over easyjson (it's also about the same in
performance). Begin moving over to it by removing the existing
easyjson code.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
36d96c19f9 Merge pull request #2131 from mheon/restore_storage_defaults
Use defaults if paths are not specified in storage.conf
2019-01-10 11:58:13 -08:00
7d2632872a Merge pull request #2120 from rhatdan/volume
Fix handling of nil volumes
2019-01-10 11:58:08 -08:00
4fb6045087 Merge pull request #2108 from QiWang19/from1899
Fix 'image trust' from PR1899
2019-01-10 11:57:59 -08:00
3c44c532d1 Merge pull request #2127 from QiWang19/fixsigstore
fix up sigstore path
2019-01-10 11:39:10 -08:00
c3f632d85a Merge pull request #2126 from giuseppe/set-prlimit
podman: bump RLIMIT_NOFILE also without CAP_SYS_RESOURCE
2019-01-10 11:38:59 -08:00
c8e3dd8a9c remote-client support for images
Signed-off-by: baude <bbaude@redhat.com>
2019-01-10 13:18:08 -06:00
6524041fb0 Merge pull request #2119 from jwhonce/wip/python_podman
Move python code from contrib to it's own repo python-podman
2019-01-10 11:11:46 -08:00
e4525cf844 Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
2019-01-10 10:58:25 -08:00
45fb935fe4 Move python code from contrib to it's own repo python-podman
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-01-10 11:27:50 -07:00
2fe6ada854 Use defaults if paths are not specified in storage.conf
For rootless Podman, if storage.conf exists but does not specify
one or both of RunRoot and GraphRoot, set them to rootless
defaults so we don't end up with an unusable configuration.

Fixes #2125

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 13:19:51 -05:00
2169b9fe14 Merge pull request #2128 from mheon/pr_test
Trivial readme updates
2019-01-10 10:07:02 -08:00
4e7a7ffe9d (Minor) Cirrus: Print timestamp at start
Also record into a file in case a later reference is required

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-10 12:59:55 -05:00
b208b86dda fix up sigstore path
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-01-10 12:18:37 -05:00
21402432d9 Trivial readme updates
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 11:50:02 -05:00
a2c1a2df54 podman: bump RLIMIT_NOFILE also without CAP_SYS_RESOURCE
If we are not able to make arbitrary changes to the RLIMIT_NOFILE when
lacking CAP_SYS_RESOURCE, don't fail but bump the limit to the maximum
allowed.  In this way the same code path works with rootless mode.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-10 17:43:58 +01:00
c338da50ca Merge pull request #2111 from rhatdan/sign
Fix up image sign and trust
2019-01-10 07:43:54 -08:00