Commit Graph

5980 Commits

Author SHA1 Message Date
Matthew Heon 9090c476f7 Bump to v1.7.0-rc2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-01-02 15:00:37 -05:00
OpenShift Merge Robot 1faa5bb6cd
Merge pull request #4776 from mheon/release_notes_v1.7.0_rc2
Update release notes with further changes from 1.7.0
2020-01-02 20:43:04 +01:00
Matthew Heon fcca557104 Update release notes with further changes from 1.7.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-01-02 13:38:10 -05:00
OpenShift Merge Robot 6a370cbbc7
Merge pull request #4757 from baude/networkrefactor
refactor network commands
2019-12-31 12:54:06 +01:00
baude 93350b9e9f refactor network commands
move core of network commands from pkg/adapter to pkg/network to assist
with api development and remote podman commands.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-29 11:18:49 -06:00
OpenShift Merge Robot 9e03aa14b6
Merge pull request #4748 from NevilleC/nc-podname
[Issue #4703] Add the pod name when we use `podman ps -p`
2019-12-29 12:16:43 +01:00
OpenShift Merge Robot fa551fd16d
Merge pull request #4756 from edsantiago/fix_kill_test_hang_safely
Fix race condition in kill test leading to hang
2019-12-29 12:03:57 +01:00
OpenShift Merge Robot 6897a1f5c2
Merge pull request #4754 from NevilleC/nc-improvemakeuninstall
Ensure 'make uninstall' removes bin and conf files.
2019-12-28 20:39:58 +01:00
Ed Santiago 0f78f345d9 Fix race condition in kill test leading to hang
When you open a FIFO for reading, but there's no writer, you hang.
This is just one of those obscure UNIXisms we all know but just
forget all too often.

My last PR was guilty of introducing such a condition; I caught
it by accident while testing other stuff. In short, the signal
container was doing 'echo DONE' as its last step, and we (BATS)
were reading the FIFO to check for it; but if the container
exited before we opened the FIFO for read, the open would hang.
This is not a hang that we can catch in the test: it would hang
the entire job forever. CI would presumably time out eventually,
but with no useful indication of the cause of the error.

Solution: use 'exec' to open the FIFO early and keep it open,
and use 'read -u FD' instead of 'read <$fifo': the former
reads from an open FD, the latter forces a new open() each time.

There is a shorter, more maintainable solution -- see #4755 -- but
that suffers from the same hanging problem in the (unlikely) case
where the signal-handling container exits, e.g. if signal handling
is broken in podman. The test would hang, with no helpful indicator.
Although this PR is a little more advanced scripting, I have
commented the relevant code well and believe the maintenance
cost is worth the risk of undebuggable hangs.

There is still a hang risk: if 'podman logs -f' fails and exits
immediately, the 'exec' will hang. I can't think of a non-racy
way to prevent that, and choose to live with that risk.

Tested by temporarily including 9 (SIGKILL) in the signals list.
The read timeout triggers, and the end user has a fair chance
of tracking down the root cause.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-28 08:00:05 -07:00
OpenShift Merge Robot 24b4921508
Merge pull request #4753 from NevilleC/nc-missingsize
Ensure SizeRw is shown when a user does 'inspect --size -t container'.
2019-12-28 12:35:23 +01:00
Neville Cain 6441324192 Ensure 'make uninstall' remove bin and conf files.
I updated the 'make uninstall' command to remove:
1. podman and remote bin
2. cni/net.d/87-podman-bridge.conflist
3. podman.conf
4. systemd conf files: io.podman.socket.*

Closes #4572

Signed-off-by: Neville Cain <neville.cain@qonto.eu>
2019-12-28 02:26:38 +01:00
Neville Cain 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
Neville Cain 2a5c235f78 Ensure SizeRw is shown when a user does 'inspect --size -t container'.
Currently, if a user requests the size on a container (inspect --size -t container),
the SizeRw does not show up if the value is 0. It's because InspectContainerData is
defined as int64 and there is an omit when empty.

We do want to display it even if the value is empty. I have changed the type of SizeRw to be a pointer to an int64 instead of an int64. It will allow us todistinguish the empty value to the missing value.

I updated the test "podman inspect container with size" to ensure we check thatSizeRw is displayed correctly.

Closes #4744

Signed-off-by: NevilleC <neville.cain@qonto.eu>
2019-12-27 23:49:34 +01:00
OpenShift Merge Robot 269b173496
Merge pull request #4749 from edsantiago/parse_and_validate_signal
signal parsing - better input validation
2019-12-27 14:59:37 +01:00
OpenShift Merge Robot 55922e3670
Merge pull request #4751 from mheon/quiet_template_noconflict
The --quiet flag does not conflict with templates in ps
2019-12-27 14:44:59 +01:00
Ed Santiago 40f55ca3fe signal parsing - better input validation
The helper function we use for signal name mapping does not
check for negative numbers nor invalid (too-high) ones. This
can yield unexpected error messages:

   # podman kill -s -1 foo
   ERRO[0000] unknown signal "18446744073709551615"

This PR introduces a small wrapper for it that:

  1) Strips off a leading dash, allowing '-1' or '-HUP'
     as valid inputs; and
  2) Rejects numbers <1 or >64 (SIGRTMAX)

