4237 Commits

Author SHA1 Message Date
7b4f6f573d When removing pods, free their locks
Without this we leak allocated locks, which is definitely not a
good thing.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-14 10:38:21 -04:00
04aa0d65b0 network: raise a clearer error when using CNI
print a clearer error message when an unprivileged user attempts to
create a network using CNI.

Closes: https://github.com/containers/libpod/issues/3118

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-14 15:37:47 +02:00
a261b60cc8 Merge pull request #3096 from edsantiago/varlink_usage
varlink: fix usage message, URI is now optional
2019-05-14 13:59:22 +02:00
797060f98a Merge pull request #3116 from mheon/fix_libpod_conf
Fix libpod.conf option ordering
2019-05-14 09:41:18 +02:00
8b3e2b049c Merge pull request #3101 from giuseppe/make-events-uppercase
podman: fix events help string
2019-05-13 22:13:49 +02:00
dd8bb2d088 Fix libpod.conf option ordering
Adding the journald configuration broke decoding the default
libpod.conf, because it was after the [runtimes] table (and was
being interpreted as a member of the table, and not the larger
config). We can't easily fix this on the TOML side, so our best
bet is to move it above the table and add a comment to try and
make sure this doesn't happen again.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-13 16:09:40 -04:00
ec382e4c8d Merge pull request #3083 from openSUSE/systemd-optional
Add `systemd` build tag
2019-05-13 20:40:19 +02:00
25415e0b0e Merge pull request #3103 from mheon/update_cgroups
Update containerd/cgroups to 4994991857f9b0ae
2019-05-13 20:23:21 +02:00
e0f1230565 Merge pull request #3093 from baude/healthcheckfixes
healthcheck benign error
2019-05-13 19:45:21 +02:00
a86aa4b1e9 split remote tests from distro tests
We want the remote tests for our distributions to be tested in a
different VM than the local tests.  This allows for faster CI runs and
easier debug as well as seperation of flakes.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-13 12:17:55 -05:00
6b15f01a61 varlink: fix usage message, URI is now optional
38199f4c made the URI argument to podman-varlink optional.
Fix the usage message to indicate this.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-05-13 08:26:14 -06:00
2ded1f6199 Merge pull request #2705 from adrianreber/ci-test
Enabling checkpoint/restore testing on Fedora >= 29 again
2019-05-13 15:58:39 +02:00
60d43effb0 Update containerd/cgroups to 4994991857f9b0ae
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-05-13 09:39:58 -04:00
c71761b9ba healthcheck benign error
clean up the reporting of a benign error that can occur when a container
is first stopped and then removed.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-13 08:33:51 -05:00
d1fc3fc702 Add systemd build tag
If the systemd development files are not present on the system which
builds podman, then `podman events` will error on runtime creation.
Beside this, a warning will be printed when compiling podman.

This commit mainly exists because projects which depend on libpod
would not need the podman event support and therefore do not need to
rely on the systemd headers.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-05-13 14:00:27 +02:00
0cb11dec44 podman: fix events help string
make it uppercase as all the other ones.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-13 10:48:20 +02:00
0e8f4ddaa9 rootless: default --cgroup-manager=systemd in unified mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-13 10:48:17 +02:00
42e65c57c2 create: skip resources validation with cgroup v2
skip resources validation when cgroup v2 is detected, as we don't
support it yet.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-13 10:48:17 +02:00
8e88461511 rootless, spec: allow resources with cgroup v2
We were always raising an error when the rootless user attempted to
setup resources, but this is not the case anymore with cgroup v2.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-13 10:48:16 +02:00
d2571c7fd4 Merge pull request #3105 from mheon/use_ctr_remove_funcs
Use standard remove functions for removing pod ctrs
2019-05-12 19:12:24 +02:00
c9c00ecd53 When removing a pod with CGroupfs, set pids limit to 0
When using CGroupfs, we see races during pod removal between
removing the CGroup and the cleanup process starting (in the
CGroup, thus preventing removal).

