Commit graph

598 commits

Author SHA1 Message Date
Michael Crosby
9ed8422e8c Use runc events --stats for collecting stats
runc `events --stats` now has stable output so we don't need to bind to
libcontainer directly to get stats output for the containers.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:57:30 -07:00
Michael Crosby
c2df6e08cf Use runc for getting list of processes
runc now has a `ps` command with json output to support listing all the
processes inside a container.  We no longer need to use libcontainer
directly for doing this.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:40:05 -07:00
Michael Crosby
f279c4a878 Merge pull request #219 from crosbymichael/remove-win
Remove windows files
2016-04-26 14:34:28 -07:00
Michael Crosby
f7f4d8677f Remove windows code and simplify linux
Windows will not use containerd and its just unused code and unneed
complexity to keep it all around.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:10:41 -07:00
Michael Crosby
31270bba69 Remove windows files
Windows is not going to use containerd because there is already a
similar implementation on windows.  This removes all the windows files
because there is no reason to keep this overhead when its not going to
be used.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 14:10:33 -07:00
Michael Crosby
79c35e0306 Merge pull request #218 from crosbymichael/bump_runc
Update runc and runtime-specs dependencies
2016-04-26 14:05:44 -07:00
Michael Crosby
c44f03a1bf Merge pull request #215 from HuKeping/runtime_status
Bugfix: ctr container list can not get the proper status of container
2016-04-26 13:43:47 -07:00
Michael Crosby
7a1d28e42b Bump runc and runtime-specs deps
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 13:38:36 -07:00
Michael Crosby
715ac711b8 Merge pull request #217 from ibuildthecloud/delete-args
Pass runtime args to runtime delete call from shim
2016-04-26 11:22:06 -07:00
Darren Shepherd
2347cc9dc3 Pass runtime args to runtime delete call from shim
Signed-off-by: Darren Shepherd <darren@rancher.com>
2016-04-26 11:14:37 -07:00
HuKeping
ca7c504068 Bugfix: ctr container list can not get the proper status of container
Prior to this patch, when list containers by "ctr containers" or
"ctr containers xxx", it will not get the proper status of conatinser(s).

That was caused by the wrong implementation of State() for structure process,
it only send a signal "0" to ping the "init" process and do nothing.

