4451 Commits

Author SHA1 Message Date
5d25a4793d util: drop IsCgroup2UnifiedMode and use it from cgroups
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:04 +02:00
d841d088a4 vendor: drop github.com/containerd/cgroups
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:03 +02:00
72cf0c81e8 libpod: use pkg/cgroups instead of containerd/cgroups
use the new implementation for dealing with cgroups.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:02 +02:00
fa18693813 pkg: new package cgroups
provide a package for managing cgroups.  This is not supposed to be a
complete implementation with all the features supported by cgroups,
but it is a minimal implementation designed around what libpod needs
and it is currently using.

For example, it is currently possible to Apply only the pids limit,
as it is used by libpod for stopping containers, any other Apply will
just fail.

The main goal here is to have a minimal library where we have full
control, so we can start playing with cgroup v2.

When the need arises, we can add more features.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:01 +02:00
c9078936dd Merge pull request #3419 from baude/removelibpodfrommainphase1
remove libpod from main
2019-06-26 02:36:06 +02:00
fbf5e80337 Merge pull request #3430 from mheon/bump-1.4.3
Bump to v1.4.3
2019-06-26 00:21:06 +02:00
cc53adaf41 Merge pull request #3428 from mheon/release_notes_1.4.3
Update release notes for 1.4.3 release
2019-06-25 21:55:37 +02:00
9cb7586eef Bump gitvalidation epoch
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-25 15:46:02 -04:00
5f21858ae3 Bump to v1.4.4-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-25 15:46:02 -04:00
7fd65288f1 Bump to v1.4.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
v1.4.3
2019-06-25 15:45:58 -04:00
5b7086abda Merge pull request #3418 from vrothberg/go-modules
update dependencies
2019-06-25 21:40:38 +02:00
0dfbef87e9 Update release notes for 1.4.3 release
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 14:53:17 -04:00
dd81a44ccf remove libpod from main
the compilation demands of having libpod in main is a burden for the
remote client compilations.  to combat this, we should move the use of
libpod structs, vars, constants, and functions into the adapter code
where it will only be compiled by the local client.

this should result in cleaner code organization and smaller binaries. it
should also help if we ever need to compile the remote client on
non-Linux operating systems natively (not cross-compiled).

Signed-off-by: baude <bbaude@redhat.com>
2019-06-25 13:51:24 -05:00
a488e197a6 Merge pull request #3417 from mheon/fix_play_kube_ports
Only include ports in one container in Kube YAML
2019-06-25 20:21:24 +02:00
068d3bb3bf Update 'generate kube' tests to verify YAML
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 12:34:53 -04:00
101a5cd755 Use a different method to retrieve YAML output in tests
OutputToString() was mangling newlines, which made YAML parsers
very, very angry. But not angry enough to actually error, that
would be too easy. Just angry enough to silently not decode
anything.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 11:10:50 -04:00
21978c9908 Merge pull request #3332 from rhatdan/cgroupmanager
Correctly identify the defaults for cgroup-manager
2019-06-25 14:54:28 +02:00
d8b18a9879 Merge pull request #3401 from mheon/templating_is_dumb
Fix inspect --format '{{.Mounts}}.
2019-06-25 00:20:25 +02:00
394e12aa65 Merge pull request #3391 from QiWang19/cp_file
fix bug creats directory copying file
2019-06-24 23:49:57 +02:00
2388222e98 update dependencies
Ran a `go get -u` and bumped K8s deps to 1.15.0.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 21:29:31 +02:00
79d835457d Fix tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 15:27:37 -04:00
803a2b04d1 Change Marshal -> Unmarshal in generate kube tests
We need to verify that valid YAML was produced - Marshal will
just pack the generated YAML even further.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:56:41 -04:00
567e7c60fa Add test for generate kube on a pod with ports
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:45:07 -04:00
ebf48ff459 Only include ports in one container in Kube YAML
This likely broke when we made containers able to detect that
they shared a network namespace and grab ports from the
dependency container - prior to that, we could grab ports without
concern for conflict, only the infra container had them. Now, all
containers in a pod will return the same ports, so we have to
work around this.