The simplest way to avoid this is to prevent the forking of the
cleanup process. Conveniently, we can do this via the CGroup that
we already created for Conmon - we just need to update the PID
limit to 0, which completely inhibits new forks.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-12 00:10:59 -04:00
9ae32214f4 Merge pull request #3068 from h-vetinari/master
Update installation instructions
2019-05-11 00:11:29 +02:00
952f8620b6 Add fix for an issue breaking our CI
Buildah no longer updates the create time of single-action images
(e.g. `FROM ...` with no other instructions. This isn't a bug (it
matches Docker's behavior), but it broke one of our tests.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-10 16:12:09 -04:00
5cbb3e7e9d Use standard remove functions for removing pod ctrs
Instead of rewriting the logic, reuse the standard logic we use
for removing containers, which is much better tested.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-10 14:14:29 -04:00
d54a2d2f81 Merge pull request #3041 from QiWang19/cpdash
implement cp reads tar file from stdin/to stdout
2019-05-09 19:35:53 +02:00
d8a065dab3 Merge pull request #3087 from jwhonce/wip/version
Add information when running `podman version` on client
2019-05-09 17:02:58 +02:00
4479b8eec3 implement cp reads tar file from stdin/stdout
enables podman cp uses - to stream a tar archive from STDIN or to STDOUT.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-09 10:12:39 -04:00
627dbd49c5 Merge pull request #3072 from mheon/no_rm_volume
Do not remove volumes when --rm removes a container
2019-05-08 23:03:55 +02:00
49e09ddbf5 Merge pull request #3042 from baude/bridge
add varlink bridge
2019-05-08 21:12:19 +02:00
d202e010af Add information when running podman version on client
* Include service version information and headers

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-05-08 11:29:03 -07:00
7b54ebb48f Merge pull request #3082 from mheon/pod_removal_reliability
Improve robustness of pod removal
2019-05-08 20:19:39 +02:00
38199f4c28 add varlink bridge
allow the user to define a remote host and remote username for their
remote podman sessions.  this is then feed to the varlink "bridge" as
the ssh credentials and endpoint.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-08 13:12:08 -05:00
64d1a357e8 Merge pull request #3085 from cevich/snuffleupagus
Add simple test to confirm bad command-line arguments
2019-05-08 18:21:34 +02:00
49406da9bd Add negative command-line test
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-08 11:04:37 -04:00
e9c78b4113 Preserve errors returned by removing pods
Ensure that, if an error occurs somewhere along the way when we
remove a pod, it's preserved until the end and returned, even as
we continue to remove the pod.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-07 21:44:04 -04:00
f5938be1f7 Improve robustness of pod removal
Removing a pod must first removal all containers in the pod.
Libpod requires the state to remain consistent at all times, so
references to a deleted pod must all be cleansed first.

Pods can have many containers in them. We presently iterate
through all of them, and if an error occurs trying to clean up
and remove any single container, we abort the entire operation
(but cannot recover anything already removed - pod removal is not
an atomic operation).

Because of this, if a removal error occurs partway through, we
can end up with a pod in an inconsistent state that is no longer
usable. What's worse, if the error is in the infra container, and
it's persistent, we get zombie pods - completely unable to be
removed.

When we saw some of these same issues with containers not in
pods, we modified the removal code there to aggressively purge
containers from the database, then try to clean up afterwards.
Take the same approach here, and make cleanup errors nonfatal.
Once we've gone ahead and removed containers, we need to see
pod deletion through to the end - we'll log errors but keep
going.

Also, fix some other small things (most notably, we didn't make
events for the containers removed).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-07 21:28:22 -04:00
83700a74f8 Merge pull request #3076 from baude/healthcheckman
podman-run|create man updates
2019-05-07 23:33:32 +02:00
74dc9a45e3 Merge pull request #2977 from baude/makeitrain
enable integration tests for remote-client
2019-05-07 22:21:36 +02:00
bc7b1ca03d enable integration tests for remote-client
first pass at enabling a swath of integration tests for the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 14:06:02 -05:00
2e40bdebfd Merge pull request #3080 from baude/remotepsnamespace
fix podman-remote ps --ns
2019-05-07 21:02:21 +02:00
7b67c9601e Merge pull request #3073 from mheon/force_lock_realloc
When refreshing after a reboot, force lock allocation
2019-05-07 19:50:54 +02:00
2dfb744d8c fix podman-remote ps --ns
the namespace for the remote client was being incorrectly derived from
the "remote" client.

fixes: #2938

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 12:38:58 -05:00
0e27212254 podman-run|create man updates
the healthcheck commands were not being specified in the man pages for
run and create.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 10:34:48 -05:00
3b5ac1818f Merge pull request #3074 from baude/checkoutpointmenu
remote-podman checkpoint and restore add to container submenu
2019-05-07 16:32:03 +02:00
fe2d074608 Update installation instructions
Signed-off-by: h-vetinari <h.vetinari@gmx.com>
2019-05-07 07:46:39 +02:00
0a5f6236f1 Merge pull request #3070 from baude/generatesystemdtests
add unit tests for generate systemd
2019-05-06 23:40:34 +02:00
d370f10efa remote-podman checkpoint and restore add to container submenu
the remote-podman checkpoint and restore commands were done some time
ago but for some reason not added to the container subcommand

Signed-off-by: baude <bbaude@redhat.com>
2019-05-06 14:54:02 -05:00
f881e32f12 Remove tests for deprecated podman-refresh command
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-06 15:26:54 -04:00
faae3a7065 When refreshing after a reboot, force lock allocation
After a reboot, when we refresh Podman's state, we retrieved the
lock from the fresh SHM instance, but we did not mark it as
allocated to prevent it being handed out to other containers and
pods.

Provide a method for marking locks as in-use, and use it when we
refresh Podman state after a reboot.

Fixes #2900

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-06 14:17:54 -04:00
b12d15637c Merge pull request #3048 from cevich/varlink_api_check
Cirrus: Add check for make varlink_api_generate
2019-05-06 19:58:30 +02:00