Commit graph

461 commits

Author SHA1 Message Date
Daniel J Walsh fe4c0c3780
Change exit code to 1 on podman rmi nosuch image
Make it easy for scripts to determine if an image removal
failure.   If only errors were no such image exit with 1
versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 12:49:27 -05:00
Daniel J Walsh e41279b902
Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal
fails versus the container did not exist.

If only errors were no such container exit with 1 versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 10:31:04 -05:00
OpenShift Merge Robot cc4adddeb7
Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
2019-02-24 03:13:25 +01:00
baude 4bf973a9f6 Enable more podman-remote pod commands
enable pod start, stop, and kill subcommands for the remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 17:00:24 -06:00
Giuseppe Scrivano 7e920e4865
tests, rootless: use relative path for export test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:22 +01:00
baude 71db80ddb1 podman-remote load image
enable the ability to load an image into remote storage
using the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-21 10:11:19 -06:00
baude 711ac93051 podman-remote save [image]
Add the ability to save an image from the remote-host to the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-20 12:58:05 -06:00
Peter Hunt 81804fc464 pod infra container is started before a container in a pod is run, started, or attached.
Prior, a pod would have to be started immediately when created, leading to confusion about what a pod state should be immediately after creation. The problem was podman run --pod ... would error out if the infra container wasn't started (as it is a dependency). Fix this by allowing for recursive start, where each of the container's dependencies are started prior to the new container. This is only applied to the case where a new container is attached to a pod.

Also rework container_api Start, StartAndAttach, and Init functions, as there was some duplicated code, which made addressing the problem easier to fix.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-02-15 16:39:24 -05:00
OpenShift Merge Robot 40c6d5c98c
Merge pull request #2188 from TomSweeneyRedHat/dev/tsweeney/pullall
Add --all-tags to pull command
2019-02-15 14:45:03 +01:00
OpenShift Merge Robot ae8cc41295
Merge pull request #2332 from baude/remotevolumeprune
volume prune
2019-02-14 22:52:03 +01:00
OpenShift Merge Robot 18bf883eeb
Merge pull request #2151 from QiWang19/cp
'podman cp' copy between host and container
2019-02-14 22:31:52 +01:00
baude 5be818e715 enable podman-remote volume prune
allow users to remotely prune volumes.

this is the last volume command for remote enablement.  as such,
the volume commands are being folded back into main because they
are supported for both local and remote clients.

also, enable all volume tests that do not use containers
as containers are not enabled for the remote client yet.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-14 10:55:05 -06:00
Qi Wang 36d962990a 'podman cp' copy between host and container
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-02-14 09:29:53 -05:00
Matthew Heon 9d4e7fe58b Try disabling --rm on notify_socket test
We have a consistent CI failure with the notify_socket test that
I can't reproduce locally. There's no reason for the test to have
--rm, so try removing it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-13 11:41:20 -05:00
Matthew Heon b1770ecc5b Remove a lot of '--rm' options from unit tests
Previously, 'podman create --rm' did not work - it wouldn't error
but it did nothing.

It is now fixed, but unfortunately the unit tests used it a lot,
in ways that just do not work when it actually functions.

Begin the process of fixing now-failing tests.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-12 14:18:23 -05:00
baude a1ab6788e4 Remove urfave/cli from libpod
This is the final cleanup to remove urfave/sli from libpod.  Removed
old, disabled tests that have not been run in over a year.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 17:48:34 -06:00
OpenShift Merge Robot 8440b0734c
Merge pull request #2306 from baude/podstatsgotemplate
Podman pod stats -- fix GO template output
2019-02-11 16:02:53 +01:00
baude 4994fecd46 Podman pod stats -- fix GO template output
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes #2258