Fixes #3408

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:27:47 -04:00
2d9f1e95eb Support aliases for .Src and .Dst in inspect .Mounts
This provides backwards compatability with 1.4.0-1.4.2 releases
which name .Source and .Destination as .Src and .Dst - useful for
not breaking toolbox.

Also add a test.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 14:08:25 -04:00
a1a4a75abe Merge pull request #3412 from mheon/fix_ps_sync_segfault
Fix a segfault in 'podman ps --sync'
2019-06-24 18:36:20 +02:00
72260a296c Merge pull request #3414 from vrothberg/go-modules
Go modules
2019-06-24 16:52:02 +02:00
cf244d87cd Merge pull request #3398 from haircommander/conmon-hotfix
Update conmon to include attach socket unlink
2019-06-24 15:50:39 +02:00
de75b1a277 Fix a segfault in 'podman ps --sync'
We weren't properly populating the container's OCI Runtime in
Batch(), causing segfaults on attempting to access it. Add a test
to make sure we actually catch cases like this in the future.

Fixes #3411

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-24 09:26:03 -04:00
d697456dc9 migrate to go-modules
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 13:20:59 +02:00
33280d881e Merge pull request #3406 from giuseppe/slirp-entry-to-hosts
rootless: add an entry to /etc/hosts when using slirp4netns
2019-06-24 12:53:11 +02:00
a3211b73c6 Makefile: add go-get function
Add a `go-get` function to the Makefile to wrap `go get -u` into a
wrapper disabling go modules.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 11:15:31 +02:00
bd5e113b71 rootless: add an entry to /etc/hosts when using slirp4netns
Closes: https://github.com/containers/libpod/issues/3405

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-24 10:12:33 +02:00
b611ac1c50 Merge pull request #3404 from QazerLab/docs/rootless-tutorial
Fix configs location in rootless tutorial.
2019-06-23 15:40:51 +02:00
7c4e4449b0 Merge pull request #3409 from giuseppe/add-crun
libpod.conf: add runtime crun
2019-06-23 03:05:50 +02:00
632c12cff1 libpod.conf: add runtime crun
now that crun is available as a Fedora package, we can add an entry to
the default libpod.conf so that it is easier to use it just by using
--runtime crun to Podman.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-22 21:12:08 +02:00
5787f88042 Merge pull request #3399 from astronouth7303/patch-1
Add /usr/local/{s,}bin to conmon paths
2019-06-22 12:18:06 +02:00
ddba0e6964 Merge pull request #3400 from haircommander/install-hotfix
include make podman target in install instructions
2019-06-22 12:08:06 +02:00
d9bdd3c1e0 Merge pull request #3403 from mheon/more_lock_debugging
Add additional debugging when refreshing locks
2019-06-22 04:24:11 +02:00
80440408ad Fix configs location in rootless tutorial.
Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-06-22 02:20:44 +03:00
c233a12772 Add additional debugging when refreshing locks
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 16:00:39 -04:00
7625d28c82 Fix gofmt
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:25:06 -04:00
7d76548b41 Adjust names to match struct tags in Inspect
In Go templating, we use the names of fields, not the JSON struct
tags. To ensure templating works are expected, we need the two to
match.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:09:59 -04:00
778a634daa Fix inspect --format '{{.Mounts}}.
Go templating is incapable of dealing with pointers, so when we
moved to Docker compatible mounts JSON, we broke it. The solution
is to not use pointers in this part of inspect.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-21 15:00:30 -04:00
e2b0587c21 runtime.go: Add /usr/local/{s,}bin
Signed-off-by: Jamie Bliss <jamie@ivyleav.es>
2019-06-21 14:38:29 -04:00
3a0d9516ba include make podman target in install instructions
now that podman ships conmon >=0.3.0

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 14:38:25 -04:00
00a7d2067e Add /usr/local/{s,}bin to conmon paths
This is one of the default installation paths in conmon

Signed-off-by: Jamie Bliss <jamie@ivyleav.es>
2019-06-21 14:00:02 -04:00
a06bb80b4b update cirrus image
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 11:39:29 -04:00
aa21ec158a Merge pull request #3392 from mheon/missing_periods
Add some missing periods to the readme
2019-06-21 17:11:12 +02:00
284208a238 Update conmon to include attach socket unlink
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 10:55:24 -04:00