Commit Graph

2903 Commits

Author SHA1 Message Date
fate-grand-order
d3d1987fe0 correct some misspellings to make Go Report more happy
Signed-off-by: Helen <chenjg@harmonycloud.cn>
2017-07-19 17:31:14 +08:00
Sunny Gogoi
4dc02c09e7 cmd/ctr: add mount subcmd to snapshot & a flag in prepare
This changeset:
- adds `mount` subcommand to `ctr snapshot`
- adds `snapshot-name` flag for specifying target snapshot name in both `mount`
and `prepare` snapshot subcommands

Signed-off-by: Sunny Gogoi <me@darkowlzz.space>
2017-07-19 14:47:35 +05:30
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
Jovi Zhangwei
50c84c4d43 Claim Go 1.8.x version requirement in BUILDING.md
Signed-off-by: Jovi Zhangwei <zw.xianwei@alibaba-inc.com>
2017-07-19 02:50:28 -04:00
Akihiro Suda
e76357cb57 btrfs: improve an error string
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-19 04:09:42 +00:00
Derek McGowan
a8504277cc Merge pull request #1209 from stevvooe/remove-errors
linux, linux/shim: remove error definitions
2017-07-18 19:18:23 -07:00
Derek McGowan
23aa4910c0
Use forked archive/tar package
Use fork of archive/tar to carry changes to tar for
all go versions.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-18 18:32:44 -07:00
Derek McGowan
60792458a3
Replace uses of filepath.Join in Apply
Replace cases where a tar specified name is joined to a directory
with root path to bound name to path.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-18 18:30:21 -07:00
Stephen Day
35d590048f Merge pull request #1207 from mlaventure/update-linux-events-topic
Update linux events topic
2017-07-18 18:25:32 -07:00
Stephen J Day
1ecb2ea30d
linux/shim: remove redundant topic prefix
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-18 18:19:25 -07:00
Stephen Day
8d19513267 Merge pull request #1195 from darkowlzz/tree
cmd/ctr: add tree subcommand in snapshot
2017-07-18 18:14:07 -07:00
Stephen J Day
e3a07b5673
Makefile: no need to build protos binary
For the standard make target, there is no need to build the protoc
plugin binary. This can be built automatically in response to the `make
protos` target.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-18 17:16:03 -07:00
Stephen J Day
6d0bcd5aec
linux, linux/shim: remove error definitions
Since we now have a common set of error definitions, mapped to existing
error codes, we no longer need the specialized error codes used for
interaction with linux processes. The main issue was that string
matching was being used to map these to useful error codes. With this
change, we use errors defined in the `errdefs` package, which map
cleanly to GRPC error codes and are recoverable on either side of the
request.

The main focus of this PR was in removin these from the shim. We may
need follow ups to ensure error codes are preserved by the `Tasks`
service.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-18 15:56:49 -07:00
Derek McGowan
4a3f98cb61
Add link breakout checks and tests
Ensure symlinks cannot be used to breakout of unpack directory.
Evaluate absolute symlinks as scoped to unpack directory.
Allow symlinks which point outside the root to be created.
Scope all resolution of symlinks to the unpack directory.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-18 12:16:13 -07:00
Phil Estes
805654abc7 Merge pull request #1178 from rajasec/ctr-run-error
Fixing return error on run command
2017-07-18 14:33:54 -04:00
rajasec
728f8accc6 Fixing return error on run command
Signed-off-by: rajasec <rajasec79@gmail.com>

Updating the usage and errors for ctr run command

Signed-off-by: rajasec <rajasec79@gmail.com>

Updating the usage of run command

Signed-off-by: rajasec <rajasec79@gmail.com>

Reverting back the imports

