Commit Graph

3674 Commits

Author SHA1 Message Date
Sascha Grunert 42830ab711
Update lint to use golangci-lint
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-04 09:06:32 +02:00
OpenShift Merge Robot e28d30c93b
Merge pull request #2839 from openSUSE/runtest-improvement
Update run_test to be more robust
2019-04-03 23:59:47 -07:00
Sascha Grunert 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
Sascha Grunert 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
Sascha Grunert 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
Sascha Grunert 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Matthew Heon 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
OpenShift Merge Robot 42757c1855
Merge pull request #2825 from baude/remotediff
add remote-client diff
2019-04-03 11:16:42 -07:00
OpenShift Merge Robot 662ae6c0ed
Merge pull request #2843 from cevich/bump_fedora_image
Cirrus: Update F28 -> F29 container image
2019-04-03 10:50:38 -07:00
OpenShift Merge Robot 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
Chris Evich 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
Chris Evich c35aefdde0
Cirrus: Update F28 -> F29 container image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 11:02:20 -04:00
Matthew Heon 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
baude 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
OpenShift Merge Robot 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
Chris Evich 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
OpenShift Merge Robot ad467ba16e
Merge pull request #2818 from mheon/update_version
Update README with current version
2019-04-01 07:05:58 -07:00
Giuseppe Scrivano 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
Giuseppe Scrivano ed326206f2
rootless: remove SkipStorageSetup()
in the few places where we care about skipping the storage
initialization, we can simply use the process effective UID, instead
of relying on a global boolean flag.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-01 13:24:04 +02:00
Sascha Grunert 3600596b35
Update cri-o annotations
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-04-01 11:10:54 +02:00
OpenShift Merge Robot cd35e20772
Merge pull request #2812 from rpjday/topic/rpjday/missing_option_hyphen
docs/podman-inspect.1.md: add missing option hyphen for "-t"
2019-03-31 17:21:06 -07:00
Matthew Heon bb2b6a1ad4 Update README with current version
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-31 11:47:53 -04:00
OpenShift Merge Robot 056d2faa08
Merge pull request #2816 from rpjday/topic/rpjday/missing_hyphens
docs/podman*.md: fix numerous option typos and spacing errors
2019-03-31 08:44:06 -07:00
OpenShift Merge Robot 278c961f98
Merge pull request #2807 from mheon/bump-1.2.0
Bump to v1.2.0
2019-03-31 07:35:05 -07:00
OpenShift Merge Robot b4a5610624
Merge pull request #2814 from rpjday/topic/rpjday/container_rm
docs/podman-rm.1.md: delete "Not yet implemented" msg for volume removal
2019-03-31 07:24:06 -07:00
Robert P. J. Day 6ef64b90e4 docs/podman*.md: fix numerous option typos and spacing errors
Cursory examination of man pages shows a number of typos:

  - missing hyphens
  - missing blank line
  - longer option should precede shorter option

This is not an extensive fix, there's still a lot that could
be cleaned up.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2019-03-31 04:51:46 -04:00
Robert P. J. Day ee23622ca5 docs/podman-rm.1.md: delete "Not yet implemented" msg for volume removal
Since this feature appears to be implemented, remove the qualifier.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2019-03-30 18:30:41 -04:00
Robert P. J. Day 1f78a80bf1 docs/podman-inspect.1.md: add missing option hyphen for "-t"
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2019-03-30 13:35:38 -04:00
OpenShift Merge Robot 833204d63b
Merge pull request #2804 from rhatdan/help
Capitalize global options help information
2019-03-30 08:44:05 -07:00
Matthew Heon fa2933e6ab Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-30 11:33:15 -04:00
Matthew Heon 87162d6cd8 Bump to v1.3.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-30 11:33:15 -04:00
Matthew Heon 3bd528e583 Bump to v1.2.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-30 11:33:12 -04:00
Daniel J Walsh 455312361b
Fix location of libpod.conf
libpod.conf defaults to /usr/share/containers/libpod.conf.

Clarify how administrators can override it and the location
of the users version for rootless mode.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-30 07:39:05 -04:00
Daniel J Walsh 33da2d4890
Capitalize global options help information
--trace, --help and --version were not capatilized like the rest of the
global options.  This patch fixes this problem.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-30 05:54:53 -04:00
OpenShift Merge Robot 7b73974819
Merge pull request #2803 from mheon/release_notes_v1.2.0
Update release notes for v1.2.0
2019-03-29 15:10:12 -07:00
OpenShift Merge Robot e435931544
Merge pull request #2801 from mheon/remove_wait_event
Remove wait event
2019-03-29 15:10:04 -07:00
OpenShift Merge Robot c5ccab2dc4
Merge pull request #2802 from TomSweeneyRedHat/dev/tsweeney/buildah1.7.2
Vendor Buildah 1.7.2
2019-03-29 12:32:08 -07:00
Matthew Heon ae9e12d711 Update release notes for v1.2.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 15:29:14 -04:00
OpenShift Merge Robot 0531565343
Merge pull request #2800 from mheon/lock_events_file
Add locking to ensure events file is concurrency-safe
2019-03-29 12:16:00 -07:00
Matthew Heon 99318b0894 Remove wait event
It's not necessary to log an event for a read-only operation like
wait.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 14:50:43 -04:00
TomSweeneyRedHat 1a0d4f2602 Vendor Buildah 1.7.2
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-29 14:08:45 -04:00
Matthew Heon 8108801247 Add locking to ensure events file is concurrency-safe
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 12:51:37 -04:00
OpenShift Merge Robot f4d90a96cb
Merge pull request #2691 from baude/psdynamic
Add watch mode to podman ps
2019-03-29 07:59:11 -07:00
OpenShift Merge Robot 8b5f101726
Merge pull request #2635 from rhatdan/cache
Set blob cache directory based on GraphDriver
2019-03-29 07:59:04 -07:00
OpenShift Merge Robot 284dea453d
Merge pull request #2797 from giuseppe/rootless-set-sticky
rootless: set sticky bit on rundir
2019-03-29 07:48:12 -07:00
OpenShift Merge Robot 83cea5d5bc
Merge pull request #2730 from giuseppe/userns-take-rid-of-intermediate-mountns
userns: do not use an intermediate mount namespace
2019-03-29 07:48:05 -07:00
OpenShift Merge Robot dd2bf91540
Merge pull request #2793 from mheon/alter_name_regex
Alter container/pod/volume name regexp to match Docker
2019-03-29 07:19:05 -07:00
Matthew Heon 449b8ab7b1 Alter container/pod/volume name regexp to match Docker
Docker's upstream name validation regex has two major differences
from ours that we pick up in this PR.

The first requires that the first character of a name is a letter
or number, not a special character.

The second allows periods in names.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 09:40:06 -04:00