2241 Commits

Author SHA1 Message Date
255b56ae41 fix runlabel functions based on QA feedback
Signed-off-by: baude <bbaude@redhat.com>
2018-10-11 09:52:53 -05:00
883df782f5 Vendor latest containers/image
Catches more errors when checking for login credentials.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2018-10-11 10:40:22 -04:00
9be18c2eaf Stop containers in parallel fashion
Prior, we were stopping containers serially.  So if a container had a default
timeout of 10 seconds and there were five containers being stopped, the operation
would take roughly 50 seconds.  If we stop these containers in parallel, the operation
should be roughly 10 seconds and change which is a significant speed up at scale.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-11 09:37:54 -05:00
23c9816ba9 Merge pull request #1622 from baude/paprdind
Paprdind
2018-10-11 07:36:51 -07:00
1c0247ceb4 wip
Signed-off-by: baude <bbaude@redhat.com>
2018-10-10 14:11:35 -05:00
08cab4ad3a remove hack/dind
The docker-in-docker was script was needed to run AppArmor tests in
Travis, which is not required anymore since Travis isn't being used
for a while.  Removing the script will also cure some hiccups on
some atomic testing nodes.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-10 18:05:50 +02:00
71c2681310 Merge pull request #1587 from mheon/fix_pod_status
Fix pod status reporting for new Exited state
2018-10-08 11:09:28 -07:00
44b79917d5 Merge pull request #1600 from rhatdan/vendor
Vendor in latest github.com/containers/storage,image, buildah
2018-10-08 07:08:25 -07:00
3a76772bb1 Vendor in latest github.com/containers/storage,image, buildah
Grab latest fixes from subpackages

Including fixes for usernamespace chowning retaining file attributes
Better logging of error messages.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-07 08:29:23 -04:00
141a1327fb Merge pull request #1573 from baude/readdgolang
re-add BR for golang compiler to contrib/spec/podman.spec.in
2018-10-07 00:07:26 -07:00
d137b0908c Merge pull request #1598 from cevich/readd_verify
Lower Cirrus-CI CPU + Re-add verify step
2018-10-05 11:56:39 -07:00
20db511fdb Merge pull request #1597 from jtligon/master
added links to buildah.io and podman.io to README.md
2018-10-05 11:33:00 -07:00
260357cf8b Merge pull request #1594 from vrothberg/runlabel
runlabel: execute /proc/self/exe and avoid recursion
2018-10-05 11:19:48 -07:00
550270364b Merge pull request #1590 from baude/skipuserns
skip userns tests on non-fedora distributions for now
2018-10-05 10:35:29 -07:00
b8ad0ddccb Merge pull request #1595 from baude/remove_travis
Remove Travis
2018-10-05 10:11:38 -07:00
d4eca12cc1 runlabel: execute /proc/self/exe and avoid recursion
Execute /proc/self/exe instead of podman.  This makes the runlabel
command more portable as it works for binaries outside the path as
well as for local builds.

