3653 Commits

Author SHA1 Message Date
60e5492743 Merge pull request #2841 from openSUSE/ginkgo-unit
Update registrar unit tests to match them of cri-o
2019-04-08 07:28:10 -07:00
d86729e743 Merge pull request #2865 from baude/pr/2864
Revert "Switch to golangci-lint"
2019-04-08 02:02:30 -07:00
23602de816 Revert "Switch to golangci-lint"
Signed-off-by: baude <bbaude@redhat.com>
2019-04-05 20:09:45 -05:00
bc320be00b Merge pull request #2742 from openSUSE/golangci-lint
Switch to golangci-lint
2019-04-05 11:02:41 -04:00
ed8bd80d3f Merge pull request #2856 from haircommander/kube-entrypoint
Respect image entrypoint in play kube
2019-04-05 05:56:29 -07:00
b446378f7a Merge pull request #2858 from giuseppe/rootless-enable-healthcheck
rootless: enable healthcheck
2019-04-05 05:21:30 -07:00
e73bc58ace Merge pull request #2857 from giuseppe/kube-rootless
rootless: add support for kube
2019-04-05 05:08:28 -07:00
ebc8999fcf podman: enable kube for rootless
Closes: https://github.com/containers/libpod/issues/2852

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-05 09:34:23 +02:00
990bf271c2 kube: correctly set the default for MemorySwappiness
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-05 09:34:22 +02:00
be496c36d4 rootless: enable healthcheck tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-05 09:33:59 +02:00
65372ee3ab Respect image entrypoint in play kube
Before we ignored an entrypoint specified in an image, which lead to crashes when a user assumed the entrypoint would be used

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-04 22:31:36 -04:00
bda28c61db Merge pull request #2853 from mheon/up_resource_for_build_each_commit
Increase resources for build_each_commit task
2019-04-04 16:54:21 -07:00
5099f189a5 Increase CI resources to help avoid hitting timeouts
The build_each_commit task builds each commit in a pull request
to verify that we have a (at least minimally) functional Podman
at every point, to aid in bisecting.

This task is, right now, extremely slow, taking around 1m40s to
build each commit - which quickly grows unreasonable as PRs grow
to 10+ commits.

Upping resources available to the task should decrease time spent
in CI and reduce the risk of hitting timeouts.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 18:14:05 -04:00
fd39849bee Merge pull request #2838 from openSUSE/golang-1.12
Update Dockerfile to use golang:1.12 image
2019-04-04 13:34:19 -07:00
bf3593ef8d Merge pull request #2831 from baude/remotetree
podman-remote image tree
2019-04-04 13:00:25 -07:00
dc94dbd3c1 podman-remote image tree
add the ability for the podman-remote client to be able to print an
image tree.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-04 14:41:50 -05:00
e320efe9ed Merge pull request #2774 from mheon/db_rework_named_volume
Rework named volumes in DB
2019-04-04 11:57:20 -07:00
02c6110093 Fix E2E tests
The Commit test is blatantly wrong and testing buggy behavior. We
should be commiting the destination, if anything - and more
likely nothing at all.

When force-removing volumes, don't remove the volumes of
containers we need to remove. This can lead to a chicken and the
egg problem where the container removes the volume before we can.
When we re-add volume locks this could lead to deadlocks. I don't
really want to deal with this, and this doesn't seem a
particularly harmful quirk, so we'll let this slide until we get
a bug report.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:27:20 -04:00
1fdc89f616 Drop LocalVolumes from our the database
We were never using it. It's actually a potentially quite sizable
field (very expensive to decode an array of structs!). Removing
it should do no harm.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:27:20 -04:00
42c95eed2c Major rework of --volumes-from flag
The flag should be substantially more durable, and no longer
relies on the create artifact.

This should allow it to properly handle our new named volume
implementation.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:27:20 -04:00
3e066e2920 Volume force-remove now removed dependent containers
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:26:29 -04:00
7309e38ddd Add handling for new named volumes code in pkg/spec
Now that named volumes must be explicitly enumerated rather than
passed in with all other volumes, we need to split normal and
named volumes up before passing them into libpod. This PR does
this.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:26:29 -04:00
ee770ad5b5 Create non-existing named volumes at container create
Replaces old functionality we used for handling image volumes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:26:29 -04:00
d245c6df29 Switch Libpod over to new explicit named volumes
This swaps the previous handling (parse all volume mounts on the
container and look for ones that might refer to named volumes)
for the new, explicit named volume lists stored per-container.

