Commit graph

4210 commits

Author SHA1 Message Date
Matthew Heon d40b450afd Default 'pause' to false for 'podman cp'
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-07 15:17:40 -04:00
Matthew Heon d81fc2e192 Update c/storage to 9b10041d7b2ef767ce9c42b5862b6c51eeb82214
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-07 15:11:38 -04:00
OpenShift Merge Robot bcc89e9d08
Merge pull request #3271 from giuseppe/rootless-skip-ns-resolution-on-old-kernels
rootless: skip NS_GET_PARENT on old kernels
2019-06-07 15:39:28 +02:00
OpenShift Merge Robot 346128792c
Merge pull request #2272 from adrianreber/migration
Add support to migrate containers
2019-06-07 14:33:20 +02:00
OpenShift Merge Robot ba36a5f446
Merge pull request #3268 from cevich/meta_track_repo
Cirrus: Track VM Image calling GCE project
2019-06-06 22:58:22 +02:00
OpenShift Merge Robot c5c73794b4
Merge pull request #3272 from mheon/skip_hc_flake
Disable a very badly flaking healthcheck test
2019-06-06 17:41:20 +02:00
Matthew Heon b2a8b725af Disable a very badly flaking healthcheck test
We'll reenable once the flake is fixed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-06 10:55:57 -04:00
Giuseppe Scrivano 4dca13e704
rootless: skip NS_GET_PARENT on old kernels
on old kernels the ioctl NS_GET_PARENT is not available.

Handle the error code and immediately return the same fd.  It should
be fine now that we use the namespace resolution using the conmon pid,
so the namespace parent resolution is just a safety measure.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-06 15:32:45 +02:00
OpenShift Merge Robot 6d285b879c
Merge pull request #3256 from llchan/rootless-init-path
Inherit rootless init_path from system libpod.conf
2019-06-05 23:13:07 +02:00
Chris Evich 32fb83e3ab
Cirrus: Track VM Image calling GCE project
With multiple `containers` projects updating VM Image metadata,
it would be very difficult to discover which Cirrus-CI setup
was responsible.  Add the GCE project name to the list
of metadata labels to update when this container runs.  This
will give more context as to which images are currently in use.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-05 15:53:00 -04:00
OpenShift Merge Robot b1c9cb712d
Merge pull request #3265 from baude/noremotec
remove -c for podman remote global options
2019-06-05 16:03:27 +02:00
OpenShift Merge Robot 6832581484
Merge pull request #3259 from cevich/cull_f28
Cirrus: Disable testing on F28 (EOL)
2019-06-05 06:21:58 +02:00
baude 13a961a2cf remove -c for podman remote global options
it conflicts with commit

Signed-off-by: baude <bbaude@redhat.com>
2019-06-04 18:06:24 -05:00
OpenShift Merge Robot 3fb9669a63
Merge pull request #3231 from baude/remoteclientconf
podman-remote.conf enablement
2019-06-04 20:02:01 +02:00
OpenShift Merge Robot 2a4e5aac19
Merge pull request #3260 from TomSweeneyRedHat/dev/tsweeney/buildah1.8.3
Vendor Buildah v1.8.3
2019-06-04 19:52:00 +02:00
TomSweeneyRedHat 14ec550ec3 Vendor Buildah v1.8.3
Vendor in Buildah v1.8.3

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-04 13:05:19 -04:00
Chris Evich e601c8ea38
Cirrus: Disable testing on F28 (EOL)
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-04 10:44:37 -04:00
OpenShift Merge Robot 7b0d6fcf0e
Merge pull request #3225 from haraldh/virtwriter
pkg/varlinkapi/virtwriter/virtwriter.go: simplify func Reader
2019-06-04 15:50:48 +02:00
OpenShift Merge Robot 67c50ab63d
Merge pull request #3249 from baude/testtiming
fix timing issues with some tests
2019-06-04 14:51:32 +02:00
OpenShift Merge Robot db1e422461
Merge pull request #3251 from giuseppe/join-block-signals
rootless: block signals on re-exec
2019-06-04 14:39:39 +02:00
Adrian Reber bef83c42ea
migration: add possibility to restore a container with a new name
The option to restore a container from an external checkpoint archive
(podman container restore -i /tmp/checkpoint.tar.gz) restores a
container with the same name and same ID as id had before checkpointing.

