4477 Commits

Author SHA1 Message Date
9d49bda8f1 Merge pull request #3451 from ashley-cui/unmount
Remove umount command from remote client.
2019-06-28 18:06:30 +02:00
5e42bf0717 Merge pull request #3397 from giuseppe/fix-reboot
rootless: enable linger if /run/user/UID not exists
2019-06-28 16:00:55 +02:00
4aa109f00e Merge pull request #3448 from vrothberg/turnoffmod
Makefile: set GO111MODULE=off
2019-06-28 02:50:10 +02:00
48904026ea Merge pull request #3452 from QazerLab/bugfix/pause-sigterm
Exclude SIGTERM from blocked signals for pause process.
2019-06-28 00:10:11 +02:00
7ea7754e4a Exclude SIGTERM from blocked signals for pause process.
Currently pause process blocks all signals which may cause its
termination, including SIGTERM. This behavior hangs init(1) during
system shutdown, until pause process gets SIGKILLed after some grace
period. To avoid this hanging, SIGTERM is excluded from list of blocked
signals.

Fixes #3440

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
2019-06-28 00:18:13 +03:00
93d3eb30a8 Remove umount command from remote client.
Since there is no mount command, it does not make sense to have umount.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-06-27 16:52:56 -04:00
7255468e65 rootless: enable linger if /run/user/UID not exists
at least on Fedora 30 it creates the /run/user/UID directory for the
user logged in via ssh.

This needs to be done very early so that every other check when we
create the default configuration file will point to the correct
location.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 16:34:35 +02:00
9697b0d91f Makefile: set GO111MODULE=off
Turn of go modules to avoid breaking build environments to accidentally
try pulling the dependencies instead of using the ./vendor directory.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-27 16:24:16 +02:00
0906b32087 Merge pull request #3442 from baude/removelibpodfrommainphase2
libpod removal from main (phase 2)
2019-06-27 16:01:45 +02:00
5e3d63a53c Merge pull request #3446 from giuseppe/fix-rootless-conf
rootless: use the correct conf file
2019-06-27 15:15:38 +02:00
8561b99644 libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-27 07:56:24 -05:00
7e3c27eb9d runtime: do not attempt to use global conf file
we had a regression where the rootless user tried to use the global
configuration file.  We should not try to use the global configuration
when running in rootless but only cherry-pick some settings from there
when creating the file for the first time.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 14:22:51 +02:00
bfcf0292de runtime: use GetRootlessUID() to get rootless uid
otherwise it won't work in a user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-27 13:52:36 +02:00
fccf4ad503 Merge pull request #3193 from cevich/check_image
Cirrus: More tests to verify cache_images
2019-06-27 03:31:35 +02:00
7705f99fe6 Merge pull request #3429 from cevich/strip_crio_conmon
Remove refs to crio/conmon
2019-06-27 03:05:33 +02:00
c06d9898f9 Merge pull request #3420 from ashley-cui/remoteconf
Fix crash for when remote host IP or Username is not set in conf file…
2019-06-26 22:25:34 +02:00
fc32439c29 Remove refs to crio/conmon
Conmon has moved out of cri-o and into it's own dedicated repository.
This commit updates configuration and definitions which referenced
the old cri-o based paths.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-26 12:44:22 -04:00
58a1777f51 Merge pull request #3374 from giuseppe/cgroups
cgroups: add initial support for cgroups v2
2019-06-26 15:25:19 +02:00
da1ef2bdfd Merge pull request #3435 from mheon/fix_tmpfs_options
Fix parsing of the --tmpfs option
2019-06-26 15:07:22 +02:00
e7bf780d5a Merge pull request #3438 from openSUSE/module
Remove unnecessary blackfriday dependency
2019-06-26 14:22:13 +02:00
e27fef335a stats: fix cgroup path for rootless containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:06 +02:00
1778bfa5fe pkg, cgroups: add initial support for cgroup v2
This is an initial implementation of cgroup v2 support for
pkg/cgroups.  It currently works with crun, with this patch:
https://github.com/giuseppe/crun/pull/49).

It adds the pieces for:

- set PID limit to 1
- retrieve stats so that "podman stats" work.

the only missing part is the support for reading per
CPU stats (that is cpuacct.usage_percpu on cgroup v1), so for now it
always returns an empty result.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-26 13:17:05 +02:00
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
0ff622ee63 Remove unnecessary blackfriday dependency
The version of blackfriday is causing that we cannot build go-md2man any
more within CRI-O. This commit removes the dependency since is not
needed at all.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-06-26 12:54:51 +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
77f2e8467a Fix parsing of the --tmpfs option
With StringSlice, we're seeing individual options added and
parsed separately, so `tmpfs:nosuid,nodev` turns into three tmpfs
mounts passed into pkg/sec (tmpfs:, nosuid, nodev). Swap to
StringArray to tell cobra this can't be split on commas.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-25 18:06:00 -04:00
bf5686739c Fix crash for when remote host IP or Username is not set in conf file & conf file exists.
When Host IP is not set in podman-remote.conf, error is printed out.
When Username is not set in podman-remote.conf, default username is used.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-06-25 16:10:42 -04: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
cd78825be7 Cirrus: More tests to verify cache_images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-25 15:45:12 -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