11031 Commits

Author SHA1 Message Date
7b52654649 Merge pull request #9417 from ashley-cui/journald
Fix journald logs
2021-02-21 05:03:46 -05:00
05eb06f568 Turn on journald and k8s file logging tests
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-19 16:11:41 -05:00
f06dd45e0c Allow podman play kube to read yaml file from stdin
Fixes: https://github.com/containers/podman/issues/8996

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-19 12:53:25 -05:00
4aaaa6c1df Merge pull request #9339 from matejvasek/update_wait_swagger
[CI:DOCS] Update swagger doc for libpod container wait
2021-02-19 12:53:24 -05:00
43a581904f Log working dir when chdir fails
Signed-off-by: Jonas Schievink <jonasschievink@gmail.com>
2021-02-19 17:04:38 +01:00
b6db60e58f Merge pull request #9430 from baude/issue9429
Fix segfault in run with memory-swap
2021-02-19 10:59:22 -05:00
c12576501c Merge pull request #9434 from jmguzik/rootless-linux-bug
[NO TESTS NEEDED] leak fix in rootless_linux.c fcn can_use_shortcut
2021-02-19 10:45:24 -05:00
d6b0b54121 Fix segfault in run with memory-swap
when unlimited (-1) was being passed to memory-swap, podman threw a
segfault.

Fixes #9429

Signed-off-by: baude <bbaude@redhat.com>
2021-02-19 07:56:14 -06:00
6a9257a292 Merge pull request #9428 from vrothberg/cp-content-fix
cp: treat "." and "/." correctly
2021-02-19 06:09:22 -05:00
e1ad50654c leak fix in rootless_linux.c fcn can_use_shortcut
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-19 11:20:35 +01:00
612ba6aa82 Fix journald logs with more than 1 container
A podman logs on multiple containers will correctly display the
container ID next to the log line

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-19 02:21:12 -05:00
9016387bba Fix journald logs --follow
Previously, --follow with a podman logs using journald would not exit

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-19 02:21:12 -05:00
f2d057c943 Fix journald logs --since
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-19 02:21:12 -05:00
fbc50e5285 fix journald logs --tail 0
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-19 02:21:12 -05:00
1c6c94d44a Merge pull request #9425 from baude/basicnetworking
[CI:DOCS]basic networking guide
2021-02-18 16:43:31 -05:00
cf2a551896 [CI:DOCS]basic networking guide
created a basic networking guide for podman that outlines the common
network setups for podman.

Fixes: #8874

Signed-off-by: baude <bbaude@redhat.com>
2021-02-18 13:21:33 -06:00
71689052a1 cp: treat "." and "/." correctly
Make sure to treat "." and "/." correctly.  Both cases imply to copy the
contents of a directory in contrast to the directory.  This implies to
unset the KeepDirectoryNames options of the copiah package.

Previously, the code was performing a simple string suffix check which
is not enough since it would match files and directories ending with
".".

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-18 18:23:23 +01:00
caa0bc1576 [CI:DOCS] [NO TESTS NEEDED] Update swagger doc for libpod container wait
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-18 18:09:21 +01:00
b2bb05d598 Merge pull request #9414 from edigaryev/fix-wait-api-condition
API: fix libpod's container wait endpoint condition conversion
2021-02-18 11:13:31 -05:00
31eca5c200 Bump k8s.io/apimachinery from 0.20.2 to 0.20.3
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.20.2 to 0.20.3.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.20.2...v0.20.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-18 05:13:51 -05:00
c3419d2168 Merge pull request #9415 from mheon/fix_9354
Change source path resolution for volume copy-up
2021-02-18 03:13:41 -05:00
e022c19753 Don't switch on a single case
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-18 01:43:23 +03:00
3e168b19f2 Quote URL
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-18 01:40:41 +03:00
b3f9559c87 bindings: support simple types that implement fmt.Stringer interface
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-18 01:14:12 +03:00
9699e81a06 API: fix libpod's container wait endpoint condition conversion
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-18 00:34:23 +03:00
a9d548bf77 Change source path resolution for volume copy-up
Instead of using the container's mountpoint as the base of the
chroot and indexing from there by the volume directory, instead
use the full path of what we want to copy as the base of the
chroot and copy everything in it. This resolves the bug, ends up
being a bit simpler code-wise (no string concatenation, as we
already have the full path calculated for other checks), and
seems more understandable than trying to resolve things on the
destination side of the copy-up.

Fixes #9354

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-17 14:57:06 -05:00
d48f4a0e1f Merge pull request #9383 from mheon/fix_copyup_empty
Fix an issue where copyup could fail with ENOENT
2021-02-17 13:18:33 -05:00
6ea9ff2f21 Merge pull request #9406 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.7.1
Bump github.com/sirupsen/logrus from 1.7.0 to 1.7.1
2021-02-17 13:17:34 -05:00
516dc6d1ff Merge pull request #9409 from rhatdan/size
podman ps --format '{{ .Size }}' requires --size option
2021-02-17 11:10:33 -05:00
2e522ff29c Merge pull request #9404 from rhatdan/entrypoint
Ignore entrypoint=[""]
2021-02-17 09:55:32 -05:00
aa7c7bde79 Merge pull request #9407 from giuseppe/downgrade-warning-to-debug
[NO TEST NEEDED] infra: downgrade warning to debug
2021-02-17 09:40:31 -05:00
e2d5a1d051 podman ps --format '{{ .Size }}' requires --size option
Podman -s crashes when the user specifies the '{{ .Size }}` format
on the podman ps command, without specifying the --size option.

