9191 Commits

Author SHA1 Message Date
59bad8bf71 Merge pull request #7006 from ashley-cui/umask
Add --umask flag for create, run
2020-07-22 05:40:32 -04:00
2643967bc0 Merge pull request #7002 from zhangguanzhang/master
fix podman play kube doesn't override dockerfile ENTRYPOINT
2020-07-22 05:37:35 -04:00
4c7fc773f6 Bump github.com/containers/storage from 1.21.1 to 1.21.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.21.1...v1.21.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-22 05:36:43 -04:00
c0998f728a Merge pull request #7040 from mheon/no_exec_errmsg
Do not print an error message on non-0 exec exit code
2020-07-22 05:34:17 -04:00
ca049ef6f9 Bump github.com/containers/common from 0.16.0 to 0.17.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.16.0...v0.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-22 05:29:34 -04:00
65e1638f9b Enable a bunch of remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 19:23:24 -04:00
344a791ac2 Merge pull request #7025 from mheon/readme_updates
Update the README to reflect the libpod move
2020-07-21 16:42:37 -04:00
17ba396494 Enable --remote flag
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 15:22:15 -04:00
d4d3fbc155 Add --umask flag for create, run
--umask sets the umask inside the container
Defaults to 0022

Co-authored-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Ashley Cui <acui@redhat.com>
2020-07-21 14:22:30 -04:00
a87579cedf fix play kube doesn't override dockerfile ENTRYPOINT
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-07-22 02:17:11 +08:00
e5b3563a89 Merge pull request #7036 from rhatdan/docker
Add noop function disable-content-trust
2020-07-21 13:43:58 -04:00
90e547ec1a Do not print an error message on non-0 exec exit code
This was added with an earlier exec rework, and honestly is very
confusing. Podman is printing an error message, but the error had
nothing to do with Podman; it was the executable we ran inside
the container that errored, and per `podman run` convention we
should set the Podman exit code to the process's exit code and
print no error.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-07-21 13:28:40 -04:00
26410e4f4e Merge pull request #7037 from edsantiago/bats
BATS help-message test: improve diagnostics
2020-07-21 13:19:01 -04:00
5abf33de32 Merge pull request #7028 from xordspar0/patch-1
docs: Fix formatting mistake
2020-07-21 13:16:05 -04:00
be5219ab95 Merge pull request #7035 from ashley-cui/api_gen
Fix Generate API swagger title/description
2020-07-21 11:21:59 -04:00
111a1fe082 Document proxy env var precedence
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 10:11:05 -05:00
f8e2a3500e Merge pull request #6902 from vrothberg/events-endpoint
events endpoint: fix panic and race condition
2020-07-21 10:55:40 -04:00
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
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
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
25105b91db docs: Clarify how env var overriding works
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 08:50:55 -05:00
1aa67b541d Update the README to reflect the libpod move
We no longer have to dance around the fact that the repo is named
"libpod" which simplifies the opening a bit. Also, refresh our
scope section and to-do section a bit.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-07-21 09:50:15 -04:00
a05c15da2f make localunit: record coverage
Inspirsed by CRI-O's coverage logic.  Initial coverage is at 15.7
percent.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-21 15:46:43 +02:00
644b5bc8a3 Merge pull request #7031 from vrothberg/root-check
unit tests: root check
2020-07-21 09:39:08 -04:00
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
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
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
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
7bdf93ee63 logformatter: update MAGIC BLOB string
Fallout from libpod->podman repo name move: the HTML logs
created by logformatter are no longer accessible. They
render as:

    https://storage.googleapis.com/SECRET-5385732420009984-fcae48/artifacts/containers/podman/6313596734930944/html/integration_test.log.html

(yes, "SECRET" instead of "cirrus-ci". Possibly because
the GCE_SSH_USERNAME key, "cirrus-ci", was overzealously
encrypted, making Cirrus censor any instances of the
string in output. Let's see if this fixes it. But anyway
this is a secondary unrelated bug).

Reason: it looks like Cirrus "generated a new magic blob"
when we renamed libpod -> podman. Chris was kind enough to
locate the new magic blob and to give me a link to where
we can discover it ourselves. I added that as a code comment.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-20 14:02:14 -06:00
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
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
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
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
262781c4d8 Merge pull request #7023 from vrothberg/fix-7021
contrib/systemd cleanups
2020-07-20 13:49:47 -04:00
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
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
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
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
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
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
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
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
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
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 f4a2d25c0fca:

	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
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
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
b7b8fce826 Merge pull request #7011 from rhatdan/troubleshoot
document CAP_SYS_ADMIN required for systemd PrivateNetwork
2020-07-19 09:05:52 -04:00
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
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
deff289a9f Merge pull request #6934 from ParkerVR/tags-reference
using reference package to parse
2020-07-18 06:23:17 -04:00