4428 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
2068919e9b Merge pull request #3236 from baude/testsplitrootless
split rootless local and remote testing
2019-06-01 03:37:15 +02:00
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
b88dc3a41e rootless: fix return type
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-31 22:05:25 +02:00
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
d1c44ea856 split rootless local and remote testing
Signed-off-by: baude <bbaude@redhat.com>
2019-05-31 14:54:06 -05:00
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
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
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
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
558ce8d141 Merge pull request #3224 from haraldh/varlink_upgrade
Fix for varlink upgrade connections
2019-05-31 04:53:29 +02:00
88b7a221a2 Merge pull request #3238 from mheon/no_tmpcopyup_dev
Do not set tmpcopyup on /dev
2019-05-31 04:15:31 +02:00
b5b461ac28 Merge pull request #3147 from baude/testimagecache
use imagecaches for local tests
2019-05-30 21:56:26 +02:00
2dcfd3df0b Merge pull request #3214 from mheon/resolve_symlinks_in_cp
Resolve symlinks in cp
2019-05-30 21:17:28 +02:00
c520e34ea7 Do not set tmpcopyup on /dev
Fixes #3229

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-30 14:02:14 -04:00
7358a4c590 Merge pull request #3235 from baude/testnoremoteinpodman
do not run remote tests inside container
2019-05-30 19:48:08 +02:00
5369e45470 docs: Add CI section and links
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-30 12:55:51 -04:00
ce6e3b80d1 do not run remote tests inside container
when running the podman integration tests inside a container, we should
not be running the remote tests.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 10:30:14 -05:00
2df462024b podman remote-client commit
add the ability to commit a container to an image using the remote
client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 10:14:23 -05:00
5a07311d9e Fix podman cp tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-30 10:53:52 -04:00
dc7ae31171 podman-remote.conf enablement
add the ability for the podman remote client to use a configuration file
which describes its connections. users can now define a connection the
configuration and then call it by name like:

podman-remote -c connection1

and the destination and user will be derived from the configuration
file.  if no -c is provided, we look for a connection in the
configuration file designated as 'default'.  If the configuration file
has only one connection, it will be deemed the 'default'.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 09:41:17 -05:00
57d4093979 Error when trying to copy into a running rootless ctr
We can't pause them, so if that's requested, throw an error.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-30 09:20:04 -04:00
ad806f78e3 rootless: skip check fo /etc/containers/registries.conf
the warning can be confusing when used in rootless mode as the
unprivileged user has no way for setting it up.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-30 09:01:55 +02:00
48e35f7da7 We can't pause rootless containers during cp
Rootless containers can't be paused (no CGroups, so no freezer).

We could try and emulate this with a SIGSTOP to all PIDs in the
container, but that's inherently racy, so let's avoid it for now.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
f456825fe8 Fix bug in e2e tests for podman cp
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
79990b7364 Tolerate non-running containers in paused cp
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
431e633b48 Add test to ensure symlinks are resolved in ctr scope
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
32fc6b906c Add --pause to podman cp manpage and bash completions
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
49dc18552a Pause containers while copying into them
Should fix CVE-2018-15664 for Podman.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:50 -04:00
7b7d54242c Use securejoin to merge paths in podman cp
Securejoin ensures that paths are resolved in the container, not
on the host.

Fixes #3211

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:50 -04:00
f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
c871653e19 Merge pull request #3230 from ashley-cui/dnsdoc
add dns flags to docs
2019-05-29 21:39:32 +02:00
8422503f43 Merge pull request #3221 from josegonzalez/master
Add missing 'container cp' alias and document missing 'container update' command
2019-05-29 20:46:09 +02:00
5d2bd97d5b add dns flags to docs
Added same dns flags from buildah documentation to podman

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-05-29 13:54:38 -04:00
8a8db34131 Merge pull request #3228 from rhatdan/man
Podman logs man page shouldn't include timestamps
2019-05-29 19:44:06 +02:00
635c161f38 add missing container cp command
'docker cp' is an alias for 'docker container cp', and podman should have the equivalent alias.

Signed-off-by: Jose Diaz-Gonzalez <email@josediazgonzalez.com>
2019-05-29 12:44:25 -04:00
e30a428b65 Podman logs man page shouldn't include timestamps
Change man page to reflect default output. Commands
with timestamps should include `-t` option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-29 12:03:52 -04:00
294448c2ea Merge pull request #2709 from haircommander/journald
Add libpod journald logging
2019-05-29 17:51:27 +02:00
c9357f07ce Merge pull request #3223 from cevich/multi-zone-hack
hack: support setting local region/zone
2019-05-29 17:39:29 +02:00
90ae7206f3 Fix the varlink upgraded calls
Although an upgraded call is requested, the server has to send at least
one reply (can be an error) and the client has to check the reply,
before assuming an upgraded connection.

Signed-off-by: Harald Hoyer <harald@redhat.com>
2019-05-29 17:16:18 +02:00
aed91ce3bf Merge pull request #3188 from giuseppe/fix-join-existing-containers
rootless: new function to join existing conmon processes
2019-05-29 17:12:40 +02:00
57ada47ce5 hack: support setting local region/zone
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-29 09:30:50 -04:00
cd5bc9c4c5 document missing container update command
Also reorder the missing update command to better match the container update command (it is in the same management namespace)

Signed-off-by: Jose Diaz-Gonzalez <email@josediazgonzalez.com>
2019-05-29 03:55:22 -04:00