5964 Commits

Author SHA1 Message Date
8bc394ce6e Add the pod name when we use podman ps -p
The pod name does not appear when doing `podman ps -p`.
It is missing as the documentation says:
-p, --pod              Print the ID and name of the pod the containers are associated with

The pod name is added in the ps output and checked in unit tests.

Closes #4703

Signed-off-by: NevilleC <neville.cain@qonto.eu>
2019-12-28 00:03:57 +01:00
c759c3f78d Merge pull request #4742 from rhatdan/vendor
Update containers/storage to v1.15.4
2019-12-23 18:19:07 +01:00
d62fce0c87 Merge pull request #4743 from baude/imageresponse
add struct response for removal of images
2019-12-23 18:01:32 +01:00
d43bff7cc6 Merge pull request #4740 from edsantiago/zsh_completion_flagfix
zsh completion: ignore multi-line output in Flags
2019-12-23 18:01:25 +01:00
9bf7315882 Merge pull request #4697 from rhatdan/context
Set contextdir to current PWD if user did not specify a context dir.
2019-12-23 17:16:06 +01:00
4f09cfdacc add struct response for removal of images
when removing an image from storage, we should return a struct that
details what was untagged vs deleted.  this replaces the simple
println's used previously and assists in API development.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-23 10:02:14 -06:00
073f20d263 Update containers/storage to v1.15.4
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-23 10:19:13 -05:00
6dfffa92d9 Update containers/storage to v1.15.4
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-23 10:16:20 -05:00
3467f24fce zsh completion: ignore multi-line output in Flags
PR #4475 introduced an interesting twist on --help: a help
string that spans multiple lines. This broke zsh completion.

I'm not keen on that multi-line output, but it shouldn't
break completion. Fix is simple: look only for flag lines
beginning with '-', filter out anything else.

Fixes: #4738

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-23 06:28:49 -07:00
fcd48db4d2 Merge pull request #4708 from containers/dependabot/go_modules/github.com/containers/image/v5-5.1.0
build(deps): bump github.com/containers/image/v5 from 5.0.0 to 5.1.0
2019-12-20 17:39:45 +01:00
50ece79387 build(deps): bump github.com/containers/image/v5 from 5.0.0 to 5.1.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.0.0...v5.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-20 09:30:47 -05:00
e33d7e9fab Merge pull request #4727 from rhatdan/pidns
if container is not in a pid namespace, stop all processes
2019-12-20 12:13:22 +01:00
1ba6d0f883 Merge pull request #4722 from giuseppe/drop-arbitrary-limit
libpod: drop arbitrary memory limit of 4M
2019-12-19 19:57:58 +01:00
a359ca0d18 Merge pull request #4723 from mheon/pod_volume_postremove
Remove volumes after containers in pod remove
2019-12-19 19:37:00 +01:00
dde48b44e7 Merge pull request #4684 from vrothberg/systemd-improvements
container config: add CreateCommand
2019-12-19 19:36:52 +01:00
123b8c627d if container is not in a pid namespace, stop all processes
When a container is in a PID namespace, it is enought to send
the stop signal to the PID 1 of the namespace, only send signals
to all processes in the container when the container is not in
a pid namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-19 13:33:17 -05:00
6b956dfd1f Merge pull request #4730 from vrothberg/update-buildah
update c/buildah to v1.12.0
2019-12-19 19:20:16 +01:00
63bda55c1f update c/buildah to v1.12.0
Also bump docker/docker.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-19 18:17:23 +01:00
c1a7911f37 Merge pull request #4689 from edsantiago/bats
podman images history test - clean up
2019-12-19 15:13:29 +01:00
88917e4a93 Remove volumes after containers in pod remove
When trying to reproduce #4704 I noticed that the named volumes
from the Postgres containers in the reproducer weren't being
removed by `podman pod rm -f` saying that the container they were
attached to was still in use. This was rather odd, considering
they were only in use by one container, and that container was in
the process of being removed with the pod.

After a bit of tracing, I realized that the cause is the ordering
of container removal when we remove a pod. Normally, it's done
in removeContainer() before volume removal (which is the last
thing in that function). However, when we are removing a pod, we
remove containers all at once, after removeContainer has already
finished - meaning the container still exists when we try to
remove its volumes, and thus the volume can't be removed.

Solution: collect a list of all named volumes in use by the pod,
and remove them all at once after every container in the pod is
gone. This ensures that there are no dependency issues.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-17 21:41:31 -05:00
e6b843312b Merge pull request #4643 from adrianreber/master
Correctly export the root file-system changes
2019-12-17 18:08:36 +01:00
fab67f3393 Merge pull request #4487 from stefanb2/topic-pr-4477
docs: add workaround for --device with rootless containers
2019-12-17 16:38:00 +01:00
b7e6566906 libpod: drop arbitrary memory limit of 4M
drop the arbitrary limit of 4M for creating a container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-17 15:07:43 +01:00
1e440a3a3f Merge pull request #4681 from jvanz/issue4553
podman: mirror information
2019-12-17 14:05:15 +01:00
43292040ab Merge pull request #4701 from jvanz/opensuse-dep
install.md: openSUSE dependencies
2019-12-17 09:13:54 +01:00
aec62d2862 docs: add workaround for --device with rootless containers
Fixes #4477

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2019-12-17 08:34:12 +02:00
914cf0c760 install.md: openSUSE dependencies
Adds documentation about how to install dependencies on openSUSE

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2019-12-16 22:02:51 -03:00
11621836df Merge pull request #4714 from openSUSE/testflags
Allow the injection of TESTFLAGS
2019-12-16 21:00:23 +01:00
b2f05e0e84 Merge pull request #4710 from raukadah/systemdfix
Use systemd/sd-daemon.h headers for systemd presence
2019-12-16 17:55:58 +01:00
19064e5117 Merge pull request #4713 from openSUSE/remove-coverprofile
Remove coverprofile from the repository
2019-12-16 17:00:07 +01:00
b54c350a07 Use systemd/sd-daemon.h headers for systemd presence
Finding systemd devel packages using libsystemd does not work as
in RHEL based distro the package name is systemd-devel and for
deb/ubunutu it is libsystemd. It is also giving false result when
podman rpm is built with systemd but hack/systemd_tag.sh does not
return anything.

