Commit Graph

5608 Commits

Author SHA1 Message Date
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
OpenShift Merge Robot cef5bec06b
Merge pull request #3948 from openSUSE/buildah-update
Update buildah to v1.11.0
2019-09-05 19:44:43 +02:00
Matthew Heon 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
Matthew Heon 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
OpenShift Merge Robot 3f81f4409d
Merge pull request #3947 from rhatdan/tmpdir
Set TMPDIR to /var/tmp by default
2019-09-05 18:07:50 +02:00
Sascha Grunert 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
Daniel J Walsh 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
OpenShift Merge Robot b962b1e353
Merge pull request #3943 from gabibeyer/fix_tests
Fix unit tests missing comparative for 'Expect'
2019-09-05 12:49:21 +02:00
Marco Vedovati 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
gabi beyer 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
OpenShift Merge Robot e74fcd7335
Merge pull request #3940 from edsantiago/bats
System tests: support for crun on f31/rawhide
2019-09-04 23:13:22 +02:00
OpenShift Merge Robot ab44484bec
Merge pull request #3876 from mheon/fix_mount_flags
Allow suid, exec, dev mount options to cancel nosuid/noexec/nodev
2019-09-04 22:43:41 +02:00
OpenShift Merge Robot 52f2454098
Merge pull request #3933 from giuseppe/skip-polling-on-run
libpod: avoid polling container status
2019-09-04 22:33:06 +02:00
Ed Santiago acf55e1f87 System tests: support for crun on f31/rawhide
crun emits wildly different error messages than runc in
two cases:

    podman run ... /no/such/path   (enoent)
    podman run ... /etc            (trying to exec a directory)

Deal with it by getting the runtime from 'podman info' and,
if crun, changing what we expect.

There may be more tweaks needed to get system tests working
with crun, but right now podman rawhide is too broken to
have any hope of finding them all.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-09-04 14:03:55 -06:00
OpenShift Merge Robot 84140f5331
Merge pull request #3902 from baude/dnsmasqaddresponse
handle dns response from cni
2019-09-04 21:57:43 +02:00
Giuseppe Scrivano 8e337aff5a
libpod: avoid polling container status
use the inotify backend to be notified on the container exit instead
of polling continuosly the runtime.  Polling the runtime slowns
significantly down the podman execution time for short lived
processes:

$ time bin/podman run --rm -ti fedora true

real	0m0.324s
user	0m0.088s
sys	0m0.064s

from:

$ time podman run --rm -ti fedora true

real	0m4.199s
user	0m5.339s
sys	0m0.344s

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-04 19:55:54 +02:00
Matthew Heon 5f15501578 Add test to verify noexec works with volume mounts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-04 13:19:19 -04:00
OpenShift Merge Robot f1a3e02aea
Merge pull request #3928 from edsantiago/enable_man_page_checker_in_ci
Enable hack/man-page-checker in CI
2019-09-04 14:30:51 +02:00
OpenShift Merge Robot 1d8a940982
Merge pull request #3930 from cevich/update_irc_table
Cirrus: Update e-mail -> IRC Nick table
2019-09-04 11:35:26 +02:00
Chris Evich 34dad57cbc
Cirrus: Update e-mail -> IRC Nick table
Also add fixes to help prevent 'fatal: Invalid revision range' error.
Should obtaining all authors from the range still fail, only grab the
HEAD commit author as a fallback.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-03 16:39:35 -04:00
baude 8818e358bf handle dns response from cni
when cni returns a list of dns servers, we should add them under the
right conditions.  the defined conditions are as follows:

- if the user provides dns, it and only it are added.
- if not above and you get a cni name server, it is added and a
forwarding dns instance is created for what was in resolv.conf.
- if not either above, the entries from the host's resolv.conf are used.
Signed-off-by: baude <bbaude@redhat.com>

Signed-off-by: baude <bbaude@redhat.com>
2019-09-03 10:10:05 -05:00
OpenShift Merge Robot a16f63e96e
Merge pull request #3926 from giuseppe/add-warning-mismatch-configuration
rootless: detect user namespace configuration changes
2019-09-03 07:02:44 -07:00
OpenShift Merge Robot c03949986f
Merge pull request #3904 from cevich/fix_img_prune
Cirrus: imgprune fixes
2019-09-03 06:04:08 -07:00
Giuseppe Scrivano 1a24ac7ad6
pkg/util: use rootless function to read additional users
make pkg/rootless.GetConfiguredMappings public so that it can be used
from pkg/util.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-03 14:38:08 +02:00
Ed Santiago e367fc04d8 Enable hack/man-page-checker in CI
With huge thanks to @rwha for #3915. All man pages are clean
and consistent now - let's keep them that way.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-09-03 06:37:29 -06:00
OpenShift Merge Robot 7e238b9e0c
Merge pull request #3915 from rwha/fix_man_page_tests
Fix formatting and enable hack/man-page-checker
2019-09-03 05:34:06 -07:00
Giuseppe Scrivano cfe1d27688
rootless: detect user namespace configuration changes
detect if the current user namespace doesn't match the configuration
in the /etc/subuid and /etc/subgid files.

