5059 Commits

Author SHA1 Message Date
3bffe77f82 Merge pull request #3716 from baude/varlinkfixes2
various fixes for varlink endpoints
2019-08-05 16:58:43 +02:00
1c6d7eb954 Merge pull request #3698 from adrianreber/StartedTime
restore: correctly set StartedTime
2019-08-05 16:47:08 +02:00
a15432afe6 Merge pull request #3718 from QiWang19/df_imgindex
fix system df crashes on unnamed images
2019-08-05 16:37:01 +02:00
6997dc1488 Merge pull request #3701 from vrothberg/fix-3696
container stop: kill conmon
2019-08-05 16:36:49 +02:00
337358ae63 Merge pull request #3690 from adrianreber/ignore-static-ip
restore: added --ignore-static-ip option
2019-08-05 16:11:50 +02:00
fff496436e Merge pull request #3171 from QiWang19/events_json
podman events format json
2019-08-05 16:11:42 +02:00
626dfdb613 Merge pull request #3691 from baude/infoeventlogger
add eventlogger to info
2019-08-05 15:23:05 +02:00
82b586349c restore: correctly set StartedTime
A container restored from an exported checkpoint did not have its
StartedTime set. Which resulted in a status like 'Up 292 years ago'
after the restore.

This just sets the StartedTime to time.Now() if a container is restored
from an exported checkpoint.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-08-05 14:29:07 +02:00
e2f38cdaa4 Merge pull request #3310 from gabibeyer/rootlessKata
rootless: Rearrange setup of rootless containers ***CIRRUS: TEST IMAGES***
2019-08-05 14:26:04 +02:00
b609de2e3d Merge pull request #3673 from TomSweeneyRedHat/dev/tsweeney/trubs2
Add rootless NFS and OverlayFS warnings to docs
2019-08-05 10:20:03 +02:00
909ab59419 container stop: kill conmon
Old versions of conmon have a bug where they create the exit file before
closing open file descriptors causing a race condition when restarting
containers with open ports since we cannot bind the ports as they're not
yet closed by conmon.

Killing the old conmon PID is ~okay since it forces the FDs of old
conmons to be closed, while it's a NOP for newer versions which should
have exited already.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-05 09:16:18 +02:00
389a7b79c2 Merge pull request #3720 from baude/honorconfiginuser
honor libpod.conf in /usr/share/containers
2019-08-05 00:24:53 +02:00
577b37b716 honor libpod.conf in /usr/share/containers
we should be looking for the libpod.conf file in /usr/share/containers
and not in /usr/local.  packages of podman should drop the default
libpod.conf in /usr/share.  the override remains /etc/containers/ as
well.

Fixes: #3702

Signed-off-by: baude <bbaude@redhat.com>
2019-08-04 14:04:18 -05:00
d9ea4db396 Merge pull request #3717 from rhatdan/errors
Don't log errors to the screen when XDG_RUNTIME_DIR is not set
2019-08-04 16:22:48 +02:00
1da897d505 fix system df crashes on unnamed images
if the image is unnamed, pass an nil slice to the parse repotags function instead of getting the image name by index.

after this patch, unnamed images will be shown as <none>

```
Images space usage:

REPOSITORY                    TAG      IMAGE ID       CREATED        SIZE     SHARED SIZE   UNIQUE SIZE   CONTAINERS
docker.io/library/ubuntu      bionic   3556258649b2   11 days ago    66.6MB   0B            66.6MB        0
<none>                        <none>   dd8a8db2c79b   11 days ago    986MB    66.6MB        919MB         0

```

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-04 10:00:29 -04:00
66485c80fc Don't log errors to the screen when XDG_RUNTIME_DIR is not set
Drop errors to debug when trying to setup the runtimetmpdir.  If the tool
can not setup a runtime dir, it will error out with a correct message
no need to put errors on the screen, when the tool actually succeeds.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-04 06:50:47 -04:00
c34e74755a various fixes for varlink endpoints
when using build, require a "more" connection to get logs.

when pulling a non-existent image, do not crash varlink connection.

Fixes: #3714
Fixes: #3715