Also adds a test suite checking signal handling as well as
ensuring that invalid signals are rejected by the command line.

Fixes: #4746

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-26 16:50:21 -07:00
Matthew Heon 25860df878 The --quiet flag does not conflict with templates in ps
To match Docker behavior, make `--quiet` and `--format` with a Go
template not conflict. Instead, just turn off `--quiet` in such
cases, as we'll be using Go template output instead.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-26 17:45:55 -05:00
OpenShift Merge Robot c759c3f78d
Merge pull request #4742 from rhatdan/vendor
Update containers/storage to v1.15.4
2019-12-23 18:19:07 +01:00
OpenShift Merge Robot d62fce0c87
Merge pull request #4743 from baude/imageresponse
add struct response for removal of images
2019-12-23 18:01:32 +01:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
baude 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
Daniel J Walsh 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
Daniel J Walsh 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
Ed Santiago 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
OpenShift Merge Robot 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
Daniel J Walsh 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
OpenShift Merge Robot dde48b44e7
Merge pull request #4684 from vrothberg/systemd-improvements
container config: add CreateCommand
2019-12-19 19:36:52 +01:00
Daniel J Walsh 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
OpenShift Merge Robot 6b956dfd1f
Merge pull request #4730 from vrothberg/update-buildah
update c/buildah to v1.12.0
2019-12-19 19:20:16 +01:00
dependabot-preview[bot] 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
OpenShift Merge Robot c1a7911f37
Merge pull request #4689 from edsantiago/bats
podman images history test - clean up
2019-12-19 15:13:29 +01:00
Matthew Heon 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
OpenShift Merge Robot e6b843312b
Merge pull request #4643 from adrianreber/master
Correctly export the root file-system changes
2019-12-17 18:08:36 +01:00
OpenShift Merge Robot 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
Giuseppe Scrivano 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
OpenShift Merge Robot 1e440a3a3f
Merge pull request #4681 from jvanz/issue4553
podman: mirror information
2019-12-17 14:05:15 +01:00
OpenShift Merge Robot 43292040ab
Merge pull request #4701 from jvanz/opensuse-dep
install.md: openSUSE dependencies
2019-12-17 09:13:54 +01:00
Stefan Becker 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
José Guilherme Vanz 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
OpenShift Merge Robot 11621836df
Merge pull request #4714 from openSUSE/testflags
Allow the injection of TESTFLAGS
2019-12-16 21:00:23 +01:00
OpenShift Merge Robot 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
OpenShift Merge Robot 19064e5117
Merge pull request #4713 from openSUSE/remove-coverprofile
Remove coverprofile from the repository
2019-12-16 17:00:07 +01:00
Chandan Kumar (raukadah) 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
Sascha Grunert 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
Sascha Grunert 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
OpenShift Merge Robot 6c7b6d994a
Merge pull request #4583 from nitrocode/patch-1
troubleshooting.md: added #19 not enough ids
2019-12-14 21:25:02 +01:00