This commit adds the option '--name,-n' to 'podman container restore'.
With this option the restored container gets the name specified after
'--name,-n' and a new ID. This way it is possible to restore one
container multiple times.

If a container is restored with a new name Podman will not try to
request the same IP address for the container as it had during
checkpointing. This implicitly assumes that if a container is restored
from a checkpoint archive with a different name, that it will be
restored multiple times and restoring a container multiple times with
the same IP address will fail as each IP address can only be used once.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-04 14:02:51 +02:00
OpenShift Merge Robot 88eefaecb6
Merge pull request #3156 from TomSweeneyRedHat/dev/tsweeney/podmanimage
Create Dockerfiles for podmanimage
2019-06-04 07:49:47 +02:00
Lawrence Chan 8fe22d48fb Inherit rootless init_path from system libpod.conf
Signed-off-by: Lawrence Chan <element103@gmail.com>
2019-06-03 18:44:36 -05:00
Adrian Reber 0e072f9a97
Also download container images during restore
If restoring a container from a checkpoint it was necessary that the
image the container is based was already available (podman pull).

This commit adds the image download to podman container restore if it
does not exist.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:13 +02:00
Adrian Reber a4d33330d6
Include container migration into tutorial
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:13 +02:00
Adrian Reber 42e903decb
Add man-pages for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:13 +02:00
Adrian Reber 7b1ab8a0f4
Added bash completion for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:13 +02:00
Adrian Reber 2aa3261744
Add test case for container migration
The difference between container checkpoint/restore and container
migration is that for migration the container which was checkpointed
must not exist during restore. To simulate migration the container
is remove ('podman rm -fa') before being restored. The migration test
does following steps:

 * podman run
 * podman container checkpoint -l -e /tmp/checkpoint.tar.gz
 * podman rm -fa
 * podman container restore -i /tmp/checkpoint.tar.gz

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:12 +02:00
Adrian Reber 0028578b43
Added support to migrate containers
This commit adds an option to the checkpoint command to export a
checkpoint into a tar.gz file as well as importing a checkpoint tar.gz
file during restore. With all checkpoint artifacts in one file it is
possible to easily transfer a checkpoint and thus enabling container
migration in Podman. With the following steps it is possible to migrate
a running container from one system (source) to another (destination).

 Source system:
  * podman container checkpoint -l -e /tmp/checkpoint.tar.gz
  * scp /tmp/checkpoint.tar.gz destination:/tmp

 Destination system:
  * podman pull 'container-image-as-on-source-system'
  * podman container restore -i /tmp/checkpoint.tar.gz

The exported tar.gz file contains the checkpoint image as created by
CRIU and a few additional JSON files describing the state of the
checkpointed container.

Now the container is running on the destination system with the same
state just as during checkpointing. If the container is kept running
on the source system with the checkpoint flag '-R', the result will be
that the same container is running on two different hosts.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:12 +02:00
Adrian Reber a05cfd24bb
Added helper functions for container migration
This adds a couple of function in structure members needed in the next
commit to make container migration actually work. This just splits of
the function which are not modifying existing code.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:12 +02:00
Adrian Reber e0c8c14f5b
Fix restore options help text and comments
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:12 +02:00
OpenShift Merge Robot 0ede794da9
Merge pull request #3217 from edsantiago/cirrus_cleanup
cirrus: minor cleanup and refactoring
2019-06-03 21:51:09 +02:00
OpenShift Merge Robot e41162076a
Merge pull request #3081 from baude/remotecommit
podman remote-client commit
2019-06-03 20:58:13 +02:00
baude c727cd1dc6 fix timing issues with some tests
some integration tests are inherently problematic due to timing issues.
one such case is running a valid health check on container that runs
nginx.  while the container may be running, nginx may not have finished
executing itself and therefore the healthcheck fails.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-03 11:06:46 -05:00
Harald Hoyer 939f8150da
pkg/varlinkapi/virtwriter/virtwriter.go: simplify func Reader
Signed-off-by: Harald Hoyer <harald@redhat.com>
2019-06-03 16:31:45 +02:00
OpenShift Merge Robot 7c465d4d97
Merge pull request #3250 from marcusmueller/podman_man_page_mixup
Manpage: fix podman-varlink and -version mixup
2019-06-03 14:51:20 +02:00
Giuseppe Scrivano 6b0e1a3091
rootless: block signals on re-exec
we are allowed to use only signal safe functions between a fork of a
multithreaded application and the next execve.  Since setenv(3) is not
signal safe, block signals.  We are already doing it for creating a
new namespace.

