5194 Commits

Author SHA1 Message Date
7ac6ed3b4b Merge pull request #3581 from mheon/no_cgroups
Support running containers without CGroups
2019-09-11 00:58:46 +02:00
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
c1761ba1ac Merge pull request #3817 from xcffl/master
Add explanation mounting named volumes for `podman run`
2019-09-10 19:17:39 +02:00
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
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
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
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
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
7042a3d7a5 Merge pull request #3862 from baude/networkcreate
podman network create
2019-09-09 19:44:57 +02:00
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
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
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
16a7049085 Merge pull request #3971 from cfelder/fixup-getconfighomedir
Fixup `util.GetRootlessConfigHomeDir` permission requirements
2019-09-09 16:37:13 +02:00
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
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
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
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
731281193a Merge pull request #3965 from rhatdan/completions
Fix podman import bash completions
2019-09-08 17:20:57 +02:00
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
3d240bd795 Replace "podman" with "Podman"
Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 20:16:42 +08:00
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
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
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
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
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
30cbb00915 Merge pull request #3950 from ashley-cui/macdoc
mac_client docs
2019-09-06 19:16:37 +02:00
290def5b92 Merge pull request #3960 from mheon/ignore_umount_enoent
Ignore ENOENT on umount of SHM
2019-09-06 17:31:04 +02:00
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
575ffee2f0 Merge pull request #3918 from rhatdan/info
Return information about mount_program (fuse-overlayfs)
2019-09-06 16:45:25 +02:00
77f9234513 Ignore ENOENT on umount of SHM
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-06 10:25:53 -04:00
88980859ec Merge pull request #3958 from haircommander/play-kube-sec
play kube: fix segfault
2019-09-06 15:40:13 +02:00
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
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
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
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
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
a4572c4f68 Merge pull request #3951 from rhatdan/readme
Fixup README.md to give proper information
2019-09-05 23:34:01 +02:00
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
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
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
cef5bec06b Merge pull request #3948 from openSUSE/buildah-update
Update buildah to v1.11.0
2019-09-05 19:44:43 +02:00
5a8a71ed81 Add volume state
We need to be able to track the number of times a volume has been
mounted for tmpfs/nfs/etc volumes. As such, we need a mutable
state for volumes. Add one, with the expected update/save methods
in both states.

There is backwards compat here, in that older volumes without a
state will still be accepted.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 12:29:36 -04:00
c8193633cd Change volume driver and options JSON tags
In upcoming commits, we're going to turn on the backends for
these fields. Volumes with these set will act fundamentally
differently from other volumes. There will probably be validation
required for each field.

Until now, though, we've freely allowed creation of volumes with
these set - they just did nothing. So we have no idea what could
be in the DB with old volumes.

Change the struct tags so we don't have to worry about old,
unvalidated data. We'll start fresh with new volumes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 12:29:36 -04:00
3f81f4409d Merge pull request #3947 from rhatdan/tmpdir
Set TMPDIR to /var/tmp by default
2019-09-05 18:07:50 +02:00
f66a2069f1 Update buildah to v1.11.0
Vendor in the latest changes for buildah to apply the implemented
features here as well.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-09-05 16:58:08 +02:00
772af18205 Set TMPDIR to /var/tmp by default
We have had some issues with users squashing large images or pulling large
content from github, that could trigger crashes based on the size of /tmp.

Docker had an issue with this back in 2016. https://github.com/golang/go/issues/14021

The discussion there was to change the default to /var/tmp.

This change will only effect systems that do not set the TMPDIR environment variable.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-05 10:31:25 -04:00
b962b1e353 Merge pull request #3943 from gabibeyer/fix_tests
Fix unit tests missing comparative for 'Expect'
2019-09-05 12:49:21 +02:00
5711aabb4d cli-flags: use a consistent format for <size><unit>
Use a consistent format for description of the <size><unit> flags.
Also, avoid backticks for /dev/shm, as that's interpreted as the format
by the flag parsing lib.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-09-05 11:13:39 +02:00
95f5411e88 Fix unit tests missing comparative for 'Expect'
Add '.To(BeTrue())' to 'Expect(' statements in unit tests that
are missing them. These tests weren't being compared to anything,
thus reporting false positives.

Signed-off-by: gabi beyer <gabrielle.n.beyer@intel.com>
2019-09-04 23:30:24 +00:00
e74fcd7335 Merge pull request #3940 from edsantiago/bats
System tests: support for crun on f31/rawhide
2019-09-04 23:13:22 +02:00