5223 Commits

Author SHA1 Message Date
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
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
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
e5568d4acc Merge pull request #3916 from cevich/personalize_success
Personalize CI success messages to IRC
2019-09-01 08:29:05 -07:00
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
d266dbea15 Exclude podman-remote
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-31 08:05:51 -04:00
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
1a9ea04c7f Fix table spacing
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 13:34:36 -04:00
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
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
2d95ede7a2 podman-remote is not a subcommand
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 12:47:24 -04:00
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
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
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
8ba21acd45 Merge pull request #3911 from vrothberg/go-proxy
Makefile: use go proxy
2019-08-30 06:46:07 -07:00
7cf6ef01ac Merge pull request #3913 from rwha/fix/manpage-links
Fix links to manpages
2019-08-30 06:25:08 -07:00
3ddfabb30e Fix links to manpages
Signed-off-by: Ryan Whalen <rj.whalen@gmail.com>
2019-08-30 06:49:46 -04:00
3e0fdc7f7a Merge pull request #3908 from TomasTomecek/man-ev-bknd
man: events-logger → events-backend
2019-08-30 02:29:12 -07:00
90ebd7c909 Makefile: use go proxy
Use GOPROXY=https://proxy.golang.org to speed up fetching dependencies.
Setting it makes `make vendor` three times faster in my local env.

For details please refer to https://proxy.golang.org/.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-30 10:32:29 +02:00
d110998744 Merge pull request #3907 from baude/commitcaps
dont panic when using varlink commit and uppercase image names
2019-08-29 14:13:09 -07:00
9a5242c881 man: events-logger → events-backend
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2019-08-29 22:44:10 +02:00
2fb6cc2cea dont panic when using varlink commit and uppercase image names
when using an upper case image name for container commit, we observed
panics due to a channel closing early.

Fixes: #3897

Signed-off-by: baude <bbaude@redhat.com>
2019-08-29 14:08:29 -05:00
ab5f52c0d2 Merge pull request #3710 from cevich/release_redo
Release redo
2019-08-29 06:56:43 -07:00
1eb6b271bb Merge pull request #3833 from QiWang19/cert-dir
add --cert-dir image sign
2019-08-28 13:21:48 -07:00
9926a299f7 Merge pull request #3892 from cevich/google_vpc
Cirrus: Block CNI use of google VPCs
2019-08-28 13:03:51 -07:00
c13a52cfde Add a test for the new suid/exec/dev options
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:52 -04:00
96812dc490 Fix addition of mount options when using RO tmpfs
For read-only containers set to create tmpfs filesystems over
/run and other common destinations, we were incorrectly setting
mount options, resulting in duplicate mount options.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
820e242e82 Allow :z and :Z with ProcessOptions
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
5bdd97f77f Set base mount options for bind mounts from base system
If I mount, say, /usr/bin into my container - I expect to be able
to run the executables in that mount. Unconditionally applying
noexec would be a bad idea.

Before my patches to change mount options and allow exec/dev/suid
being set explicitly, we inferred the mount options from where on
the base system the mount originated, and the options it had
there. Implement the same functionality for the new option
handling.

There's a lot of performance left on the table here, but I don't
know that this is ever going to take enough time to make it worth
optimizing.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
d45595d9cc Don't double-process tmpfs options
We already process the options on all tmpfs filesystems during
final addition of mounts to the spec. We don't need to do it
before that in parseVolumes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
02264d597f Add support for 'exec', 'suid', 'dev' mount flags
Previously, we explicitly set noexec/nosuid/nodev on every mount,
with no ability to disable them. The 'mount' command on Linux
will accept their inverses without complaint, though - 'noexec'
is counteracted by 'exec', 'nosuid' by 'suid', etc. Add support
for passing these options at the command line to disable our
explicit forcing of security options.

This also cleans up mount option handling significantly. We are
still parsing options in more than one place, which isn't good,
but option parsing for bind and tmpfs mounts has been unified.

