Commit graph

1126 commits

Author SHA1 Message Date
Giuseppe Scrivano 88f1994ab9
podman: assume user namespace if there are mappings
if some mappings are specified, assume there is a private user
namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-24 15:55:38 +02:00
Giuseppe Scrivano 64d8b4eebb
podman: implement userns=keep-id
add missing implementation for userns=keep-id and enable the user
namespaces tests.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-24 15:03:50 +02:00
OpenShift Merge Robot 397dcc358a
Merge pull request #5843 from QiWang19/manifest_create
manifest create,add,inspect
2020-04-23 17:45:38 +02:00
Qi Wang 17783dda68 manifest create,add,inspect
Implememts manifest subcommands create, add, inspect.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-22 20:05:21 -04:00
Jhon Honce be5605ac4f V2 Restore rmi tests
* Introduced define.ErrImageInUse to assist in determining the exit code
  without resorting string searches.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-22 15:34:33 -07:00
OpenShift Merge Robot 142757bd72
Merge pull request #5947 from rhatdan/v
Turn on version.go except for -v check
2020-04-22 23:10:46 +02:00
OpenShift Merge Robot 94dc39a41b
Merge pull request #5945 from rhatdan/pull
Fix podman push and podman pull to check for authfile
2020-04-22 21:26:42 +02:00
OpenShift Merge Robot cac05c8588
Merge pull request #5944 from rhatdan/untag
Fix integration tests for untag
2020-04-22 21:23:42 +02:00
Daniel J Walsh 34ee183ae6
Turn on version.go except for -v check
Currently podman -v does not work but the other version checks all pass.

enabling tests to that we can get more tests running in CI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 15:18:42 -04:00
OpenShift Merge Robot 9a910efcf6
Merge pull request #5202 from QiWang19/path-config-storageconf
test rootless_storage_path from storage.conf
2020-04-22 20:57:14 +02:00
Daniel J Walsh ae1731e03f
Fix podman push and podman pull to check for authfile
This fixes pull_test.go push_test.go is still broken because of
lack of registry support.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 14:30:40 -04:00
OpenShift Merge Robot 366fc0520b
Merge pull request #5941 from jwhonce/jira/792
V2 Restore exists E2E tests
2020-04-22 20:22:44 +02:00
Brent Baude 6fdcc09a20
Fix integration tests for untag
Signed-off-by: Brent Baude <bbaude@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 14:13:07 -04:00
Qi Wang d422799595 test rootless_storage_path from strorage.conf
test rootless_storage_path from strorage.conf. If user configured rootless_storage_path in storage.conf, podman info should suggest the change.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-22 14:02:32 -04:00
OpenShift Merge Robot 703fd50553
Merge pull request #5940 from rhatdan/rm
Fix podman rm to have correct exit codes
2020-04-22 19:33:00 +02:00
Jhon Honce d0caf90940 V2 Restore exists E2E tests
* Fix setting exit code in */exists.go

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-22 09:53:05 -07:00
Daniel J Walsh 1be8ded964
Fix podman rm to have correct exit codes
If you attempt to remove a running container is it supposed to exit with
2
If you attempt to remove a non existing container is is supposed to exit with
1

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 11:53:00 -04:00
Qi Wang 6e33c328b9 Fix v2 test podman info
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-22 11:46:44 -04:00
Daniel J Walsh 94b62dac74
Fix handling of --cidfile on create/run
Currently create and run are ignoring the cidfile flag.

Enable stop_test.go to make sure this works.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 09:52:33 -04:00
Daniel J Walsh 4494ec6f04
vendor in containers/common v0.9.4
This will change the default of UserNS to false

Also turn on tests for create_staticip_test.go
run_device_test.go, run_selinux_test.go

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-22 06:57:06 -04:00
Brent Baude 5c968b7693 Force integration tests to pass
Failing tests are now skipped and we should work from this.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 13:48:50 -05:00
Sujil02 37f3b191d5 Add pod prune for api v2.
Add the ability to prune pods for api v2,
Includes the addition of force flag, for client side prompt.
Update test suite to support this use case.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-04-17 17:30:58 -04:00
OpenShift Merge Robot bd8a0b08cd
Merge pull request #5548 from kunalkushwaha/image-prune
image prune skips images with child images.
2020-04-17 15:19:45 -04:00
Brent Baude 44a8cf8676 Fixes for system tests
Various fixes to protect against regressions in system tests

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-17 13:22:06 -05:00
Brent Baude ba430bfe5e podman v2 remove bloat v2
rid ourseleves of libpod references in v2 client

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-16 12:04:46 -05:00
OpenShift Merge Robot ef297d466e
Merge pull request #5767 from edsantiago/logformat_add_anchors_and_apiv2
logformat: handle apiv2 results, add anchor links
2020-04-15 10:50:15 -07:00
Kunal Kushwaha d832136349 test case added for image prune cache image
test case added for skipping cache images and
fixed condition in test case for prune dangling image

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-04-15 02:49:47 +00:00
Brent Baude 830f3a4462 v2podman ps revert structure changes
reverting name changes to the listcontainer structure because it negatively impacted the direct consumption of the restful API.  instead we now use a local structure in the CLI to modify the output as needed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-14 09:40:43 -05:00
Brent Baude 90ead05903 Fixes for load and other system tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-13 13:08:04 -05:00
OpenShift Merge Robot 3a4bd39516
Merge pull request #5771 from giuseppe/fix-exec-preserve-fd
test: fix exec preserve-fds test
2020-04-09 16:40:32 +02:00
OpenShift Merge Robot 1662310e51
Merge pull request #5754 from baude/v2psformat
v2podman ps alter formats
2020-04-09 15:56:26 +02:00
Giuseppe Scrivano 4503650f41
test: enable preserve fds test for crun
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 10:17:43 +02:00
Giuseppe Scrivano d3cfa7a23c
test: fix exec preserve-fds test
it specifies a fd is passed down but we are not really doing it, and
it triggers the wrong fd to be closed by Podman after the OCI runtime
invocation.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 10:17:42 +02:00
Ed Santiago 55eea9127a logformat: handle apiv2 results, add anchor links
apiv2 tests emit TAP-compliant output; recognize it and
highlight it the same way we do BATS tests.

