Commit Graph

613 Commits

Author SHA1 Message Date
Michael Crosby 4a341841c5 Update runc to 89c3c97a8482f3a57cd4bb683df1a7b2c61405d8
Fixes #211

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-04 11:36:07 -07:00
Kenfe-Mickael Laventure 7979ac24fe Fix restore to correctly set the exec timeout value (containerd)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-02 14:04:14 -07:00
Kenfe-Mickael Laventure 7279ff91c4 Add missing shim value when saving container state.json (containerd)
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-02 14:02:52 -07:00
Kenfe-Mickael Laventure 5a688c3e28 Cleanup stdio files upon start and exec termination (ctr).
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-02 13:59:40 -07:00
Amit Krishnan aff023c8a2 Uprev docker/docker/pkg/term and runc/libcontainer
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-02 13:40:23 -07:00
Michael Crosby c0a78ae10d Merge pull request #229 from mrunalp/fix_state_cmd
Add missing state command to command list
2016-04-29 16:20:47 -07:00
Mrunal Patel 79de8a2fc5 Add missing state command to command list
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-29 16:08:11 -07:00
Qiang Huang 313db3df26 Correct build flag for arm64
On arm64, the default build flag is the same as the one from
`go env` which is arm64. So we should use arm64 instead of
aarch64 for both build flag and file name.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-29 11:42:41 +00:00
Michael Crosby f0f0c3e0dc Merge pull request #223 from crosbymichael/reap-shim
Remove sigchld reaper from containerd process
2016-04-28 14:23:05 -07:00
Michael Crosby d8c3cd8107 Merge pull request #224 from tonistiigi/fix-memory-stats
Fix including memory stats field
2016-04-28 11:38:46 -07:00
Tonis Tiigi 62c89c1c50 Fix including memory stats field
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-27 18:42:16 -07:00
Michael Crosby 847690583f Remove sigchld reaper from containerd process
Because we are launching alot of different runc commands to do
operations there is a race between doing a `cmd.Wait()` and getting the
sigchld and reaping it.  We can remove the sigchild reaper from
containerd as long as we make sure we reap the shim process if we are
the parent, i.e. not restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-27 16:02:03 -07:00
Kenfe-Mickaël Laventure 25de9de446 Merge pull request #214 from HuKeping/constant
Replace exit codes by Constants
2016-04-26 16:46:23 -07:00
Kenfe-Mickaël Laventure 92eeb02a7b Merge pull request #221 from crosbymichael/runc-cmds
Use runc ps and events for stats and pids
2016-04-26 16:45:46 -07:00
Michael Crosby db789045bd Update runc in dockerfile for new commands
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 15:06:25 -07:00
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