Fixes: #3819
Fixes: #3803

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
502536fe07 Update buildah to current master
Vendor some changes to parsing code that we need for Podman.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
bdf9e56813 Merge pull request #3893 from mheon/readd_volume_locks
Re-add volume locks
2019-08-28 11:25:12 -07:00
ced3ebb512 Merge pull request #3728 from mheon/systemd_container_test
Add an integration test for systemd in a container
2019-08-28 11:25:05 -07:00
4e209fc10a Merge pull request #3823 from cevich/prune_old_images
Cirrus: Enable VM image housekeeping
2019-08-28 18:51:53 +02:00
370b1a887c Cirrus: Reimplement release archive + upload
The initial implementation was far more complicated than necessary.
Strip out the complexities in favor of a simpler and more direct
approach.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-28 11:54:06 -04:00
8e46106f42 Readme: Links for automatic binary releases
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-28 11:53:34 -04:00
e563f41116 Re-add locks to volumes.
This will require a 'podman system renumber' after being applied
to get lock numbers for existing volumes.

Add the DB backend code for rewriting volume configs and use it
for updating lock numbers as part of 'system renumber'.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 11:35:00 -04:00
61dc63f8aa Merge pull request #3898 from dcbw/remove-decompose
image: remove unused Decompose method
2019-08-28 17:00:45 +02:00
90cddf36bd image: remove unused Decompose method
Decompose() returns an error defined in CNI which has been removed
upstream because it had no in-tree (eg in CNI) users.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2019-08-28 08:59:33 -05:00
e5c5a33c87 Merge pull request #3889 from abitrolly/patch-1
Test build snap with Cirrus CI
2019-08-28 15:44:40 +02:00
ca0dfca5c9 Temporarily disable systemd test for CGroups V2
Revert this one CGroups V2 support for systemd containers is
added.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-08-28 09:28:49 -04:00
63d989a344 Add an integration test for systemd in a container
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 09:28:49 -04:00
8b09b07b19 clean up after remote build
when performing an image build over a varlink connection, we should
clean up tmp files that are a result of sending the file to the host and
untarring it for the build.

Fixes: #3869

Signed-off-by: baude <bbaude@redhat.com>
2019-08-28 09:28:49 -04:00
e06f17f580 Cirrus: Block CNI use of google VPCs
Specifically pertaining to executing tests in google cloud, there are
default, pre-allocated class-a subnetworks for each region (data-center).
Each includes a gateway using a `.1` LSB and all are routable from other
regions in google cloud via these gateways.

Because the default CNI configuration also utilizes class-a subnetworks,
this creates the possibility for IPv4 address-space clashes.  Since the
default regional cloud subnets are pre-defined/known, preventing clashes
can be accomplished by seeding these subnets in a dummy CNI configuration.

The default behavior of podman is to grab the highest priority CNI
configuration.  Name the dummy config. appropriate so it always loads
last.  Also name the bridge itself with an obvious name `do-not-use`,
such that any related testing errors should be easier to debug.

Also:

* Minor cleanup of `install_test_configs()`
* Move install_test_configs in `setup_environment.sh` to after possible
  run of `remove_packaged_podman_files()` because that also strips out
  `/etc/cni/net.d/87-podman-bridge.conflist`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-28 09:02:31 -04:00
a1a1342587 Merge pull request #3887 from edsantiago/bats
podman cp: big set of system tests
2019-08-28 11:37:31 +02:00
6e3ee63091 Add snap build test to success and release check
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2019-08-28 12:13:37 +03:00
bac1f3e644 Run apt-get update to avoid missing package while building
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2019-08-28 09:42:07 +03:00
0bc41f1a45 Use snapcraft on Ubuntu 18.04 for libostree-dev
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2019-08-28 09:42:07 +03:00
0d54ff3131 Test build snap with Cirrus CI
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2019-08-28 09:42:07 +03:00