This PR will stop the crash and print out a logrus.Error stating that
the caller should add the --size option.

Fixes: https://github.com/containers/podman/issues/9408

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-17 07:55:12 -05:00
d55d80a041 Merge pull request #9360 from riyad/add-missing-early-returns
Add missing early returns in compat API
2021-02-17 07:34:32 -05:00
12b6342c3d infra: downgrade warning to debug
if the current process could not be moved to a different systemd
cgroup do not raise a warning but debug message.

[NO TESTS NEEDED]
Closes: https://github.com/containers/podman/issues/9353

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-17 13:18:27 +01:00
12a577aea5 Ignore entrypoint=[\"\"]
We recieved an issue with an image that was built with
entrypoint=[""]
This blows up on Podman, but works on Docker.

When we setup the OCI Runtime, we should drop
entrypoint if it is == [""]

https://github.com/containers/podman/issues/9377

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-17 07:00:53 -05:00
6842907250 Bump github.com/sirupsen/logrus from 1.7.0 to 1.7.1
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.7.0...v1.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-17 06:53:31 -05:00
68a8d397ce Add missing early returns in compat API
[NO TESTS NEEDED]

Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2021-02-16 23:40:09 +01:00
50042120e9 Merge pull request #9240 from rhatdan/reset
Do not reset storage when running inside of a container
2021-02-16 17:11:26 -05:00
7bd1c1a297 Merge pull request #9367 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.13.1
Bump github.com/rootless-containers/rootlesskit from 0.13.0 to 0.13.1
2021-02-16 17:09:27 -05:00
fb6f143946 Merge pull request #9401 from rhatdan/stop
podman kill should report rawInput not container id
2021-02-16 16:08:26 -05:00
5d1ec2960d Do not reset storage when running inside of a container
Currently if the host shares container storage with a container
running podman, the podman inside of the container resets the
storage on the host. This can cause issues on the host, as
well as causes the podman command running the container, to
fail to unmount /dev/shm.

podman run -ti --rm --privileged -v /var/lib/containers:/var/lib/containers quay.io/podman/stable podman run alpine echo hello
	* unlinkat /var/lib/containers/storage/overlay-containers/a7f3c9deb0656f8de1d107e7ddff2d3c3c279c11c1635f233a0bffb16051fb2c/userdata/shm: device or resource busy
	* unlinkat /var/lib/containers/storage/overlay-containers/a7f3c9deb0656f8de1d107e7ddff2d3c3c279c11c1635f233a0bffb16051fb2c/userdata/shm: device or resource busy

Since podman is volume mounting in the graphroot, it will add a flag to
/run/.containerenv to tell podman inside of container whether to reset storage or not.

Since the inner podman is running inside of the container, no reason to assume this is a fresh reboot, so if "container" environment variable is set then skip
reset of storage.

Also added tests to make sure /run/.containerenv is runnig correctly.

Fixes: https://github.com/containers/podman/issues/9191

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 14:18:53 -05:00
7fb347a3d4 Merge pull request #9399 from vrothberg/home-sweet-home
do not set empty $HOME
2021-02-16 11:39:27 -05:00
958f901431 podman kill should report rawInput not container id
Docker always reports back the users input, not the full
id, we should do the same.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 09:47:38 -05:00
58a4793bec Merge pull request #9396 from rhatdan/stop
When stopping a container, print rawInput
2021-02-16 09:46:28 -05:00
aadb16da38 Merge pull request #9380 from baude/podinfra
Fix panic in pod creation
2021-02-16 09:25:28 -05:00
3eb2ce34dc Merge pull request #9397 from vrothberg/fix-9232
images/create: always pull image
2021-02-16 09:22:27 -05:00
759fc93343 Fix an issue where copyup could fail with ENOENT
This one is rather bizarre because it triggers only on some
systems. I've included a CI test, for example, but I'm 99% sure
we use images in CI that have volumes over empty directories, and
the earlier patch to change copy-up implementation passed CI
without complaint.

I can reproduce this on a stock F33 VM, but that's the only place
I have been able to see it.

Regardless, the issue: under certain as-yet-unidentified
environmental conditions, the copier.Get method will return an
ENOENT attempting to stream a directory that is empty. Work
around this by avoiding the copy altogether in this case.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-02-16 09:21:49 -05:00
6639b218a2 Merge pull request #9368 from vrothberg/fix-9365
podman build: pass runtime to buildah
2021-02-16 08:53:27 -05:00
0a6b76eba1 Merge pull request #9372 from matejvasek/fix_host_port
Docker [APIv2] create container: handle empty host port
2021-02-16 08:44:27 -05:00
271c5612e8 Merge pull request #9369 from vrothberg/startup-errors
correct startup error message
2021-02-16 08:41:26 -05:00