It also deprecates force-removing volumes that are in use. I
don't know how we want to handle this yet, but leaving containers
that depend on a volume that no longer exists is definitely not
correct.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:26:29 -04:00
11799f4e0e Add named volumes for each container to database
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 12:26:29 -04:00
1759eb09e1 Merge pull request #2706 from giuseppe/rootless-single-usernamespace
rootless: single user namespace
2019-04-04 09:21:09 -07:00
71555a9ea0 Merge pull request #2840 from openSUSE/dockerfile-deps
Fix Dockerfile dependencies for packer tests
2019-04-04 00:59:47 -07:00
756a11c26f Merge pull request #2819 from openSUSE/cri-o-annotations
Update cri-o annotations
2019-04-04 00:47:46 -07:00
023eba20db Add varcheck linter
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 09:07:05 +02:00
81a4451fea Add deadcode linter
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 09:07:05 +02:00
42830ab711 Update lint to use golangci-lint
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 09:06:32 +02:00
e28d30c93b Merge pull request #2839 from openSUSE/runtest-improvement
Update run_test to be more robust
2019-04-03 23:59:47 -07:00
88b0e74e0b Update registrar unit tests to match them of cri-o
- Add the test framework abstraction
- Update the unit tests to run with ginkgo

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 08:53:32 +02:00
ab4d70d55c Update run tests to be skipped when not supported
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 08:49:52 +02:00
57fb7b2cf9 Fix Dockerfile dependencies for packer tests
This commit adds unzip and python3-yaml to the Dockerfile, which are
needed to run the tests in contrib/cirrus/packer within the libpod
container image.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 08:48:03 +02:00
6f928057b4 Update Dockerfile to use golang:1.12 image
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 08:46:36 +02:00
4bda5378b1 Merge pull request #2832 from mheon/rootless_size_errors
--size does not work with rootless at present
2019-04-03 16:29:30 -07:00
7a2bca54f0 Merge pull request #2651 from mheon/prevent_null_deref
Fix a potential segfault in podman search
2019-04-03 13:51:40 -07:00
c6255537d9 Fix a potential segfault in podman search
When generating headers for search, we unconditionally
access element 0 of an array, and I saw this segfault in our CI.
There's no reason we have to do this, we're just going through it
to get field names with reflect, so just make a new copy of the
struct in question.

Also, move this code, which is only for CLI display, into
cmd/podman from libpod/image.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-04-03 15:11:08 -04:00
42757c1855 Merge pull request #2825 from baude/remotediff
add remote-client diff
2019-04-03 11:16:42 -07:00
662ae6c0ed Merge pull request #2843 from cevich/bump_fedora_image
Cirrus: Update F28 -> F29 container image
2019-04-03 10:50:38 -07:00
e662cb1f81 Merge pull request #2842 from cevich/improve_podman_pod_rm
Improve podman pod rm -a test
2019-04-03 10:36:38 -07:00
fc4105ddbe Improve podman pod rm -a test
When running as a user, the order of removal is database ID dependent.
This results in this test randomly failing.  This condition was
very difficult to debug and the test was missing two critical checks.
One to confirm an expected error message was produced, and another
to verify the expected running container, remains running.

Fix the container and missing error-message checks, and vastly improve
the debug-ability of this test.  Fixing the random-failures requires
intensive fixes in other areas, so that task will be left up to future
work.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 11:04:35 -04:00
c35aefdde0 Cirrus: Update F28 -> F29 container image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 11:02:20 -04:00
c1cd9a3c6d --size does not work with rootless at present
We'd need to join multiple container's user namespaces, which is
not possible for now. The rootless single userns patches under
development by Giuseppe will fix this, but won't land in 1.2.x.

For now, disable --size as rootless.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-03 10:57:03 -04:00
576a80b0d7 add remote-client diff
the remote client now can run the diff command to report changes,
modifications, and deletions in an image or container.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-03 09:52:38 -05:00
2ad5f5cc25 Merge pull request #2833 from cevich/podman_in_podman
Cirrus: Support special-case modes of testing
2019-04-03 07:51:42 -07:00
599714d9f2 Cirrus: Support special-case modes of testing
Previously libpod CI was fairly straight-forward, run unit and
integration tests in a standard set of 3 VMs.  Off on the side was a
single special case of running tests as an ordinary user.  There is a
desire to stop using the PAPR system to support testing inside of a
container.

Since having two special cases potentially invites more
down the road, make provisions to handle them more gracefully.  This
commit introduces an environment variable:  ``$SPECIALMODE``.  It's
value has the following meanings within the CI scripts:

Mode 'none': Nothing special, business as usual (default)
Mode 'rootless': Rootless testing
Mode 'in_podman': Build container, run integration tests in it.

This will make adding additional special-cases later easier, as well as
extending the special cases in a Matrix across multiple OS's.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 09:57:20 -04:00
ad467ba16e Merge pull request #2818 from mheon/update_version
Update README with current version
2019-04-01 07:05:58 -07:00
72382a12a7 rootless: use a single user namespace
simplify the rootless implementation to use a single user namespace
for all the running containers.

This makes the rootless implementation behave more like root Podman,
where each container is created in the host environment.

There are multiple advantages to it: 1) much simpler implementation as
there is only one namespace to join.  2) we can join namespaces owned
by different containers.  3) commands like ps won't be limited to what
container they can access as previously we either had access to the
storage from a new namespace or access to /proc when running from the
host.  4) rootless varlink works.  5) there are only two ways to enter
in a namespace, either by creating a new one if no containers are
running or joining the existing one from any container.

Containers created by older Podman versions must be restarted.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-01 15:32:58 +02:00