5092 Commits

Author SHA1 Message Date
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
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
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
f221c61019 Merge pull request #3888 from jwhonce/wip/api
Update varlink doc and code for images
2019-08-27 11:43:24 +02:00
02cda4066d Update varlink doc and code
* Improved error message
* Added documentation
* Updated messages to include missing data

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-08-26 16:45:49 -07:00
4e2cccd9af podman cp: big set of system tests
podman cp has had some unexpected bugs, and still has
some surprising behavior. It looks like this part of
the code is fragile. Add tests to try to prevent
future breakages.

Note that two of the new tests are disabled (skipped)
until #3829 gets fixed.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-26 15:33:38 -06:00
cec354aac9 Merge pull request #3886 from baude/addiproute
add iproute to podman in podman image
2019-08-26 23:25:20 +02:00
1606cc8960 add iproute to podman in podman image
the network create function relies on the prescense of iproute's binary
'ip'.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-26 14:20:56 -05:00
78b0773f7d Cirrus: Enable VM image housekeeping
Also do some minor cleanup and add additional safety-checks to pruning
script (container image).

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-26 14:30:40 -04:00
112a3cce5d Merge pull request #3883 from baude/varlinkbuildcleanup
clean up after remote build
2019-08-26 17:24:09 +02:00
67926d86b5 Merge pull request #3824 from baude/varlinkendpointtest
Create framework for varlink endpoint integration tests
2019-08-26 17:11:12 +02:00
6240bd41cb Merge pull request #3755 from mheon/fix_cniname
Adjust name of Podman CNI network bridge
2019-08-26 17:11:04 +02:00
ed88a5fb64 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-25 14:02:33 -05:00
c0528c152e Merge pull request #3877 from TomSweeneyRedHat/dev/tsweeney/cnifix
Update cni config instructions
2019-08-25 18:46:31 +02:00
7b4102ce28 Adjust name of Podman CNI network bridge
Both Podman and CRI-O set up CNI bridges with the name 'cni0'. If
both our CNI conflist and the CRI-O conflist are installed,
whoever runs first will win - that is, they will configure the
bridge, and everyone will use it. Problem: the CRI-O CNI config
conflicts with ours and results in containers with no networking.
Solution: rename our bridge so we don't conflict with CRI-O.

At the same time, hit our IPAM configuration. The current version
was an older format in danger of deprecation. The new format is
documented at [1].

Finally, fix indentation for the entire file.

[1] https://github.com/containernetworking/plugins/tree/master/plugins/ipam/host-local#example-configurations

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-23 11:27:28 -04:00
ada0568f53 Update cni config instructions
Update the CNI configuration instructions to line up with
the changes introduced in #3868.  Also do a bit less documentation
of the configuration and point to the GitHub project so we won't
get out of sync in the future.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-22 19:39:07 -04:00
59261cf014 Merge pull request #3845 from chrahunt/patch-2
Fix minor typos in podman-run docs.
2019-08-22 21:20:38 +02:00
1537fc1f81 Merge pull request #3844 from chrahunt/patch-1
Fix link format in rootless_tutorial.md.
2019-08-22 20:59:21 +02:00
b263dd9e81 Merge pull request #3800 from vrothberg/generate-pod
generate systemd pod
2019-08-22 19:08:08 +02:00
34002f92ff Merge pull request #3873 from rhatdan/migrate
Need to include command name in error message
2019-08-22 16:06:15 +02:00
18f2328264 Merge pull request #3872 from baude/3861
podman-remote: cp crashes
2019-08-22 03:42:11 -07:00
34f902572d Merge pull request #3868 from giuseppe/dockerfile-cni-rpm
Dockerfile.fedora: install cni plugins package
2019-08-22 03:41:57 -07:00
dc19c3e9f8 Fix minor typos in podman-run docs.
Signed-off-by: Chris Hunt <chrahunt@gmail.com>
2019-08-21 21:30:14 -04:00
48a5a937cb Fix link format in rootless_tutorial.md.
From `[link](url)` to [`link`](url)

Signed-off-by: Chris Hunt <chrahunt@gmail.com>
2019-08-21 21:29:40 -04:00
ecc5cc532a Merge pull request #3863 from TomSweeneyRedHat/dev/tsweeney/digestfile2
Add --digestfile option to push
2019-08-21 15:32:56 -07:00
56b78c72f3 Need to include command name in error message
I hit this error and it told be to system migrate`
as opposed to `podman system migrate`

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-21 18:13:17 -04:00
e06d0fe5e5 podman-remote: cp crashes
prune unwanted messages when running a container remotely.  also, cp is
not remote-enabled yet and as such should not be available on the remote
client.

Fixes: #3861

Signed-off-by: baude <bbaude@redhat.com>
2019-08-21 14:53:23 -05:00
1ff984d509 Merge pull request #2940 from giuseppe/drop-firewall
networking: use firewall plugin
2019-08-21 11:05:16 -07:00
56a65cffac generate systemd: support pods and geneartig files
Support generating systemd unit files for a pod.  Podman generates one
unit file for the pod including the PID file for the infra container's
conmon process and one unit file for each container (excluding the infra
container).

Note that this change implies refactorings in the `pkg/systemdgen` API.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-21 17:28:30 +02:00
2bb5b4a9b4 Dockerfile.fedora: install cni plugins package
the version available on Fedora is updated, so we don't need to build
from source.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-21 17:24:55 +02:00
9ced2488c9 Add --digestfile option to push
Add the digestfile option to the push command so the digest can
be stored away in a file when requested by the user.  Also have added
a debug statement to show the completion of the push.

Emulates Buildah's https://github.com/containers/buildah/pull/1799/files

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-21 10:11:52 -04:00
a33e4a89ca generate systemd: drop support for remote clients
Drop the support for remote clients to generate systemd-service files.
The generated files are machine-dependent and hence relate only to the
a local machine.  Furthermore, a proper service management when using
a remote-client is not possible as systemd has no access to a process.

Dropping the support will also reduce the risk of making users believe
that the generated services are usable in a remote scenario.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-21 09:41:07 +02:00
1ad8fe5241 Merge pull request #3856 from giuseppe/fix-dockerfile-cni
Dockerfile*: fix build for CNI plugins
2019-08-20 22:48:11 +02:00