Since the OCI/runc has implemented an interface Status(), we can use that.
And I think this is more compatible with the design for containerd:
- containerd -> runtime -> fun()

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-26 07:04:26 -04:00
HuKeping
10800f62ae Use constant to replace integer literal
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-26 06:02:49 -04:00
HuKeping
165815fdbf Introduce a ctr wide constant
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-26 06:01:25 -04:00
HuKeping
40d42a1aac Rework function getContainers
- Use canonical way to check if a map contains a key.
- Use "ci" to keep consistence since it is for "containerInfo".

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-22 17:32:41 -04:00
HuKeping
9d30093505 Interface: introduce status to runtime container
Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-04-22 16:09:50 -04:00
Kenfe-Mickaël Laventure
0e9e24c647 Merge pull request #178 from cyphar/add-socket-activation
containerd: use pkg/listeners to create the GRPC socket
2016-04-23 05:52:35 +10:00
Aleksa Sarai
e3bb2b6c39 integration-test: use new --listen proto://address format
This re-enables the integration tests after the CLI UX change of
--listen.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:20:46 +10:00
Aleksa Sarai
0ec0bb380f ctr: support proto://address format for --address
In order to match the containerd --listen update, allow users to set any
address of the form proto://address.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:20:46 +10:00
Aleksa Sarai
f88d701233 containerd: use docker/listeners to create the GRPC socket
This allows for the use of socket activation with the flag `-l fd://`
and similar. The semantics are identical to Docker, but it's important
to note that the semantics of the --listen flag have changed to require
a proto://addr formatted string.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:20:46 +10:00
Aleksa Sarai
20ef099321 vendor: pull in requirements for docker/pkg/listeners
Since we're using the docker "library" for socket activation (and
dealing with sockets in general), we need to vendor the requirements for
the library. Also, include go-winio even though Windows isn't a
supported target at the moment.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:17:25 +10:00
Kenfe-Mickaël Laventure
e8b33495f2 Merge pull request #213 from crosbymichael/bump-runc
Bump runc to e87436998478d222be209707503c27f6f91be
2016-04-22 10:59:04 +10:00
Michael Crosby
d7fb9f0538 Bump runc to e87436998478d222be209707503c27f6f91be
Fixes for cgroup memory updates and process labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-21 17:49:52 -07:00
Michael Crosby
c0295fac04 Merge pull request #210 from WeiZhang555/event-types-constant
Move event types constants into single file
2016-04-21 10:24:54 -07:00
Michael Crosby
a8dd154da1 Merge pull request #212 from mlaventure/test-containerd-restart
Test containerd restart
2016-04-21 10:24:31 -07:00
Michael Crosby
6a33c8a49b Merge pull request #209 from crosbymichael/event-path
Set fixed event log size
2016-04-21 10:23:37 -07:00
Kenfe-Mickael Laventure
4dbc495ff8 Add containerd restore test
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-20 18:08:36 -07:00
Kenfe-Mickael Laventure
7b2491bccc Use nanosecond timing for daemon log
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-20 18:08:23 -07:00
Michael Crosby
1b8cc65462 Set fixed event log size
Truncate the event log on disk and in memory so that it does not
grow forever.  This is mainly used for higher levels to receive past
events if they miss any.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-20 15:07:49 -07:00
Kenfe-Mickaël Laventure
b31b8a611e Merge pull request #157 from mYmNeo/binary-path
let user to specify the shim name or path
2016-04-21 00:31:14 +10:00
Zhang Wei
e213e2eb62 Move event types constants into single file
Move all constants for event types to types.go for easier code
readability and maintainance.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-19 19:09:54 +08:00
Michael Crosby
63001ee20d Merge pull request #185 from LK4D4/fix_pprof_address
api: fix pprof-address usage
2016-04-18 11:01:31 -07:00
Michael Crosby
4e54940c10 Merge pull request #195 from cyphar/fix-c-formatting-epoll-arm64
archutils: aarch64: fix build and improve C formatting
2016-04-18 10:54:15 -07:00
Michael Crosby
2239d4e329 Merge pull request #204 from mlaventure/checkpoint-error-output
Return runtime output on checkpoint operation errors
2016-04-18 10:53:15 -07:00
Michael Crosby
e49fcf514e Merge pull request #207 from WeiZhang555/provide-help
Provide more useful help information for ctr
2016-04-18 10:52:47 -07:00
Michael Crosby
31987990db Merge pull request #202 from crosbymichael/trunc-events
Truncate events log after read
2016-04-18 10:51:13 -07:00
Zhang Wei
59720469ac Provide more useful help information for ctr
`ctr containers/checkpoints` contains lots of important subcommands,
but now help command can't show subcommands. Adding subcommands to
help information will avoid user from digging into the code for
getting necessary command list.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-18 15:32:46 +08:00
Kenfe-Mickael Laventure
07646a7150 Return runtime output on checkpoint operation errors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-04-17 12:01:19 -07:00
Aleksa Sarai
7c572f1673 archutils: fix build on aarch64
Due to an invalid architecture name (arm64), containerd could not build
on aarch64 machines. Fix this by using the correct name of the
architecture for conditional building.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-17 12:38:05 +10:00
Aleksa Sarai
1e617aaab4 archutils: epoll_aarch64: fix C formatting
Use proper C formatting to make the cgo code much easier to read. Also
remove the pointless typedef.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-17 12:38:05 +10:00
Michael Crosby
21364997bb Merge pull request #192 from hqhq/hq_epool_flag
Use flag for aarch64 EpollCreate1
2016-04-15 13:56:32 -07:00
Michael Crosby
4ae5413ed7 Truncate events log after read
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-15 13:48:02 -07:00
Michael Crosby
399eca2b90 Bump to version 0.2.0
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-14 14:28:13 -07:00
Michael Crosby
a50d45d4aa Merge pull request #198 from ah3rz/patch-3
Changed Containerd to containerd for consistency
2016-04-13 17:35:22 -07:00
Adam Herzog
915bbfd8b8 Changed Containerd to containerd for consistency
Signed-off-by: Adam Herzog <adam@docker.com>
2016-04-13 17:19:01 -07:00
Tõnis Tiigi
10e3a6f9b5 Merge pull request #194 from coolljt0725/fix_epoll
Rename epoll_amd64.go to epoll.go
2016-04-12 22:58:30 -07:00
Lei Jitang
6f8b5c2a39 Rename epoll_amd64.go to epoll.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-13 02:02:40 -04:00
Qiang Huang
e419be223f Use flag for aarch64 EpollCreate1
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-11 15:01:36 +08:00
Michael Crosby
389483d83f Merge pull request #189 from docker/oom
Error oom if container has not stopped
2016-04-07 10:46:35 -07:00
Michael Crosby
28f9453fbb Error oom if container has not stopped
The oom control file may not exist if the container is short lived and
exits before we can open it.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-07 10:44:36 -07:00
Michael Crosby
1bb6821084 Merge pull request #191 from docker/vet
Remove govet
2016-04-07 10:44:19 -07:00