Also, avoid redundantly executing the runlabel command by setting
the PODMAN_RUNLABEL_NESTED environment variable to "1".  Podman
now checks for this variable before executing the runlabel command
and will throw an error in case the variable is set.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-05 17:28:18 +02:00
52f0547f64 Re-add source-verify in cirrus-ci
Don't waste GCE VM resources for 30-min of testing,
when verify would fail after 3-minutes.  This is
the simpelest mechanism to save cloud CPU-time
while GCE is under trial-status (can not set quotas).

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:23:21 -04:00
8887820e42 added links to buildah.io and podman.io to README.md
Signed-off-by: jtligon <jligon@redhat.com>
2018-10-05 11:23:00 -04:00
eef2cb01ca Lower CPU/Memory usage by cirrus VMs
These can increase again, once we have more control over setting quotas
in GCE.  At the moment it's limited because of trial-account status.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:05:58 -04:00
f5df6f4a61 Merge pull request #1593 from pkubatrh/dq_docker
docker: Double quote array expansions to avoid re-splitting elements
2018-10-05 07:17:47 -07:00
879a2a8c38 Merge pull request #1537 from mheon/libnetwork_resolv
Switch to using libnetwork's resolvconf package
2018-10-05 06:54:48 -07:00
cde1029151 skip userns tests on non-fedora distributions for now
Signed-off-by: baude <bbaude@redhat.com>
2018-10-05 08:48:41 -05:00
8771a03af1 Remove Travis
Now that we are testing ubuntu-bionic on a VM, we no longer need
travis.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-05 08:28:27 -05:00
a4a6f7dac2 Merge pull request #1518 from cevich/cirrus-ci
Add cirrus-ci: eventual replacement for papr and travis
2018-10-05 06:15:28 -07:00
8e54df5d91 docker: Double quote array expansions to avoid re-splitting elements
Signed-off-by: Petr Kubat <pkubat@redhat.com>
2018-10-05 11:00:27 +02:00
e9ab8583d0 Ensure resolv.conf has the right label and path
Adds a few missing things from writeStringToRundir() to the new
resolv.conf function, specifically relabelling and returning a
path compatible with rootless podman

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:38:09 -04:00
ae5af67d61 Remove no longer used libnetwork from vendor.conf
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:34:59 -04:00
2d332d01a7 Fix lint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:34:59 -04:00
52de75501c Drop libnetwork vendor and move the code into pkg/
The vendoring issues with libnetwork were significant (it was
dragging in massive amounts of code) and were just not worth
spending the time to work through. Highly unlikely we'll ever end
up needing to update this code, so move it directly into pkg/ so
we don't need to vendor libnetwork. Make a few small changes to
remove the need for the remainder of libnetwork.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:34:59 -04:00
bc5fac3a7c Update libnetwork vendor to current master to fix CI
Avoid a Sirupsen vs sirupsen class for logrus by updating to
master.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:34:59 -04:00
e4ded6ce7f Switch to using libnetwork's resolvconf package
Libnetwork provides a well-tested package for generating
resolv.conf from the host's that has some features our current
implementation does not. Swap to using their code and remove our
built-in implementation.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-04 17:34:59 -04:00
c53163b75a Add configuration for Cirrus-CI
Testing podman requires exercising on a full-blown VM.  The current
containerized-approach is complicated, and mostly a band-aid over
shortcomings in the other CI systems.  Namely, we want:

* To pre-build environments with dependencies to reduce the
  setup time needed for testing.
* The ability to verify the pre-built environments are working
  before utilizing them for further testing.
* A simple, single set of flexible automation instructions to
  reduce maintenance burden.
* Ease of environment reproduction across clouds or locally, for
  debugging failures.

This change leverages Cirrus-CI + Packer + collection of shell scripts
to realize all of the above.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-04 16:30:48 -04:00
094b8b7350 Merge pull request #1570 from giuseppe/fix-gvisor
podman: allow usage of gVisor as OCI runtime
2018-10-04 13:24:57 -07:00
06a959f74a Merge pull request #469 from adrianreber/master
Add support to checkpoint/restore containers
2018-10-04 12:34:49 -07:00
3c31e176c7 Merge pull request #1557 from rhatdan/systemd
Don't tmpcopyup on systemd cgroup
2018-10-04 09:54:51 -07:00
7213ac81b0 Merge pull request #1591 from baude/disablecontainerbuildservice
disable gce building of images
2018-10-04 12:24:04 -04:00
2c79b8e22e disable gce building of images
Signed-off-by: baude <bbaude@redhat.com>
2018-10-04 11:22:41 -05:00
c6a6c06435 re-add BR for golang compiler to contrib/spec/podman.spec.in
Signed-off-by: baude <bbaude@redhat.com>
2018-10-04 09:48:22 -05:00
dc987af0b0 completions: add checkpoint/restore completions
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
5246238e7e tests: add checkpoint/restore test
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
5bafafc7eb tutorial: add checkpoint/restore to tutorial
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
e2b639a32f docs: add checkpoint and restore man pages
This adds the podman-container-checkpoint and
podman-container-restore man pages.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
f7c8fd8a3d Add support to checkpoint/restore containers
runc uses CRIU to support checkpoint and restore of containers. This
brings an initial checkpoint/restore implementation to podman.

