Commit Graph

70 Commits

Author SHA1 Message Date
Darren Stahl
e6280a7c82 Enable integration tests on Windows using snapshotter and differ
Signed-off-by: Darren Stahl <darst@microsoft.com>
2018-01-23 15:25:17 -08:00
Phil Estes
f47f6af585
Remove unnecessary subreaper API from sys/
Given these same exact functions are both now available in
opencontainers/runc (libcontainer/system) package, and we only use the
`SetSubreaper` today from the shim, there seems to be no reason for
duplication.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2018-01-23 10:30:29 -05:00
Daniel Nephin
184bc25629 Add unconvert linter
This linter checks for unnecessary type convertions.

Some convertions are whitelisted because their type is different
on 32bit platforms

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-01-09 17:36:44 -05:00
Daniel Nephin
f9e969bac8 Use gometalinter for linting
gometalinter runs linters in parallel for faster linting
it provides a uniform way of whitelisting lines using // nolint or the exclude
field in the config

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-03 18:02:27 -04:00
Michael Crosby
1d298c89a4 Fix windows lint issues and enable ci
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 16:15:45 -04:00
Michael Crosby
b6e0c4f321 Fix go lint errors
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 15:26:44 -04:00
Michael Crosby
9956fa4b33 Remove solaris files
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-24 15:35:12 -04:00
Edward Pilatowicz
56c1f5c184 Add solaris build support
Signed-off-by: Edward Pilatowicz <edward.pilatowicz@oracle.com>
2017-08-07 12:40:21 -07:00
Tobias Klauser
bfa4b901a1 Use Prctl() and associated constants from x/sys/unix
Use unix.Prctl() instead of manually reimplementing it using
unix.RawSyscall. Also use unix.PR_SET_CHILD_SUBREAPER
unix.PR_GET_CHILD_SUBREAPER instead of locally defining them.

Also fix the package name form 'osutils' to 'sys' in the package level
comment.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-07-19 10:30:12 +02:00
Derek McGowan
528a9d87ac
Create socket parent directory with correct permissions
Often the socket is put into the directory /run/containerd.
When this directory does not exist, it gets created with the
default uid/gid and permission 0660. When the user has specified
a uid or gid, this should be used to set the ownership of that
parent directory and the permissions should be 0770. This worked
in a previous version of containerd but regressed after a refactor.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-17 13:08:02 -07:00
Lei Jitang
435f03d237 Remove C implementation of epoll on arm64
`"golang.org/x/sys/unix"` support epoll on arm64
with 324e137580
There is no need a C implementation of epoll on arm64.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-05-26 13:30:57 -04:00
Derek McGowan
4cb0839e41 Ensure grpc socket is group writable
Updates the filemode on the grpc socket to have group write
permission which is needed to perform GRPC. Additionally, ensure
the run directory has the specified group ownership and has group
read and enter permission.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-04-26 14:40:36 -07:00
Michael Crosby
634f0c0c83 Set oom score for containerd and shims
This adds a config option to set the oom score for the containerd daemon
as well as automatically setting the oom score for the shim's lauched so
that they are not killed until the very end of an out of memory
condition.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-12 11:34:32 -07:00
Michael Crosby
3db1ea8d07 [bin] Replace syscall with /x/sys/unix
Replace syscall usage with /sys/unix in the binaries and their packages

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-10 12:01:33 -07:00
Kenfe-Mickael Laventure
c5843b7615 Initial windows runtime work
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-07 09:20:44 -07:00
unclejack
d2a6630658 utils: remove utils & migrate code to sys
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2017-03-29 21:25:02 +03:00
Akihiro Suda
6089c1525b new package: compression (ported from docker/pkg/archive)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-16 05:29:27 +00:00
kevinetc123
6425680d94 use bitclear instead of seperating them and fix some typo
Signed-off-by: kevinetc123 <kaiwentan@harmonycloud.cn>
2017-02-09 17:30:21 +08:00
Michael Crosby
51510a8806 Move osutil to sys package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-29 15:38:24 -08:00
Michael Crosby
789ff967c1 Move epoll to sys package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-29 15:37:06 -08:00