Commit graph

8626 commits

Author SHA1 Message Date
OpenShift Merge Robot e5b3563a89
Merge pull request #7036 from rhatdan/docker
Add noop function disable-content-trust
2020-07-21 13:43:58 -04:00
OpenShift Merge Robot 26410e4f4e
Merge pull request #7037 from edsantiago/bats
BATS help-message test: improve diagnostics
2020-07-21 13:19:01 -04:00
OpenShift Merge Robot 5abf33de32
Merge pull request #7028 from xordspar0/patch-1
docs: Fix formatting mistake
2020-07-21 13:16:05 -04:00
OpenShift Merge Robot be5219ab95
Merge pull request #7035 from ashley-cui/api_gen
Fix Generate API swagger title/description
2020-07-21 11:21:59 -04:00
Jordan Christiansen 111a1fe082 Document proxy env var precedence
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 10:11:05 -05:00
OpenShift Merge Robot f8e2a3500e
Merge pull request #6902 from vrothberg/events-endpoint
events endpoint: fix panic and race condition
2020-07-21 10:55:40 -04:00
Ed Santiago 2b323f2238 BATS help-message test: improve diagnostics
The error messages from the 'podman xxx --help' cross-check
test are unhelpful, and cause much wasted time when they trigger.

Solution: instead of using the built-in exit-status check
in run_podman, do an explicit check outside of run_podman.
This lets us die() with a custom, hopefully useful, message.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-21 08:31:56 -06:00
Daniel J Walsh fc52aa6704
Add noop function disable-content-trust
People who use docker scripts with Podman see failures
if they use disable-content-trust flag.  This flag already
existed for podman build, adding it to pull/push/create/run.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 10:18:27 -04:00
Ashley Cui 5d25d1808a Fix Generate API title/description
generate kube title and descritopn was same as play kube for apiv2 docs

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-07-21 10:03:25 -04:00
Jordan Christiansen 25105b91db docs: Clarify how env var overriding works
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 08:50:55 -05:00
OpenShift Merge Robot 644b5bc8a3
Merge pull request #7031 from vrothberg/root-check
unit tests: root check
2020-07-21 09:39:08 -04:00
Valentin Rothberg d628de31d7 unit tests: root check
The unit tests currently require running as root.  This has caused some
confusion that justifies adding a root check to `make localunit` and
error out for non-root users instead of starting the tests deemed to
fail.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-21 13:31:43 +02:00
OpenShift Merge Robot df6920aa79
Merge pull request #7009 from rhatdan/containers.conf
Switch references from libpod.conf to containers.conf
2020-07-21 05:54:57 -04:00
OpenShift Merge Robot 1682e60dac
Merge pull request #7026 from edsantiago/bats_majorminor_warning_fix
BATS tests: more resilient remove_same_dev_warning
2020-07-21 05:52:09 -04:00
Jordan Christiansen 16e603147f docs: Fix formatting mistake
Part of this section was a code block, and part of it was absorbed into
the preceding normal paragraph.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-20 20:27:58 -05:00
Daniel J Walsh 841eac0af6
Switch references from libpod.conf to containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-20 15:09:54 -04:00
Ed Santiago 1405c3a205 BATS tests: more resilient remove_same_dev_warning
Some CI tests are flaking in the SELinux test, possibly because
there's a new variation of the "multiple devices" warning I hadn't
seen before:

   WARNING: Creating device "/dev/null" with same type, major and minor as existing "/dev/foodevdir/null".

Solution: in remove_same_dev_warning(), remove "multiple" from
the match string.

Also: fix a Go test that wasn't cleaning up after itself. And
add an actual test to it, not just check-exit-status.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-20 12:32:17 -06:00
OpenShift Merge Robot 0d26a573e3
Merge pull request #6895 from QiWang19/pr-3457
Add support for overlay volume mounts in podman.
2020-07-20 14:11:17 -04:00
OpenShift Merge Robot e8de509be5
Merge pull request #7024 from mheon/fix_6506
Re-enable a generate kube test that failed on Ubuntu
2020-07-20 13:52:41 -04:00
OpenShift Merge Robot 262781c4d8
Merge pull request #7023 from vrothberg/fix-7021
contrib/systemd cleanups
2020-07-20 13:49:47 -04:00
Qi Wang 020d81f113 Add support for overlay volume mounts in podman.
Add support -v for overlay volume mounts in podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-07-20 09:48:55 -04:00
Matthew Heon 4a3ba34d63 Re-enable a generate kube test that failed on Ubuntu
The fix was a new runc version, which we may have sucked in.

Fixes #6506

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-20 09:48:48 -04:00
Valentin Rothberg dea93c27d2 events endpoint: backwards compat to old type
The versions Docker that the compat endpoints currently support are
using another type for the `filters` parameter than later versions
of Docker, which the libpod/events endpoint is also using.

To prevent existing deplopyments from breaking while still achieving
backward compat, we now support both types for the filters parameter.

Tested manually.

Fixes: #6899
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 15:05:04 +02:00
OpenShift Merge Robot 17f9b80600
Merge pull request #7018 from Luap99/fix#7015
fix: system df error when an image has no name
2020-07-20 08:26:44 -04:00
Valentin Rothberg 38bb6756b8 podman.service: set type to simple
Set the type of the podman.service to simple.  This will correctly
report the status of the service once it has started.  As a oneshot
service, it does not transition from the startup state to running.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:42:49 +02:00
Valentin Rothberg 0f22b69c03 podman.service: set doc to podman-system-service
podman-api(1) does not exist, so set the man page to
podman-system-service(1).  Same for the .socket.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:42:02 +02:00
Valentin Rothberg 21665cbfa6 podman.service: use default registries.conf
Do not hard-set the registries.conf to `/etc/containers/registries.conf`.
Podman (and other c/image users) already default to it.  However,
ordinary non-root users should still be able to use the configs in their
home directories which is now possible.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:40:46 +02:00
Valentin Rothberg 2b6dd3fb43 podman.service: use default killmode
Do not set the killmode to process as it only kills the main process and
leaves other processes untouched.  Just remove the line and use the
default cgroup killmode which will kill all processes in the service's
cgroup.