This is mostly a cleanup since reexec_in_user_namespace_wait is used
only only to join existing namespaces when we have not a pause.pid
file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-03 14:25:10 +02:00
Ed Santiago a47bb4d29f cirrus: minor cleanup and refactoring
...with the goal of (very soon) reusing this code, in #2947,
to run system tests in CI. This is the cleanest way I can
think of to do so without duplication or a large maintenance
burden.

Changes are:
 - replace references to 'ginkgo' with 'integration'. That
   target is already in Makefile, and is not only more
   readable, it's also more abstract. There is no reason
   for this level of code to know about ginkgo.
 - allow rootless_test.sh to accept an argument,
   that being the name of the test suite to run
   (default: integration). #2947 will enable 'system'.
 - allow integration_test.sh to serve multiple purposes,
   by checking its filename. #2947 will add a symlink,
   system_test.sh, which will then cascade down to
   invoke system tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-03 05:34:31 -06:00
Marcus Müller 39e4f53e6a manpage: podman-tool table: un-confuse version and varlink
Signed-off-by: Marcus Müller <marcus@hostalia.de>
2019-06-02 20:31:58 +02:00
TomSweeneyRedHat 54e1a3a103 Create Dockerfiles for podmanimage
The Dockerfiles necessary to create the stable, testing and upstream container images
on quay.io/user/podman.  Once this is commited, I will set up those images
such that they will be built with every git commit.

stable - Latest Fedora release image
testing - Latest release on bohdi Fedora testing
upstream - Latest version in upstream podman

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-01 14:22:38 -04:00
OpenShift Merge Robot 176a41c355
Merge pull request #3244 from giuseppe/cleanups-rootless-join
rootless: some cleanups for rootless_linux.c
2019-06-01 19:28:44 +02:00
OpenShift Merge Robot 2068919e9b
Merge pull request #3236 from baude/testsplitrootless
split rootless local and remote testing
2019-06-01 03:37:15 +02:00
Giuseppe Scrivano 27e47cb6d0
rootless: use TEMP_FAILURE_RETRY macro
avoid checking for EINTR for every syscall that could block.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-31 22:05:25 +02:00
Giuseppe Scrivano b88dc3a41e
rootless: fix return type
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-31 22:05:25 +02:00
Giuseppe Scrivano 10983c363e
rootless: make sure the buffer is NUL terminated
after we read from the pause PID file, NUL terminate the buffer to
avoid reading garbage from the stack.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-31 22:05:24 +02:00
baude d1c44ea856 split rootless local and remote testing
Signed-off-by: baude <bbaude@redhat.com>
2019-05-31 14:54:06 -05:00
OpenShift Merge Robot 503ed5fe03
Merge pull request #3246 from mheon/run_the_tests
Small fix to readme to force tests to run
2019-05-31 21:30:18 +02:00
Matthew Heon 25aac813bd Fix podman cp test by reordering operations
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-31 12:58:44 -04:00
Matthew Heon a01349373a Small fix to readme to force tests to run
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-31 11:59:50 -04:00
OpenShift Merge Robot 38c4a1322d
Merge pull request #3227 from giuseppe/fix-warning-rootless
rootless: skip check fo /etc/containers/registries.conf
2019-05-31 15:55:48 +02:00