Commit graph

428 commits

Author SHA1 Message Date
OpenShift Merge Robot e133834f6d
Merge pull request #2232 from baude/pstable
Fix regression in ps with custom format
2019-02-01 03:23:29 +01:00
baude ca53122338 Fix regression in ps with custom format
Using the table keyword in go templating had regressed and was
no longer working.

Fixes: 2221

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:32:28 -06:00
baude 656033ca96 podman image prune -- implement all flag
we now, by default, only prune dangling images.  if --all is passed, we
prune dangling images AND images that do not have an associated containers.

also went ahead and enabled the podman-remote image prune side of things.

Fixes: #2192

Signed-off-by: baude <bbaude@redhat.com>
2019-01-29 16:51:48 -06:00
baude 5c8e7ed0de enable podman-remote version
initial enablement of podman-remote version.  includes add a APIVersion const
that will allow us to check compatibility between host/client when connections
are made.

also added client related information to podman info.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-21 15:23:30 -06:00
OpenShift Merge Robot ef2f6f9f3e
Merge pull request #2184 from baude/remotemaskcommands
Mask unimplemeted commands for remote client
2019-01-20 13:35:18 +01:00
baude 6f6cf86d8f Mask unimplemeted commands for remote client
Masking main level, image, and container commands that are not yet
implemented for the remote client. As each command is completed, be
sure to unmask it.

Also, masking podman command line switches that are not applicable
to the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-19 13:12:32 -06:00
baude eadaa5fb42 podman-remote inspect
base enablement of the inspect command.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-18 15:43:11 -06:00
Giuseppe Scrivano 8156f8c694
rootless: fix --pid=host without --privileged
When using --pid=host don't try to cover /proc paths, as they are
coming from the /proc bind mounted from the host.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-18 17:12:28 +01:00
baude 9a23e285d3 add support for podman-remote history
this adds support to get the history for an image and its
layers using podman-remote.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 10:29:24 -06:00
baude f9f72823ad podman remote integrations tests
add exists and rmi tests back in ...

Signed-off-by: baude <bbaude@redhat.com>
2019-01-15 08:19:26 -06:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
OpenShift Merge Robot f31fdb2219
Merge pull request #2008 from harche/multi-arch
Use multi-arch images in test cases
2019-01-13 06:14:22 -08:00
Harshal Patil 13bcf72ae4 Use multi-arch images in test case scripts
Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
2019-01-11 09:28:08 +05:30
OpenShift Merge Robot 7d2632872a
Merge pull request #2120 from rhatdan/volume
Fix handling of nil volumes
2019-01-10 11:58:08 -08:00
Jhon Honce 45fb935fe4 Move python code from contrib to it's own repo python-podman
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-01-10 11:27:50 -07:00
Daniel J Walsh f2ff550967
Fix handling of nil volumes
Currently if a user passes in a -v with
-v $bogus:/foobar

We crash.  This will throw a proper error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-10 10:27:39 -05:00
Adrian Reber ab8e03b3e7
Added checkpoint/restore test for same IP
Restoring a container from a checkpoint should give the container the
same IP as before checkpointing. This adds a test to make sure the IP
stays the same.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-01-09 07:34:57 +01:00
Adrian Reber e11cbd7129
Enable checkpoint test with established TCP connections
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-01-09 07:34:57 +01:00
OpenShift Merge Robot c9d63fe89d
Merge pull request #2097 from debarshiray/wip/debarshiray/podman-exec-workdir
Add a --workdir option to 'podman exec'
2019-01-08 10:21:14 -08:00
Debarshi Ray 867669374c Add a --workdir option to 'podman exec'
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 17:42:37 +01:00
Debarshi Ray f71264e612 Test that 'podman start --sig-proxy' does not work without --attach
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 16:34:09 +01:00
Valentin Rothberg 75578aad61 add container-init support
Add support for executing an init binary as PID 1 in a container to
forward signals and reap processes.  When the `--init` flag is set for
podman-create or podman-run, the init binary is bind-mounted to
`/dev/init` in the container and "/dev/init --" is prepended to the
container's command.

The default base path of the container-init binary is `/usr/libexec/podman`
while the default binary is catatonit [1].  This default can be changed
permanently via the `init_path` field in the `libpod.conf` configuration
file (which is recommended for packaging) or temporarily via the
`--init-path` flag of podman-create and podman-run.

[1] https://github.com/openSUSE/catatonit

Fixes: #1670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-04 11:42:03 +01:00
Adrian Reber 2b41cd5fd3
Re-enable checkpoint/restore CI tests on Fedora
Now that the correct distribution CRIU packages are installed the
checkpoint/restore tests should no longer fail. This re-enables the
disabled tests on Fedora.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-12-28 14:05:27 +01:00
Daniel J Walsh df99522c67
Fixes to handle /dev/shm correctly.
We had two problems with /dev/shm, first, you mount the
container read/only then /dev/shm was mounted read/only.
This is a bug a tmpfs directory should be read/write within
a read-only container.

