Commit graph

5304 commits

Author SHA1 Message Date
OpenShift Merge Robot 79ebb5f254
Merge pull request #3988 from mheon/fix_lookup_volume
Volume lookup needs to include state to unmarshal into
2019-09-11 18:17:30 +02:00
Matthew Heon 3c277a67d5 Add further fields to StorageContainer
This will be used when we allow 'podman ps' to display info on
storage containers instead of Libpod containers.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-09-11 10:53:21 -04:00
OpenShift Merge Robot f73c3b868d
Merge pull request #3973 from baude/validateupdate
add lint and manpage check to make validate
2019-09-11 16:45:55 +02:00
Matthew Heon 5ddfe5d95d Volume lookup needs to include state to unmarshal into
Lookup was written before volume states merged, but merged after,
and CI didn't catch the obvious failure here. Without a valid
state, we try to unmarshall into a null pointer, and 'volume rm'
is completely broken because of it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-11 10:17:28 -04:00
OpenShift Merge Robot 093013b099
Merge pull request #3984 from mheon/prune_no_in_use_error
Do not prune images being used by a container
2019-09-11 15:31:15 +02:00
OpenShift Merge Robot 9cf852c305
Merge pull request #3927 from openSUSE/manager-annotations
Add `ContainerManager` annotation to created containers
2019-09-11 09:34:14 +02:00
OpenShift Merge Robot 7ac6ed3b4b
Merge pull request #3581 from mheon/no_cgroups
Support running containers without CGroups
2019-09-11 00:58:46 +02:00
OpenShift Merge Robot 997c4b56ed
Merge pull request #3961 from mheon/copy_volume_contents
When first mounting any named volume, copy up
2019-09-10 22:24:43 +02:00
Chris Evich a58ac7be7b
Cirrus: Prevent resident pollution
When constructing VM cache-images, the latest/greatest podman package is
installed to ensure all necessary dependencies are met.  Prior to
testing source-built binaries, most of of the packaged files are removed.
However, if the `io.podman` service or socket is enabled/running, it
could cause the packaged podman and varlink binaries to be both resident
and cached.  Since this condition would cause very difficult to diagnose
behaviors, add preventative measures to ensure these services are absent
prior to removing packaged podman files.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-10 16:22:15 -04:00
Matthew Heon 3e92bcbf71 Do not prune images being used by a container
Podman is not the only user of containers/storage, and as such we
cannot rely on our database as the sole source of truth when
pruning images. If images do not show as in use from Podman's
perspective, but subsequently fail to remove because they are
being used by a container, they're probably being used by Buildah
or another c/storage client.

Since the images in question are in use, we shouldn't error on
failure to prune them - we weren't supposed to prune them in the
first place.

Fixes: #3983

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-10 13:30:50 -04:00
OpenShift Merge Robot c1761ba1ac
Merge pull request #3817 from xcffl/master
Add explanation mounting named volumes for `podman run`
2019-09-10 19:17:39 +02:00
OpenShift Merge Robot 095647cd6f
Merge pull request #3966 from cfelder/fixup-makefile-bsd
Fixup Makefile for BSD systems, e.g. macOS
2019-09-10 17:19:06 +02:00
Matthew Heon c2284962c7 Add support for launching containers without CGroups
This is mostly used with Systemd, which really wants to manage
CGroups itself when managing containers via unit file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-10 10:52:37 -04:00
OpenShift Merge Robot 52335367bc
Merge pull request #3964 from TomSweeneyRedHat/dev/tsweeney/journaldimgfix
Turn off journald in podmanimages on quay.io
2019-09-10 15:03:16 +02:00
baude ba7e863ac3 add lint and manpage check to make validate
make validate now runs golangci-lint and the man-page-checker to ensure
a PR is ready for our CI system.

Signed-off-by: baude <bbaude@redhat.com>
2019-09-10 05:45:59 -05:00
Sascha Grunert df036f9f8e
Add ContainerManager annotation to created containers
This change adds the following annotation to every container created by
podman:

```json
"Annotations": {
    "io.containers.manager": "libpod"
}
```