Signed-off-by: rajasec <rajasec79@gmail.com>
2017-07-19 21:31:27 +05:30
Phil Estes
123aab86c0 Merge pull request #1202 from stevvooe/add-go-report-card
README: add go report card badge
2017-07-18 09:46:17 -04:00
Phil Estes
59b0fc31b8 Merge pull request #1204 from fate-grand-order/typo
fix some typos for reference/reference.go
2017-07-18 09:45:35 -04:00
Kenfe-Mickael Laventure
e4beb7c554
Use constants for runtime event topics
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-18 14:19:48 +02:00
Kenfe-Mickael Laventure
a578730a94
Update linux events topic
This also remove the duplicate events for Task{Create,Start,Delete}

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-18 13:47:28 +02:00
Akihiro Suda
7822819f32 .travis.yml: run go build -i
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-18 10:20:21 +00:00
fate-grand-order
58dfd56ab7 fix some typos for reference/reference.go
Signed-off-by: Helen Chen <chenjg@harmonycloud.cn>
2017-07-18 16:10:03 +08:00
Kenfe-Mickaël Laventure
4888d40ac7 Merge pull request #1203 from stevvooe/containerd-startup-version
cmd/containerd: show version and revision on startup
2017-07-18 08:39:33 +02:00
Sunny Gogoi
659e3d789c cmd/ctr: add tree subcommand in snapshot
Signed-off-by: Sunny Gogoi <me@darkowlzz.space>
2017-07-18 09:38:40 +05:30
Stephen J Day
6cfdbb2acd
README: add go report card badge
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-17 17:41:02 -07:00
Stephen J Day
2a923f72e5
cmd/containerd: show version and revision on startup
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-17 16:57:32 -07:00
Derek McGowan
6d305c741e Merge pull request #1200 from stevvooe/image-is-found
cmd/ctr: container list should not look up image
2017-07-17 16:14:43 -07:00
Stephen J Day
778b1f1c0c
cmd/ctr: container list should not look up image
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-17 14:51:36 -07:00
Stephen Day
52927e59ae Merge pull request #1199 from dmcgowan/socket-directory-permissions
Create socket parent directory with correct permissions
2017-07-17 14:04:06 -07: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
Stephen Day
afd533de33 Merge pull request #1197 from dmcgowan/fix-snapshot-client-panic
Fix panic in snapshotter client when connection fails
2017-07-17 11:51:50 -07:00
Derek McGowan
fb7af3025d Merge pull request #1198 from stevvooe/mark-ociimageconfig-childleess
images: OCI image config is a childless data type
2017-07-17 11:29:30 -07:00
Stephen J Day
9f654b0830
images: OCI image config is a childless data type
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-17 11:17:35 -07:00
Derek McGowan
a220fb6b1f
Fix panic in snapshotter when connection fails
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-17 10:55:32 -07:00
Derek McGowan
81b893ace4 Merge pull request #1194 from AkihiroSuda/nit-comment
comment: dist -> ctr
2017-07-16 21:48:45 -07:00
Akihiro Suda
a0664b5ce5 comment: dist -> ctr
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-16 14:45:56 +00:00
Derek McGowan
e48ef84b20 Merge pull request #1190 from stevvooe/remove-dist-command
cmd/dist: completely remove dist command
2017-07-14 16:19:50 -07:00
Stephen J Day
98f6deb50e cmd/dist: completely remove dist command
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 15:48:39 -07:00
Derek McGowan
751598e806 Merge pull request #1189 from stevvooe/move-content-commands
cmd/{ctr, dist}: move content command to ctr
2017-07-14 15:37:18 -07:00
Stephen J Day
1db80ed966
cmd/{ctr, dist}: move content command to ctr
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 15:31:36 -07:00
Derek McGowan
695351f38e Merge pull request #1188 from stevvooe/move-images-command
cmd/{ctr,dist}: move images command to ctr
2017-07-14 15:07:01 -07:00
Stephen Day
1905380ae1 Merge pull request #1187 from stevvooe/use-protobuild
protobuild: replace protobuild command
2017-07-14 14:51:43 -07:00
Stephen J Day
f7306d7f6c
cmd/{ctr,dist}: move images command to ctr
Rather than make a large PR, we can move parts of the dist commands over
piece by piece. This first step moves over the images command. Others
will follow.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 14:50:02 -07:00
Michael Crosby
d50e4bcdf3 Merge pull request #1183 from mlaventure/move-tasklist-to-runtime
Move taskList to the runtime package
2017-07-14 14:10:16 -07:00
Stephen J Day
6c925924db
protobuild: replace protobuild command
To make the protobuild tool broadly useful, it has been broken out into
a separate project. This PR replaces the command with a configuration
file.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 14:10:06 -07:00
Stephen Day
31324e5417 Merge pull request #1181 from mlaventure/fix-races
Fix races
2017-07-14 13:07:39 -07:00
Kenfe-Mickael Laventure
a5b3038ccc
Fix deadlock when task's exec start fails
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-14 21:54:30 +02:00
Kenfe-Mickael Laventure
9dcf725b76
Fix data race when task's exec fails to start
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-14 21:54:30 +02:00
Kenfe-Mickael Laventure
ae334b045f
Prevent a data race in client_test.go on test failure
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-14 21:54:30 +02:00
Kenfe-Mickaël Laventure
bf67906370 Merge pull request #1186 from estesp/update-fifo-racefix
Update containerd/fifo for race fix
2017-07-14 21:53:15 +02:00