5047 Commits

Author SHA1 Message Date
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
ccf4ec295b Merge pull request #3671 from openSUSE/runtime-path-discovery
Add runtime and conmon path discovery
2019-08-01 10:04:19 +02:00
e7aca5568a Use buildah/pkg/parse volume parsing rather then internal version
We share this code with buildah, so we should eliminate the podman
version.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-01 03:48:16 -04:00
9d6dce1199 github.com/containers/storage v1.12.13
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-01 03:46:14 -04:00
39de184b8b Merge pull request #3573 from rhatdan/vendor
Vendor in latest buildah code
2019-08-01 03:41:27 -04:00
5370d9cb76 Add new exit codes to rm & rmi for running containers & dependencies
This enables programs and scripts wrapping the podman command to handle
'podman rm' and 'podman rmi' failures caused by paused or running
containers or due to images having other child images or dependent
containers. These errors are common enough that it makes sense to have
a more machine readable way of detecting them than parsing the standard
error output.

Signed-off-by: Ondrej Zoder <ozoder@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-01 03:40:29 -04:00
7dfaef7766 Add runtime and conmon path discovery
The `$PATH` environment variable will now used as fallback if no valid
runtime or conmon path matches. The debug logs has been updated to state
the used executable.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-01 08:32:25 +02:00
223fe64dc0 systemd, cgroupsv2: not bind mount /sys/fs/cgroup/systemd
when running on a cgroups v2 system, do not bind mount
the named hierarchy /sys/fs/cgroup/systemd as it doesn't exist
anymore.  Instead bind mount the entire /sys/fs/cgroup.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-01 07:31:06 +02:00
9dcd76e369 Ensure we generate a 'stopped' event on force-remove
When forcibly removing a container, we are initiating an explicit
stop of the container, which is not reflected in 'podman events'.
Swap to using our standard 'stop()' function instead of a custom
one for force-remove, and move the event into the internal stop
function (so internal calls also register it).

This does add one more database save() to `podman remove`. This
should not be a terribly serious performance hit, and does have
the desirable side effect of making things generally safer.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:29:14 -04:00
ef2d96a7a8 Fix Dockerfile - a dependency's name was changed
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:29:14 -04:00
cc63aff571 System events are valid, don't error on them
The logfile driver was not aware that system events existed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:28:42 -04:00
318438fcb3 Do not use an events backend when restoring images
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:28:42 -04:00
cdd5639d56 Expose Null eventer and allow its use in the Podman CLI
We need this specifically for tests, but others may find it
useful if they don't explicitly need events and don't want the
performance implications of using them.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-07-31 17:28:42 -04:00