Target of this annotaions is to indicate which project in the containers
ecosystem is the major manager of a container when applications share
the same storage paths. This way projects can decide if they want to
manipulate the container or not. For example, since CRI-O and podman are
not using the same container library (libpod), CRI-O can skip podman
containers and provide the end user more useful information.

A corresponding end-to-end test has been adapted as well.

Relates to: https://github.com/cri-o/cri-o/pull/2761

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-09-10 09:37:14 +02:00
Matthew Heon b6106341fb When first mounting any named volume, copy up
Previously, we only did this for volumes created at the same time
as the container. However, this is not correct behavior - Docker
does so for all named volumes, even those made with
'podman volume create' and mounted into a container later.

Fixes #3945

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-09 17:17:39 -04:00
OpenShift Merge Robot 9a55bce9e4
Merge pull request #3896 from mheon/volume_lookup
Add ability to look up volumes by unambiguous partial name
2019-09-09 21:48:30 +02:00
OpenShift Merge Robot 7042a3d7a5
Merge pull request #3862 from baude/networkcreate
podman network create
2019-09-09 19:44:57 +02:00
OpenShift Merge Robot 511b071745
Merge pull request #3975 from edsantiago/man_page_checker_better_diagnostics
hack/man_page_checker - improve diagnostics
2019-09-09 19:19:05 +02:00
Matthew Heon 046178e55f Add function for looking up volumes by partial name
This isn't included in Docker, but seems handy enough.

Use the new API for 'volume rm' and 'volume inspect'.

Fixes #3891

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-09 12:06:10 -04:00
Ed Santiago 2c73633e3b hack/man_page_checker - improve diagnostics
Make the errors more readable, with clearer instructions on
what to look for, and which filename, and what we expect to
see, and perhaps even how to approach a fix.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-09-09 09:37:52 -06:00
OpenShift Merge Robot 16a7049085
Merge pull request #3971 from cfelder/fixup-getconfighomedir
Fixup `util.GetRootlessConfigHomeDir` permission requirements
2019-09-09 16:37:13 +02:00
baude ee432cf279 podman network create
initial implementation of network create.  we only support bridging
networks with this first pass.

Signed-off-by: baude <bbaude@redhat.com>
2019-09-09 09:32:43 -05:00
Christian Felder f44b05f6fd Fixup util.GetRootlessConfigHomeDir permission requirements
Do not require 0755 permissons for the ~/.config directory but require
at least 0700 which should be sufficient. The current implementation
internally creates this directory with 0755 if it does not exist, but if the
directory already exists with different perissions the current code returns
an empty string.

Signed-off-by: Christian Felder <c.felder@fz-juelich.de>
2019-09-09 15:17:42 +02:00
OpenShift Merge Robot d78521de11
Merge pull request #3914 from marcov/units-opts
cli-flags: use a consistent format for <size><unit>
2019-09-09 10:06:11 +02:00
OpenShift Merge Robot f500feb2f1
Merge pull request #3944 from giuseppe/build-cgroup-manager
build: pass down the cgroup manager to buildah
2019-09-08 17:29:30 +02:00
OpenShift Merge Robot 731281193a
Merge pull request #3965 from rhatdan/completions
Fix podman import bash completions
2019-09-08 17:20:57 +02:00
Christian Felder 82025e7dbe Fixup Makefile for BSD systems, e.g. macOS
The bsd variant of `ln` does not support the ``-T`` option.
Testing for existence using wildcard before creating new symlinks
should be sufficient here. Furthermore the target directory is
managed internally by this Makefile anyway.

