2765 Commits

Author SHA1 Message Date
fc52b0423b Do not unmarshal into c.config.Spec
We try to keep c.config immutable, but Go doesn't really agree
with me that things other than strings and ints can be immutable,
so occasionally things like this slip through.

When unmarshalling the OCI spec from disk, do it into a separate
struct, to ensure we don't make lasting modifications to the
spec in the Container struct (which could affect container
restart).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-18 10:27:51 -05:00
7f19e5fb23 Merge pull request #2149 from afbjorklund/bridge
Add bridge support, for the varlink connection
2019-01-18 15:57:30 +01:00
e3dc6609d0 Merge pull request #2178 from sysrich/patch-1
Add openSUSE Kubic to install.md
2019-01-18 01:05:22 +01:00
21ec833476 Add openSUSE Kubic to install.md
Signed-off-by: Richard Brown <RBrownCCB@opensuse.org>
2019-01-17 23:03:03 +01:00
0e3264ae4d Merge pull request #2165 from rhatdan/mount
Add --latest and --all to podman mount/umount
2019-01-17 00:09:29 +01:00
e6696fc7de Merge pull request #2166 from rhatdan/install
Installing podman
2019-01-16 23:55:14 +01:00
ab4eea6e9b Merge pull request #2147 from mheon/update_readme_and_epoch
Update readme for v1.0.0
2019-01-16 22:45:20 +01:00
a286b532cd Merge pull request #2162 from rhatdan/vendor
Vendor in latest containers/storage
2019-01-16 18:50:01 +01:00
2cff111d71 Update README for v1.0.0
Also bump gitvalidation epoch - we usually do this every release,
but v1.0.0 is on a branch so we need a separate commit for master

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-16 12:05:44 -05:00
4296170aab Installing podman
Add documentation on how to install a packaged version of podman

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-16 11:56:39 -05:00
4406e1cfee Merge pull request #2169 from mheon/ensure_wait_doesnot_hang
Ensure that wait exits on state transition
2019-01-16 17:38:41 +01:00
33889c642d Ensure that wait exits on state transition
When waiting for a container, there is a long interval between
status checks - plenty long enough for the container in question
to start, then subsequently be cleaned up and returned to Created
state to be restarted. As such, we can't wait on container state
to go to Stopped or Exited - anything that is not Running or
Paused indicates the container is dead.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-16 10:33:01 -05:00
45b3a0f026 Vendor in containers/storage
Fix issues with metacopyup when specifying
new usernamespace.  Also fixes issues with zfs back end.