Fixes: #7021
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:40:46 +02:00
Valentin Rothberg 2e6946c777 podman.service: remove stop timeout
Remove the stop timeout from the unit.  As unit does not specify any
stop command, the timeout is effectively 0 and a NOOP.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:40:46 +02:00
Valentin Rothberg d856e87f40 events endpoint: fix panic and race condition
Fix a potential panic in the events endpoint when parsing the filters
parameter.  Values of the filters map might be empty, so we need to
account for that instead of uncondtitionally accessing the first item.

Also apply a similar for race conditions as done in commit f4a2d25c0f:

	Fix a race that could cause read errors to be masked.  Masking
	such errors is likely to report red herrings since users don't
	see that reading failed for some reasons but that a given event
	could not be found.

Another race was the handler closing event channel, which could lead to
two kinds of panics: double close, send to close channel.  The backend
takes care of that.  However, make sure that the backend stops working
in case the context has been cancelled.

Fixes: #6899
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:37:05 +02:00
Valentin Rothberg 9312d458b4 systemd: symlink user->system
Symlink the user to the system services in `contrib/systemd`.
There is no diference between the services, so we can reduce
redundancy while not breaking downstream packages which might
already be referencing `./contrib/systemd/user`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:12:41 +02:00
Paul Holzinger 67a5e21bf8 fix: system df error when an image has no name
When an image has no name/tag system df will
error because it tries to parse an empty name.

This commit makes sure we only parse non
empty names and set the repository and tag
to "<none>" otherwise.

Closes #7015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-07-19 22:55:27 +02:00
OpenShift Merge Robot b7b8fce826
Merge pull request #7011 from rhatdan/troubleshoot
document CAP_SYS_ADMIN required for systemd PrivateNetwork
2020-07-19 09:05:52 -04:00
OpenShift Merge Robot d087adeb87
Merge pull request #6402 from alvistack/master-linux-amd64
[nix] Cleanup nix derivation for static builds
2020-07-18 08:29:16 -04:00
Daniel J Walsh 94d9add4eb
document CAP_SYS_ADMIN required for systemd PrivateNetwork
Signed-off-by: James Cassell <code@james.cassell.me>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-18 06:30:28 -04:00
OpenShift Merge Robot deff289a9f
Merge pull request #6934 from ParkerVR/tags-reference
using reference package to parse
2020-07-18 06:23:17 -04:00
Wong Hoi Sing Edison f53812a11e
Cleanup nix derivation for static builds
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-07-18 09:03:28 +08:00
OpenShift Merge Robot 10c5f24123
Merge pull request #7005 from giuseppe/set-umask-rlimits
abi: set default umask and rlimits
2020-07-17 16:12:47 -04:00
Parker Van Roy 809a50f94d Used reference package with errors for parsing tag
Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
2020-07-17 15:54:21 -04:00
Giuseppe Scrivano 65d382dc68
abi: set default umask and rlimits
the code got lost in the migration to podman 2.0, reintroduce it.

Closes: https://github.com/containers/podman/issues/6989

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-17 20:53:38 +02:00
OpenShift Merge Robot dfca83d37c
Merge pull request #7000 from containers/dependabot/go_modules/github.com/containers/common-0.16.0
Bump github.com/containers/common from 0.15.2 to 0.16.0
2020-07-17 05:43:28 -04:00
OpenShift Merge Robot d86bae2a01
Merge pull request #6965 from giuseppe/followup-pr6324
allow switching of port-forward approaches in rootless/using slirp4netns
2020-07-17 04:44:49 -04:00
OpenShift Merge Robot 0bd5181942
Merge pull request #6963 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.25.0incompatible
Bump github.com/uber/jaeger-client-go from 2.24.0+incompatible to 2.25.0+incompatible
2020-07-16 17:18:10 -04:00
OpenShift Merge Robot 8c59e3f6e8
Merge pull request #7003 from mheon/404_on_noimage
The compat create endpoint should 404 on no such image
2020-07-16 17:14:50 -04:00
Giuseppe Scrivano d35d8125bf
docs: document the new slirp4netns options
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-16 22:37:28 +02:00
Giuseppe Scrivano 7722b582b4
network, slirp4netns: add option to allow host loopback
Closes: https://github.com/containers/podman/issues/6912

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-16 22:37:27 +02:00
Giuseppe Scrivano 9be7029cdd
libpod: pass down network options
do not pass network specific options through the network namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-16 22:37:27 +02:00
Matthew Heon fc81d2acea The compat create endpoint should 404 on no such image
This matches Docker behavior, and will make the Docker frontend
work with `podman system service` (Docker tries to create, then
if that fails with 404 sends a request to pull the image).

Fixes #6960

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-16 14:20:39 -04:00
Daniel J Walsh fb6d9a84c5
Bump github.com/containers/common from 0.15.2 to 0.16.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.15.2 to 0.16.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.15.2...v0.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-16 13:11:10 -04:00
OpenShift Merge Robot f4766e01e3
Merge pull request #6988 from jwhonce/wip/connection
Fix `podman system connection` panic
2020-07-16 11:16:47 -04:00