Add anchor links to TAP output, so other tools (e.g.
cirrus-flake-summarize) can link to particular lines

And, remove a "-f" from "wait" in test-apiv2; looks
like there's some version of bash used in some CI VM
that doesn't grok it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-08 12:10:24 -06:00
Brent Baude 8ce23775a6 v2podman ps alter formats
in order to get the go templating to work for custom input, we now use structure methods instead of template map funcs.  this requires some manipulation of fields so that the funcs can have the proper names.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-08 09:11:26 -05:00
Jhon Honce e0847f5457 V2 podman system service
* Added support for system service
* Enabled linting on the varlinkapi source, needed to support V2
  service command
* Added support for PODMAN_SOCKET

Skip linting deprecated code

Rather than introduce bugs by correcting deprecated code, linting the
code is being skipped. Code that is being ported into V2 is being
checked.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-07 19:22:10 -07:00
OpenShift Merge Robot 9d0d9df6a1
Merge pull request #5157 from QiWang19/rootless-test-login
fix rootless login/logout tests
2020-04-07 19:32:09 +02:00
Qi Wang 7f801b437f fix rootless login/logout tests
fix rootless login/logout tests. Since c/image can support peruser certs directory, this path uses $HOME dir as certs.d to avoid permission deny failures.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-06 18:01:45 -04:00
OpenShift Merge Robot 64b6a19733
Merge pull request #5478 from giuseppe/auto-userns
userns: support --userns=auto
2020-04-06 23:08:36 +02:00
Brent Baude e20ecc733c refactor info
the current implementation of info, while typed, is very loosely done so.  we need stronger types for our apiv2 implmentation and bindings.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:45:42 -05:00
Giuseppe Scrivano 3a0a727110
userns: support --userns=auto
automatically pick an empty range and create an user namespace for the
container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-06 16:32:36 +02:00
OpenShift Merge Robot 3542700d6e
Merge pull request #5707 from adrianreber/crun-checkpoint-1
Prepare for crun checkpoint support
2020-04-03 19:56:03 +02:00
Adrian Reber 7660330ae2
checkpoint: change runtime checkpoint support test
Podman was checking if the runtime support checkpointing by running
'runtime checkpoint -h'. That works for runc.

crun, however, does not use '-h, --help' for help output but, '-?,
--help'.

This commit switches both checkpoint support detection from
 'runtime checkpoint -h'
to
 'runtime checkpoint --help'.

Podman can now correctly detect if 'crun' also support checkpointing.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-04-03 18:00:57 +02:00
OpenShift Merge Robot ccb9e579c4
Merge pull request #5702 from kolyshkin/test-nitpicks
test/e2e/run_volume_test nitpicks
2020-04-03 11:52:28 +02:00
Kir Kolyshkin e39cf4cf59 test/e2e/run_volume_test: use unique mount point
For volume and bind mount tests, use the in-container mount point path
that has no common ancestor with any host path (except for root).

This might help to uncover bugs like [1]. Even if not, it seems
lile a good cleanup regardless.

[1] https://github.com/containers/libpod/pull/5676

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:19:40 -07:00
Kir Kolyshkin 504f9082ee test/e2e/run_volume_test.go: mv dockerfile decl
Move declaration of a dockerfile closer to its use.
Since it is used only once, there's no sense in having it declared
globally.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:17:10 -07:00
Kir Kolyshkin ce38be7959 test/e2e/run_volume_test: only create dir once
Remove repeated mountPath directory creation.

 * For the first two hunks it is the same dir ("secrets") that was
   already created before.

 * For the last hunk ("scratchpad") it is not used at all.

Add an empty line after Mkdir for cases where dir is used more than once.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:17:10 -07:00
Daniel J Walsh 1f8569f7d7
Fix environment handling from containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-02 13:10:08 -04:00
Giuseppe Scrivano 4c02aa46c2
attach: fix hang if control path is deleted
if the control path file is deleted, libpod hangs waiting for a reader
to open it.  Attempt to open it as non blocking until it returns an
error different than EINTR or EAGAIN.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-02 09:15:56 +02:00
OpenShift Merge Robot 56ab9e4cc8
Merge pull request #5649 from jwhonce/wip/varlink
V2 Move varlink home
2020-03-31 20:34:36 +02:00