Rest of changes come from running make vendor.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
`
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-16 10:16:04 -05:00
78fc4c67fd Add --latest and --all to podman mount/umount
I find these useful for playing around with containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-16 10:05:41 -05:00
d8683219d2 Merge pull request #2079 from giuseppe/multiple-runtimes
oci: allow to define multiple OCI runtimes
2019-01-16 12:44:10 +01:00
b3abe2c289 Merge pull request #2163 from rhatdan/coverity
Cleanup coverity scan issues
2019-01-16 11:17:37 +01:00
81e94c9049 Merge pull request #2164 from baude/wehateruntime
podman-remote enable containers
2019-01-16 00:58:11 -08:00
0abb757425 Cleanup coverity scan issues
If realloc fails, then buffer will be leaked, this change frees up the buffer.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-15 17:09:15 -05:00
e68f03ae45 Embed runtime struct in super localRuntime
We clean up the code by eliminating stuttering references when we embed
the runtime struct into localRuntime.  Makes for less change in the future
as well.

++ jhonce

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 16:01:25 -06:00
341f91da48 Collaberative podman-remote container exists
Began frameout of container super structs for adapted methods.  This allows for the use
of container exists.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 14:50:30 -06:00
1b2f75298d Merge pull request #2161 from baude/remotehistory
add support for podman-remote history
2019-01-15 10:27:36 -08:00
6e47727d8a Merge pull request #2160 from baude/localRuntimerename
Rename localRuntime to runtime in cmd/podman
2019-01-15 09:13:44 -08:00
9a23e285d3 add support for podman-remote history
this adds support to get the history for an image and its
layers using podman-remote.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 10:29:24 -06:00
61ca8e5487 Rename localRuntime to runtime in cmd/podman
Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 09:56:50 -06:00
077156d45c Merge pull request #2156 from baude/remotermi
podman remote client -- add rmi
2019-01-15 07:49:55 -08:00
f9f72823ad podman remote integrations tests
add exists and rmi tests back in ...

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 08:19:26 -06:00
500fb2ca4c Merge pull request #2024 from cevich/fix_git_ci_vm
[skip ci] Hack: Fix get_ci_vm.sh w/ gcloud ssh/scp
2019-01-15 02:28:26 -08:00
1ffb0fc2d1 podman remote client -- add rmi
allow the podman remote client to delete images

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 15:40:33 -06:00
6301f6a0a9 Merge pull request #2155 from baude/remotetestenable
Run integrations test with remote-client
2019-01-14 13:39:09 -08:00
b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
30f115a960 Merge pull request #2153 from mheon/update_for_1.0
Update master branch with v1.0 changes from 1.0 branch
2019-01-14 08:17:24 -08:00
6f8e569ae2 Merge pull request #2152 from rhatdan/noexec
Add local storage.conf example to troubleshoot
2019-01-14 07:54:50 -08:00
8ee7eb472d [skip ci] Hack: Fix get_ci_vm.sh w/ gcloud ssh/scp
Previously, using the ssh command directly required obtaining the
external IP of the VM and was then subject to the local configuration.
If the local configuration and/or ssh keys are incorrect, these commands
would fail, preventing automatic setup of the VM.

Fix this by using the gcloud ssh and scp wrappers.  Unfortunately rsync
couldn't be made to work in this situation, so use a tarball to transfer
the local repository to the VM.  Lastly, execute `setup_environment.sh`
script, then drop the caller into a bash shell sitting in the remote
`$GOSRC` directory.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-14 10:45:12 -05:00
9ab838524c Update master branch with v1.0 changes from 1.0 branch
Grab release notes, changelog, and version changes so master is
up to date.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-14 10:18:09 -05:00
65e947e111 Add local storage.conf example to troubleshoot
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-14 09:53:37 -05:00
3b37101c6e config: store the runtime used to create each container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-14 10:22:18 +01:00
50c86ae389 oci: allow to define multiple OCI runtimes
we can define multiple OCI runtimes that can be chosen with
--runtime.

in libpod.conf is possible to specify them with:

[runtimes]
foo = [
             "/usr/bin/foo",
	     "/usr/sbin/foo",
]
bar = [
             "/usr/bin/foo",
	     "/usr/sbin/foo",
]

If the argument to --runtime is an absolute path then it is used
directly without any lookup in the configuration.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-14 10:22:18 +01:00
264d082106 Merge pull request #2117 from mtrmac/no-imageParts
RFC: Mostly replace imageParts
2019-01-14 01:08:13 -08:00
650cf122e1 libpod: allow multiple oci runtimes
This deprecates the libpod.conf variable of `runtime_path=`, and now has
`runtimes=`, like a map for naming the runtime, preparing for a
`--runtime` flag to `podman run` (i.e. runc, kata, etc.)

Reference: https://github.com/containers/libpod/issues/1750

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-01-14 10:03:40 +01:00
449116af19 Remove imageParts.{isTagged,registry,name,tag}
Finally, these members no longer have any users.

Future users should usually call referenceWithRegistry / normalizedReference,
and work with the returned value, instead of reintroducing these variables.
Similarly, direct uses of unnormalizedRef should be rare (only for cases
where the registry and/or path truly does not matter).

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:24 +01:00
797d194050 Clarify comments about isRegistry a bit.
Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:24 +01:00
ad90c44f8d Use imageParts.unnormalizedRef in GetImageBaseName
... to remove the last user of imageParts.name.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:24 +01:00
fa42f97507 FIXME? Introduce imageParts.suspiciousRefNameTagValuesForSearch
Image.MatchRepoTag and findImageInRepoTags do some kind of
heuristic search; the motivation and design of both, and how they
should deal with digests, is not obvious to me.

Instead of figuring that out now, just factor it out into a
scary-named method and leave the "tag" value (with its "latest"/"none"
value) alone.

Similarly, the .registry and .name fields should typically not be used;
users should use either hasRegistry or normalized reference types;
so, isolate the difficult-to-understand search code, and computation
of these values, into this new search-specific helper.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:24 +01:00
cf40b71614 Use imageParts.referenceWithRegistry in Image.getLocalImage
... to make sure everything uses the same code path.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
d559365d7a Don't try to look up local images with an explicit :latest suffix
imageruntime.getImage, through ParseStoreReference, already uses
reference.TagNameOnly on the input, so this extra lookup is completely
redundant to the lookup that has already happened.

Should not change behavior, apart from speeding up the code a bit.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
f92c3ce350 Return a reference.Named from normalizedTag
Instead of returning a string, return a native value and convert it
into the string in the caller, to make it that small bit more
common to use reference types.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
b9c0f2c987 Use reference.TagNameOnly instead of manually adding imageParts.tag in normalizeTag
Again, rely on the official API, instead of the suprising "suspiciousTagValueForSearch"
value (set to :latest on untagged images, and :none on digested ones!)

CHANGES BEHAVIOR, but the previous output of normalization of digested values was
not even syntatically valid, so this can't really be worse.

Still, maybe we should refuse to tag with digested references in the first place.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
e060a19c87 Use imageParts.normalizedReference in normalizeTag
This is another step to using reference values instead of strings here.

CHANGES BEHAVIOR: docker.io/busybox is now normalized to docker.io/library/busybox.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
1c19d19c6e Add imageParts.normalizedReference()
This will be used in normalizeTag to work with references instead of strings.

Not used anywhere yet, should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00
e58aa74766 Use imageparts.referenceWithRegistry in normalizeTag
... instead of open-coding something similar.  Eventually
we will use the reference type further in here.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-01-14 04:07:23 +01:00