Signed-off-by: Christian Felder <c.felder@fz-juelich.de>
2019-09-07 19:42:41 +02:00
xcffl 3d240bd795 Replace "podman" with "Podman"
Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 20:16:42 +08:00
xcffl cd7a1ac194 Add instructions for mounting named volumes
from the host for `podman run`

Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 19:28:21 +08:00
xcffl 284cbab193 Add instruction for using fuse-overlayfs as the rootless storage driver
Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 19:27:47 +08:00
Daniel J Walsh f4ebfcb97d
Fix podman import bash completions
podman import bash completions are throwing errors.  Updated this completion
to work correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-07 06:29:07 -04:00
TomSweeneyRedHat 8ad6f25db8 Turn off journald in podmanimages on quay.io
In the Dockerfiles that are used to build the podman images on
quay.io, we were changing the events_logger from journald to
file in libpod.conf, but we weren't enabling it as we didn't
remove the comment.  This corrects that and addresses: #3464

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-09-06 19:57:53 -04:00
Giuseppe Scrivano 06f94bef1f
build: pass down the cgroup manager to buildah
Pass down the cgroup manager to use to buildah.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-06 22:55:46 +02:00
OpenShift Merge Robot 30cbb00915
Merge pull request #3950 from ashley-cui/macdoc
mac_client docs
2019-09-06 19:16:37 +02:00
OpenShift Merge Robot 290def5b92
Merge pull request #3960 from mheon/ignore_umount_enoent
Ignore ENOENT on umount of SHM
2019-09-06 17:31:04 +02:00
Ashley Cui 07b8b80178 mac_client.md
add doc explaining setup for podman on mac in current stage of dev

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-09-06 11:15:00 -04:00
OpenShift Merge Robot 575ffee2f0
Merge pull request #3918 from rhatdan/info
Return information about mount_program (fuse-overlayfs)
2019-09-06 16:45:25 +02:00
Matthew Heon 77f9234513 Ignore ENOENT on umount of SHM
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-06 10:25:53 -04:00
OpenShift Merge Robot 88980859ec
Merge pull request #3958 from haircommander/play-kube-sec
play kube: fix segfault
2019-09-06 15:40:13 +02:00
Peter Hunt 9259693826 play kube: fix segfault
when securityContext wasn't specified in yaml.
add a test as well

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-09-06 08:41:04 -04:00
OpenShift Merge Robot 24171ae060
Merge pull request #3954 from mheon/hardcode_default_storepaths
Ensure good defaults on blank c/storage configuration
2019-09-06 14:01:59 +02:00
OpenShift Merge Robot 0d8a22496e
Merge pull request #3931 from mheon/volumes_with_options
Add support for mounting volumes with local driver and options
2019-09-06 13:48:33 +02:00
Daniel J Walsh b2b284111e
Return information about mount_program (fuse-overlayfs)
We want to get podman info to tell us about the version of
the mount program to help us diagnose issues users are having.

Also if in rootless mode and slirp4netns is installed reveal package
info on slirp4netns.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-06 07:32:42 -04:00
Matthew Heon 3a09956dff Ensure good defaults on blank c/storage configuration
If c/storage paths are explicitly set to "" (the empty string) it
will use compiled-in defaults. However, it won't tell us this via
`storage.GetDefaultStoreOptions()` - we just get the empty string
(which can put our defaults, some of which are relative to
c/storage, in a bad spot).

Hardcode a sane default for cases like this. Furthermore, add
some sanity checks to paths, to ensure we don't use relative
paths for core parts of libpod.

Fixes #3952

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 17:47:11 -04:00
OpenShift Merge Robot a4572c4f68
Merge pull request #3951 from rhatdan/readme
Fixup README.md to give proper information
2019-09-05 23:34:01 +02:00
Matthew Heon de9a394fcf Correctly report errors on unmounting SHM
When we fail to remove a container's SHM, that's an error, and we
need to report it as such. This may be part of our lingering
storage woes.

Also, remove MNT_DETACH. It may be another cause of the storage
removal failures.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 17:12:27 -04:00
Matthew Heon a760e325f3 Add ability for volumes with options to mount/umount
When volume options and the local volume driver are specified,
the volume is intended to be mounted using the 'mount' command.
Supported options will be used to volume the volume before the
first container using it starts, and unmount the volume after the
last container using it dies.

This should work for any local filesystem, though at present I've
only tested with tmpfs and btrfs.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 17:12:27 -04:00
Daniel J Walsh f25f2ccbea
Fixup README.md to give proper information
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-05 14:44:44 -04:00