The second problem is we were ignoring users mounted /dev/shm
from the host.

If user specified

podman run -d -v /dev/shm:/dev/shm ...

We were dropping this mount and still using the internal mount.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-24 09:03:53 -05:00
baude df923b2613 rootless tests using stop is more reliable
when testing rootless containers, it is more reliable to stop
a container with a zero timeout than kill a container.  We made
this change in non-rootless tests as well.  When IO or CPU are
taxed, it avoids a situation where the kill signal is sent but the
container has not been able to update its status when a subsequent
action occurs.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-23 11:47:46 -06:00
Daniel J Walsh c657dc4fdb
Switch all referencs to image.ContainerConfig to image.Config
This will more closely match what Docker is doing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-21 15:59:34 -05:00
Daniel J Walsh 4d13262405
Change all 'can not' to 'cannot' for proper usage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-21 10:27:54 -05:00
Giuseppe Scrivano 0ed55f75ab
test: add test for rootless export
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-21 11:26:03 +01:00
baude 1f3726f2cf skip test for blkio.weight when kernel does not support it
Signed-off-by: baude <bbaude@redhat.com>
2018-12-20 09:00:52 -06:00
OpenShift Merge Robot 6b059a5882
Merge pull request #2030 from baude/111
prepare for move to validate on 1.11 only
2018-12-19 15:15:09 -08:00
baude f080ba846d prepare for move to validate on 1.11 only
Signed-off-by: baude <bbaude@redhat.com>
2018-12-19 13:43:09 -06:00
Qi Wang 31edf47285 Support podman image trust command
Display the trust policy of the host system. The trust policy is stored in the /etc/containers/policy.json file and defines a scope of registries or repositories.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-12-19 13:36:11 -05:00
TomSweeneyRedHat 92c7f4eb9e Show image only once with images -q
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-12-17 11:08:54 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00
Chris Evich cb89409a71
Skip checkpoint tests on Fedora <30
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:16:00 -05:00
OpenShift Merge Robot bff29f5475
Merge pull request #1988 from mheon/use_dependency_resolv
Containers sharing a netns should share resolv/hosts
2018-12-13 08:05:41 -08:00
OpenShift Merge Robot e3a1a7efca
Merge pull request #1989 from baude/deletecontainerfailstart
failed containers with --rm should remove themselves
2018-12-13 07:33:12 -08:00
Emilien Macchi 40dd9de9a5 e2e: add tests for systemd
Add functional tests to start a container from systemd.
This patch will:

- create a systemd unit file to start redis container
- create the container with `podman create`
- enable the service
- start the container with systemd
- check that the service is actually running

Signed-off-by: Emilien Macchi <emilien@redhat.com>
2018-12-12 17:04:59 -05:00
Matthew Heon c93ad3762c Add test for sharing resolv and hosts with netns
Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-12-12 15:41:13 -05:00
baude 9786542620 failed containers with --rm should remove themselves
when starting or running a container that has --rm, if the starting
container fails (like due to an invalid command), the container should
get removed.

Resolves: #1985

Signed-off-by: baude <bbaude@redhat.com>
2018-12-12 10:55:53 -06:00
OpenShift Merge Robot 8645df84db
Merge pull request #1975 from giuseppe/fix-rootless-restart
rootless: fix restart when using fuse-overlayfs
2018-12-11 08:04:30 -08:00
Giuseppe Scrivano 9a7416c342
rootless: fix restart when using fuse-overlayfs
With rootless containers we cannot really restart an existing container
as we would need to join the mount namespace as well to be able to reuse
the storage, so ensure the container is stopped first.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-11 10:24:06 +01:00
Miloslav Trmač 22b1f7f8cb Update for API change
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2018-12-08 15:36:07 +01:00
OpenShift Merge Robot 49d9a8f951
Merge pull request #1928 from baude/podtokube
generate kube
2018-12-07 07:46:52 -08:00
OpenShift Merge Robot 5c6e02b55b
Merge pull request #1904 from umohnani8/volume
Add "podman volume" command
2018-12-06 08:59:13 -08:00
Urvashi Mohnani 375831e976 Tests for podman volume commands
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2018-12-06 10:17:23 +00:00
baude e037427035 Add ability to prune containers and images
Allow user to prune unused/unnamed images, the layer images from building,
via podman rmi --prune.

Allow user to prune stopped/exiuted containers via podman rm --prune.

This should resolve #1910

Signed-off-by: baude <bbaude@redhat.com>
2018-12-05 19:57:54 -06:00
baude 0cd83466db test for rmi with children
Signed-off-by: baude <bbaude@redhat.com>
2018-12-04 14:22:11 -06:00
OpenShift Merge Robot b81f640bb5
Merge pull request #1920 from wking/explicit-hooks-dirs
libpod/container_internal: Deprecate implicit hook directories
2018-12-04 12:19:48 -08:00
baude c8436b4912 generate kube
add the ability to generate kubernetes pod and service yaml representations
of libpod containers and pods.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-04 08:03:49 -06:00