Commit Graph

6355 Commits

Author SHA1 Message Date
Miloslav Trmač 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
Miloslav Trmač 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
Miloslav Trmač 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
OpenShift Merge Robot 140ae25c4d
Merge pull request #2141 from baude/remotetag
Add darwin support for remote-client
2019-01-13 09:34:33 -08:00
OpenShift Merge Robot 9ada9722ec
Merge pull request #2137 from rhatdan/noexec
Add troubleshooting statement for homedirs mounted noexec
2019-01-13 09:16:46 -08:00
Anders F Björklund c90e3e7fe5 Add bridge support, for the varlink connection
Read the $PODMAN_VARLINK_BRIDGE environment variable
(normally looks like: "ssh user@host varlink bridge")

Also respect $PODMAN_VARLINK_ADDRESS as an override,
if using a different podman socket than the default.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2019-01-13 18:16:34 +01:00
OpenShift Merge Robot f31fdb2219
Merge pull request #2008 from harche/multi-arch
Use multi-arch images in test cases
2019-01-13 06:14:22 -08:00
Daniel J Walsh 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
OpenShift Merge Robot 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
OpenShift Merge Robot a08da37682
Merge pull request #2145 from baude/playcontainerintopod
podman play kube: add containers to pod
2019-01-12 07:20:36 -08:00
Daniel J Walsh 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
OpenShift Merge Robot 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
baude 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
baude 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
OpenShift Merge Robot 28c35cab87
Merge pull request #2135 from baude/varlinkprune
Add varlink support for prune
2019-01-11 06:18:29 -08:00
OpenShift Merge Robot 9368c24be6
Merge pull request #2113 from baude/remoteimages
remote-client support for images
2019-01-11 05:54:16 -08:00
OpenShift Merge Robot b3eb23d671
Merge pull request #2102 from vrothberg/vendor-update
vendor: update everything
2019-01-11 05:39:12 -08:00
Valentin Rothberg 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
Valentin Rothberg 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
Giuseppe Scrivano 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
Giuseppe Scrivano 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
OpenShift Merge Robot 26f2b7debd
Merge pull request #2105 from mheon/jsoniter
Use jsoniter instead of easyjson
2019-01-11 02:25:41 -08:00
Giuseppe Scrivano 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
Harshal Patil 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
baude 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
OpenShift Merge Robot 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
OpenShift Merge Robot 7d2632872a
Merge pull request #2120 from rhatdan/volume
Fix handling of nil volumes
2019-01-10 11:58:08 -08:00
OpenShift Merge Robot 4fb6045087
Merge pull request #2108 from QiWang19/from1899
Fix 'image trust' from PR1899
2019-01-10 11:57:59 -08:00
OpenShift Merge Robot 3c44c532d1
Merge pull request #2127 from QiWang19/fixsigstore
fix up sigstore path
2019-01-10 11:39:10 -08:00
OpenShift Merge Robot 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
baude c8e3dd8a9c remote-client support for images
Signed-off-by: baude <bbaude@redhat.com>
2019-01-10 13:18:08 -06:00
OpenShift Merge Robot 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
OpenShift Merge Robot e4525cf844
Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
2019-01-10 10:58:25 -08:00
Jhon Honce 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
Matthew Heon 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
OpenShift Merge Robot 2169b9fe14
Merge pull request #2128 from mheon/pr_test
Trivial readme updates
2019-01-10 10:07:02 -08:00
Chris Evich 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
Qi Wang b208b86dda fix up sigstore path
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-01-10 12:18:37 -05:00
Matthew Heon 21402432d9 Trivial readme updates
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 11:50:02 -05:00
Giuseppe Scrivano 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
OpenShift Merge Robot c338da50ca
Merge pull request #2111 from rhatdan/sign
Fix up image sign and trust
2019-01-10 07:43:54 -08:00
Matthew Heon ac426bada2
Merge pull request #2121 from giuseppe/always-cleanup-rootless-containers
createconfig: always cleanup a rootless container
2019-01-10 10:43:32 -05:00
Daniel J Walsh f2ff550967
Fix handling of nil volumes
Currently if a user passes in a -v with
-v $bogus:/foobar

We crash.  This will throw a proper error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-10 10:27:39 -05:00
OpenShift Merge Robot 69c3e32941
Merge pull request #2122 from giuseppe/sign-fixes
sign: some fixes
2019-01-10 07:13:32 -08:00