Install systemd-devel package in build_rpm.sh script

Moving to systemd/sd-daemon.h header files which comes from devel
packages fixes the issue.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-16 20:37:15 +05:30
25646a4b74 Allow the injection of TESTFLAGS
This allows to specify the tests to be run, for example when setting
`--focus='my-test-regex'`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-16 13:52:25 +01:00
72f35cf211 Remove coverprofile from the repository
The profile should not be part of the repo and is already in the
gitignore.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-16 13:49:16 +01:00
6c7b6d994a Merge pull request #4583 from nitrocode/patch-1
troubleshooting.md: added #19 not enough ids
2019-12-14 21:25:02 +01:00
a8460aa084 troubleshooting.md: rebased master and bumped 18 to 19
Signed-off-by: nitrocode <nitrocode@users.noreply.github.com>
2019-12-13 20:31:43 -05:00
885967faaa Merge pull request #4699 from mheon/fix_f31_migration
Fix F30-F31 migration for Podman 1.7.0
2019-12-13 21:19:34 +01:00
87194a6f79 Fix F30-F31 migration for Podman 1.7.0
The earlier attempt to re-add config migration only worked with
user-specified configs (podman run --config). This version works
more in line with that we want - the first rootless config file
will be changed from runc to crun.

Verified on my system after an F31 migration - everything seems
to be working well.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-13 13:51:39 -05:00
40f4a00eb3 runtime.go: show registries data and search table
Update podman info command to show the registries data and the search
table.

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2019-12-13 11:11:28 -03:00
437bc61f4e container config: add CreateCommand
Store the full command plus arguments of the process the container has
been created with.  Expose this data as a `Config.CreateCommand` field
in the container-inspect data as well.

This information can be useful for debugging, as we can find out which
command has created the container, and, if being created via the Podman
CLI, we know exactly with which flags the container has been created
with.

The immediate motivation for this change is to use this information for
`podman-generate-systemd` to generate systemd-service files that allow
for creating new containers (in contrast to only starting existing
ones).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-13 14:39:45 +01:00
22849ff43d Merge pull request #4682 from raukadah/hackpath
Fixed the path of hack scripts in spec file
2019-12-13 13:31:13 +01:00
71a0c0f69c Merge pull request #4692 from mheon/reap_exec_sessions
Reap exec sessions on cleanup and removal
2019-12-13 10:19:31 +01:00
5f6eea8a54 Fixed the path of hack scripts in spec file
While building the spec file on fedora, in rpmbuild log,
.sh: No such file or directory error is shown as full path of
hack directory is not resolved leading to file not found error.

Appending the builddir and libpod path with hack will fix the issue.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-13 12:20:37 +05:30
123e7ea568 Merge pull request #4690 from Foxboron/morten/fix-ldflags
[Makefile] `LDFLAGS` is reserved for the GCC linker
2019-12-13 01:05:27 +01:00
95d26e3f6f runtime.go: show search table in podman info
Updates the podman info command to show registries from v1 config file
in the search table format.

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2019-12-12 20:54:16 -03:00
1b99651720 podman info man: example update
Updates the command output example to show information about registries
and their mirrors

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2019-12-12 19:55:03 -03:00
4f9672e94c podman: mirror information
Updates the podman info command to show the mirror information

Issue https://github.com/containers/libpod/issues/4553

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2019-12-12 19:53:46 -03:00
bd44fd5c81 Reap exec sessions on cleanup and removal
We currently rely on exec sessions being removed from the state
by the Exec() API itself, on detecting the session stopping. This
is not a reliable method, though. The Podman frontend for exec
could be killed before the session ended, or another Podman
process could be holding the lock and prevent update (most
notable in `run --rm`, when a container with an active exec
session is stopped).

To resolve this, add a function to reap active exec sessions from
the state, and use it on cleanup (to clear sessions after the
container stops) and remove (to do the same when --rm is passed).
This is a bit more complicated than it ought to be because Kata
and company exist, and we can't guarantee the exec session has a
PID on the host, so we have to plumb this through to the OCI
runtime.

Fixes #4666

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-12 16:35:37 -05:00
1df8a4b467 [Makefile] LDFLAGS is reserved for the GCC linker
The env variable `LDFLAGS` belongs to the gcc linker, while the Makefile
currently expects these to be valid go compiler flags. Move them to
`-extldflags` as appropriate. The equivalent flag in go is
`CGO_LDFLAGS`.

Ensure test files are also using `LDFLAGS_PODMAN` instead of `LDFLAGS`.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2019-12-12 17:09:00 +01:00
ebc4ae660d podman images history test - clean up
As initially written the test does not work other than in
a CI environment because it relies on an empty tag history.
Rewrite so we can guarantee that, by creating a new image.

Also add slightly more helpful tests: the initial tests
would just show "expected 0, got 1" which is unhelpful.
Tweak so we test on actual history contents, which will
show more informative messages on failure.

And, finally, clean up after ourselves.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-12 08:56:44 -07:00
16de498f0a Merge pull request #4491 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.20.1+incompatible
build(deps): bump github.com/uber/jaeger-client-go from 2.20.0+incompatible to 2.20.1+incompatible
2019-12-12 16:23:50 +01:00