If there is a mismatch, raise a warning and suggest the user to
recreate the user namespace with "system migrate", that also restarts
the containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-03 13:46:48 +02:00
OpenShift Merge Robot 50a191037d
Merge pull request #3925 from MatMaul/doc-rootless-systemd
rootless.md: add systemd unit example
2019-09-03 03:09:08 -07:00
Mathieu Velten bb900be87f rootless.md: add systemd unit example
Signed-off-by: Mathieu Velten <matmaul@gmail.com>
2019-09-03 00:33:33 +02:00
OpenShift Merge Robot 099549bd38
Merge pull request #3909 from giuseppe/rootless-bind-mount-dev
rootless: bind mount devices instead of creating them
2019-09-02 11:06:04 -07:00
OpenShift Merge Robot 03344fff1c
Merge pull request #3922 from giuseppe/add-note-failing-systemd-cgroups-v1
docs: add note about failing rhel7 systemd on cgroups v2
2019-09-02 10:55:05 -07:00
Giuseppe Scrivano 6aed6dbcc0
docs: add note about failing rhel7 systemd on cgroups v2
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1747933

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-02 15:56:13 +02:00
Giuseppe Scrivano 759ca2cfc6
spec: provide custom implementation for getDevices
provide an implementation for getDevices that skip unreadable
directories for the current user.

Based on the implementation from runc/libcontainer.

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

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-02 13:27:47 +02:00
Giuseppe Scrivano b101a8d366
spec: do not set devices cgroup when rootless
eBPF requires to be root in the init namespace.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-09-02 13:03:20 +02:00
Giuseppe Scrivano ba1c57030f
rootless: bind mount devices instead of creating them
when running in rootless mode, --device creates a bind mount from the
host instead of specifying the device in the OCI configuration.  This
is required as an unprivileged user cannot use mknod, even when root
in a user namespace.

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

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-09-02 13:03:19 +02:00
OpenShift Merge Robot e5568d4acc
Merge pull request #3916 from cevich/personalize_success
Personalize CI success messages to IRC
2019-09-01 08:29:05 -07:00
Ryan Whalen 09f373283a Add command aliases to SYNOPSIS section
The files under docs/links reference another man page, e.g.
`man podman-container-list` displays `podman-ps(1)`. This adds
the alias to the in the displayed page's SYNOPSIS section.

Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-31 16:58:52 -04:00
Ryan Whalen d266dbea15 Exclude podman-remote
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-31 08:05:51 -04:00
Chris Evich 48d1c49078
Cirrus: On success, add IRC nick mention to msg
Rather than spamming the podman channel with impersonal success
messages referring to PR numbers, mention the author by nick name
and include the PR title and link.

Also avoid needless logging of all bot-script interactions with
IRC when there is no error detected.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-30 14:57:42 -04:00
Ryan Whalen 1a9ea04c7f Fix table spacing
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 13:34:36 -04:00
Ryan Whalen 6b7f8b01b9 Revert the descriptive text for podman-remote
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 13:18:38 -04:00
Ryan Whalen c153895424 WIP - ignore man pages for commands besides podman
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 12:47:41 -04:00
Ryan Whalen 2d95ede7a2 podman-remote is not a subcommand
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 12:47:24 -04:00
Ryan Whalen e35a5a674d Fix formatting and enable hack/man-page-checker
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 12:00:19 -04:00
Chris Evich 56f11b1016
Cirrus: Load base-image names indirectly
Rather than hard-coding all four base-image env. var name,
load the values based on the shared variable name suffix.

Thanks to Ed Santiago <santiago@redhat.com> for the suggestion.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-30 09:46:43 -04:00
Chris Evich 704c4c171f
Cirrus: Remove image_prune YAML-alias workaround
Originally when written, the image_prune_task was passing incorrect
credentials into it's container.  This was traced back to mishandling of
a YAML-alias, and worked-around (including a comment).  However,
as of this commit, it appear YAML-alias substitution problem has
been addressed.  Restore the (correct) use of a YAML-alias so
the correct credentials are passed into the prune container.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-30 09:46:43 -04:00
OpenShift Merge Robot 8ba21acd45
Merge pull request #3911 from vrothberg/go-proxy
Makefile: use go proxy
2019-08-30 06:46:07 -07:00