Signed-off-by: baude <bbaude@redhat.com>
2019-02-10 11:27:09 -06:00
TomSweeneyRedHat 1543a01be8 Add --all-tags to pull command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add --all-tags for the `podman pull` command so all tags
of an image will be pulled, not just ':latest'.  Emulates
the change in Buildah https://github.com/containers/buildah/pull/1263

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-09 20:00:19 -05:00
TomSweeneyRedHat 931af00bb0 Add common_test.go to single test instructions
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add e2e/test/common_test.go to the single integration test
instructions.  Without it the documented process fails.
2019-02-09 11:28:13 -05:00
baude 25a3923b61 Migrate to cobra CLI
We intend to migrate to the cobra cli from urfave/cli because the
project is more well maintained.  There are also some technical reasons
as well which extend into our remote client work.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-08 10:26:43 -06:00
Chris Evich 038364c6e3
Fix down/missing registry.access.redhat.com
This registry responds differently depending on the the platform
accessing it.  It also occasionally goes down or returns 404s.  Improve
the reliability of the e2e tests by using the registry/image used
for gating pull-requests.

This way, if there's a registry/networking problem, the gating test
will fail and prevent anything else from running.  This is a better
failure to have early, rather than wait and need to re-run all the
e2e tests again later.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-07 09:50:45 -05:00
OpenShift Merge Robot c7350721bf
Merge pull request #2252 from rhatdan/system
Add podman system prune and info commands
2019-02-06 23:03:21 +01:00
OpenShift Merge Robot ca6ab2029c
Merge pull request #2275 from edsantiago/fix_blocking_fifo
e2e tests: sigproxy: fix rare hang condition
2019-02-06 14:00:49 +01:00
Valentin Rothberg 9ac0ebb079 Cirrus: add vendor_check_task
* Make sure that all vendored dependencies are in sync with the code and
  the vendor.conf by running `make vendor` with a follow-up status check
  of the git tree.

* Vendor ginkgo and gomega to include the test dependencies.

Signed-off-by: Chris Evic <cevich@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-06 11:14:06 +01:00
OpenShift Merge Robot 314e1a9c5a
Merge pull request #2267 from giuseppe/allow-override-oci-runtime
tests: allow to override the OCI runtime
2019-02-06 07:49:07 +01:00
Ed Santiago 7ee8fe86c1 e2e tests: sigproxy: fix rare hang condition
The sig-proxy test creates a FIFO, runs podman with actions
that write to it, then tries reading from the FIFO.

Opening a FIFO for read or write blocks until the other end is
opened for the corresponding write/read. If our podman process
fails for any reason, the test's FIFO open will hang forever.

Solution: open with O_NONBLOCK.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-02-05 14:10:49 -07:00
Daniel J Walsh 74d984e056
Add podman system prune and info commands
We are missing the equivalence of the docker system commands

This patch set adds `podman system prune`
and `podman system info`

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-05 10:41:55 -08:00
baude 64c8fb7c24 podman-remote import|export
addition of import and export for the podman-remote client.  This includes
the ability to send and receive files between the remote-client and the
"podman" host using an upgraded varlink connection.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-05 10:05:41 -06:00
Daniel J Walsh 3554bfce98
Merge pull request #2196 from baude/toolbox
Changes to container runlabel for toolbox project
2019-02-05 10:34:40 -05:00
Giuseppe Scrivano 80b75d299e
tests: allow to override the OCI runtime
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-05 15:35:50 +01:00
Chris Evich b7d052ee5e
Increase e2e info/json test exit timeout
For whatever reason, this specific test frequently fails on Ubuntu with
an error similar to:

```
  Timed out after 1.000s.
  Expected process to exit.  It did not.

  /var/tmp/go/src/github.com/containers/libpod/test/e2e/info_test.go:38
```

Ths changes alters the test behavior to use the `defaultWaitTimeout`
value (so 90 vs former 60 seconds) only for this test.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-04 11:17:41 -05:00
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 735f0de633 Changes to container runlabel for toolbox project
The toolbox project would benefit from a few changes to more closely
resembe the original atomic cli project.  Changes made are:

* only pull image for container runlabel if the label exists in the image
* if a container image does not have the desired label, exit with non-zero

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:44:58 -06: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