Signed-off-by: baude <bbaude@redhat.com>
2019-08-03 19:05:22 -05:00
63eef5a234 add eventlogger to info
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-02 20:05:27 -05:00
140e08ef64 Merge pull request #3707 from haircommander/no-errorf
Add handling for empty LogDriver
2019-08-03 00:50:36 +02:00
582a24dfed Fix typos
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:30:31 -04:00
610003ab0f Update Varlink API documentation for volumes changes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:17:25 -04:00
cd561cfe2f Swap 'volume inspect' frontend to use the new backend
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:08:30 -04:00
8b72a72ca2 Implement backend for 'volume inspect'
Begin to separate the internal structures and frontend for
inspect on volumes. We can't rely on keeping internal data
structures for external presentation - separating presentation
and internal data format is good practice.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:08:30 -04:00
2110422a61 Add handling for empty LogDriver
There are two cases logdriver can be empty, if it wasn't set by libpod, or if the user did --log-driver ""
The latter case is an odd one, and the former is very possible and already handled for LogPath.
Instead of printing an error for an entirely reasonable codepath, let's supress the error

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-08-02 14:03:27 -04:00
a0f9dbe007 Add rootless NFS and OverlayFS warnings to docs
Add warnings/work arounds about NFS and OverlayFS to the troubleshooting guide
and also the main podman page.  Verified that these warnings are on the rootless
page already.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-02 13:57:43 -04:00
0ad374af6a podman events format json
Enable podman events to format the output as jsonline

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-02 11:47:43 -04:00
3cc9ab8992 Merge pull request #3695 from edsantiago/bats_hang_fix
System tests: resolve hang in rawhide rootless
2019-08-02 15:37:47 +02:00
21cf37d0d5 add godoc link to readme
Signed-off-by: Filip Weiss <me@fiws.net>
2019-08-02 13:31:18 +02:00
5370c53c9c Merge pull request #3692 from haircommander/play-caps
Add Capability support to play kube
2019-08-02 10:42:46 +02:00
2cc5913bed Merge pull request #3676 from fzoske/fix-typo
Fix typo
2019-08-02 10:19:24 +02:00
c23b92b409 restore: added --ignore-static-ip option
If a container is restored multiple times from an exported checkpoint
with the help of '--import --name', the restore will fail if during
'podman run' a static container IP was set with '--ip'. The user can
tell the restore process to ignore the static IP with
'--ignore-static-ip'.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-08-02 10:10:54 +02:00
6eee9ab080 System tests: resolve hang in rawhide rootless
Fedora CI tests are failing on rawhide under kernel
5.3.0-0.rc1.git3.1.fc31 (rhbz#1736758). But there's
another insidious failure, a 4-hour hang in the
rootless tests on the same CI system. The culprit
line is in the podman build test, but it's actually
BATS itself that hangs, not the build command -- which
suggests that it's the usual FD 3 problem (see BATS README).
It would seem that podman is forking a process that
inherits fd 3 but that process is not getting cleaned
up when podman crashes upon encountering the kernel bug.

Today it's podman build, tomorrow it might be something
else. Let's just run all podman invocations in run_podman
with a non-bats FD 3.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-08-01 20:19:54 -06:00
e3240daa47 Merge pull request #3551 from mheon/fix_memory_leak
Fix memory leak with exit files
2019-08-02 03:44:43 +02:00
e48dc506d1 Merge pull request #3693 from QiWang19/search
fix search output limit
2019-08-02 01:22:44 +02:00
1bbcb2fc56 Merge pull request #3458 from rhatdan/volume
Use buildah/pkg/parse volume parsing rather then internal version
2019-08-01 23:24:03 +02:00
619a39f7bb fix search output limit
close https://bugzilla.redhat.com/show_bug.cgi?id=1732280
From the bug Podman search returns 25 results even when limit option `--limit` is larger than 25(maxQueries). They want Podman to return `--limit` results.

This PR fixes the number of output result.
if --limit not set, return MIN(maxQueries, len(res))
if --limit is set, return MIN(option, len(res))

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-01 16:15:15 -04:00
834107c82e Add capability functionality to play kube
Take capabilities written in a kube and add to a container
adapt test suite and write cap-add/drop tests

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-08-01 15:47:45 -04:00
8da24f2f7d Use "none" instead of "null" for the null eventer
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-01 15:01:54 -04:00
e1a099ed44 Merge pull request #3688 from mheon/print_pod
Print Pod ID in `podman inspect` output
2019-08-01 20:30:53 +02:00
3acfcb3062 Deduplicate capabilities in generate kube
capabilities that were added and dropped were several times duplicated. Fix this

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-08-01 14:12:36 -04:00
944a68cb4d Fix typo
Signed-off-by: Fabian Zoske <git@fzoske.de>
2019-08-01 20:09:44 +02:00
0a05af1dd6 Cirrus: Add Second partition for storage testing
This is mainly/initially to support use of Cirrus-CI
in https://github.com/containers/buildah since that setup
re-uses the VM images from this project. However, it also
opens doors here, if libpod ever needs/wants to do things
with a dedicated storage device and/or storage-drivers.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-01 14:07:55 -04:00
6bbeda6da5 Pass on events-backend config to cleanup processes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-01 12:37:24 -04:00
ea02c11cc1 Print Pod ID in podman inspect output
Somehow this managed to slip through the cracks, but this is
definitely something inspect should print.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-01 11:34:36 -04:00
afb493ae9b Merge pull request #3686 from vrothberg/rawhide-builds
go build: use `-mod=vendor` for go >= 1.11.x
2019-08-01 15:50:54 +02:00
39a9099b3b go build: use -mod=vendor for go >= 1.11.x
Go 1.13.x isn't sensitive to the GO111MODULE environment variable
causing builds to not use the vendored sources in ./vendor. Force builds
of module-supporting go versions to use the vendored sources by setting
-mod=vendor.

Verified in a fedora:rawhide container.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-01 14:04:17 +02:00
6f62dac163 Merge pull request #3341 from rhatdan/exit
Add new exit codes to rm & rmi for running containers & dependencies
2019-08-01 13:37:19 +02:00
ee15e76da0 Merge pull request #3675 from rhatdan/storage
Vendor in containers/storage v1.12.16
2019-08-01 12:55:19 +02:00
5056964d09 Merge pull request #3677 from giuseppe/systemd-cgroupsv2
systemd, cgroupsv2: not bind mount /sys/fs/cgroup/systemd
2019-08-01 11:35:20 +02:00
3215ea694d Merge pull request #3681 from vrothberg/tests-check-errors
e2e test: check exit codes for pull, save, inspect
2019-08-01 05:23:36 -04:00