None of the additional runc flags are yet supported and container
migration optimization (pre-copy/post-copy) is also left for the future.

The current status is that it is possible to checkpoint and restore a
container. I am testing on RHEL-7.x and as the combination of RHEL-7 and
CRIU has seccomp troubles I have to create the container without
seccomp.

With the following steps I am able to checkpoint and restore a
container:

 # podman run --security-opt="seccomp=unconfined" -d registry.fedoraproject.org/f27/httpd
 # curl -I 10.22.0.78:8080
 HTTP/1.1 403 Forbidden # <-- this is actually a good answer
 # podman container checkpoint <container>
 # curl -I 10.22.0.78:8080
 curl: (7) Failed connect to 10.22.0.78:8080; No route to host
 # podman container restore <container>
 # curl -I 10.22.0.78:8080
 HTTP/1.1 403 Forbidden

I am using CRIU, runc and conmon from git. All required changes for
checkpoint/restore support in podman have been merged in the
corresponding projects.

To have the same IP address in the restored container as before
checkpointing, CNI is told which IP address to use.

If the saved network configuration cannot be found during restore, the
container is restored with a new IP address.

For CRIU to restore established TCP connections the IP address of the
network namespace used for restore needs to be the same. For TCP
connections in the listening state the IP address can change.

During restore only one network interface with one IP address is handled
correctly. Support to restore containers with more advanced network
configuration will be implemented later.

v2:
 * comment typo
 * print debug messages during cleanup of restore files
 * use createContainer() instead of createOCIContainer()
 * introduce helper CheckpointPath()
 * do not try to restore a container that is paused
 * use existing helper functions for cleanup
 * restructure code flow for better readability
 * do not try to restore if checkpoint/inventory.img is missing
 * git add checkpoint.go restore.go

v3:
 * move checkpoint/restore under 'podman container'

v4:
 * incorporated changes from latest reviews

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:39 +02:00
c5546729b8 oci: split the stdout and stderr pipes
read the OCI status from stdout, not the combined stdout+stderr
stream.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-03 21:39:35 +02:00
c21e85e5f4 oci: always set XDG_RUNTIME_DIR
Fix an issue when using gVisor that couldn't start the container since
the XDG_RUNTIME_DIR env variable used for the "create" and "start"
commands is different.  Set the environment variable for each command
so that the OCI runtime gets always the same value.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-03 21:39:34 +02:00
82c754be2c Fix pod status reporting for new Exited state
Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-10-03 15:34:34 -04:00
3750b35ae2 Merge pull request #1578 from baude/addubuntuci
Add Ubuntu-18.04 to CI testing
2018-10-03 11:35:13 -07:00
14473270d7 Add ability for ubuntu to be tested
unfortunately the papr CI system cannot test ubuntu as a VM; therefore,
this PR still keeps travis.  but it does include fixes that will be required
for running on modern versions of ubuntu.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-03 12:45:37 -05:00
2a3e3e7f25 Merge pull request #1584 from giuseppe/drop-superflous-relabel
selinux: drop superflous relabel
2018-10-03 09:36:13 -07:00
7abf46d15e selinux: drop superflous relabel
The same relabel is already done in writeStringToRundir so we don't
need to do it twice.  The version in writeStringToRundir takes into
account the correct file path when using user namespaces.

Closes: https://github.com/containers/libpod/pull/1584

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-10-03 16:54:28 +02:00