Commit Graph

687 Commits

Author SHA1 Message Date
Qiang Huang 7d02c2b805 Remove default value of log-level
It'll make --debug not work, we removed --debug in
master, but we should keep it for backward compatibility
in 0.2.x.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-03-13 13:47:41 +08:00
Kenfe-Mickaël Laventure 9f68f96b8c Merge pull request #609 from mlaventure/register-healtcheck-sooner
Register healtcheck service before calling restore()
2017-03-08 11:08:54 -08:00
Kenfe-Mickael Laventure 77839668a5 Register healtcheck service before calling restore()
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-07 11:15:23 -08:00
Kenfe-Mickaël Laventure c20ea18421 Merge pull request #604 from datawolf/remove-unused-member
shim: remove the unused member of the process struct
2017-03-06 07:29:42 -08:00
Wang Long f90f6ee94e shim: remove the unused member of the process struct
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2017-03-06 09:47:59 +08:00
Michael Crosby 665e84e6c2 Merge pull request #529 from mlaventure/fix-restore-exec-panic
Create exec sync channel on restore
2017-02-16 16:08:10 -08:00
Kenfe-Mickael Laventure 88cd02c528 Create exec sync channel on restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-16 12:04:02 -08:00
Kenfe-Mickaël Laventure 0866a6ffe6 Merge pull request #517 from mlaventure/update-logrus
Update logrus to v0.11.2
2017-02-10 15:50:28 -08:00
Kenfe-Mickael Laventure c9d7df5d5d Update logrus to v0.11.2
This fixes logrus terminal detection.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-10 15:27:13 -08:00
Kenfe-Mickaël Laventure e205361a9e Merge pull request #467 from jmzwcn/v0.2.x
Allow specifying the log level
2017-02-07 17:53:16 -08:00
Daniel Zhang a9a1271e7b Allow specifying the log level. #30349
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
2017-02-08 09:48:21 +08:00
Kenfe-Mickaël Laventure c1b96cb03b Merge pull request #410 from sandyskies/v0.2.x
delete state directory after unclean exits
2017-02-02 10:40:01 -08:00
Michael Crosby 78fb8f4589 Merge pull request #471 from mlaventure/fix-exec-panic
Prevent panic if exec process dies before sync channel is created
2017-01-27 10:33:46 -08:00
Kenfe-Mickael Laventure 0f1bea59bc Prevent panic if exec process dies before sync channel is created
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-26 13:47:48 -08:00
Michael Crosby d7975b8980 Merge pull request #460 from mlaventure/update-protobuf-grpc
Update protobuf and grpc to match docker/swarmkit
2017-01-23 15:36:45 -08:00
Kenfe-Mickael Laventure aff808ece6 Update protobuf and grpc to match docker/swarmkit
protobuf: 8ee79997227bf9b34611aee7946ae64735e6fd93
grpc: v1.0.4

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 15:27:12 -08:00
Kenfe-Mickaël Laventure c29c95a687 Merge pull request #459 from docker/revert-428-io-set-termios-onlcr
Revert "io: stop screwing with \n in console output"
2017-01-23 14:42:25 -08:00
Kenfe-Mickaël Laventure 51229dc609 Revert "io: stop screwing with \n in console output"
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 14:19:10 -08:00
Kenfe-Mickaël Laventure 1137bf2ba6 Merge pull request #428 from datawolf/io-set-termios-onlcr
Set -ONLCR on created consoles
2017-01-17 14:07:02 -08:00
Michael Crosby 5a0d1f75cd Merge pull request #436 from mlaventure/fix-monitor-deadlock
Fix deadlock in monitor
2017-01-17 11:18:57 -08:00
Kenfe-Mickael Laventure 0f90fb100a Fix deadlock in monitor
This deadlock occurs when the oom channel get full as a process gets
added to the Monitor. Since the channel is full the lock monitor will
never be released preventing the task trying to add a new process to
the monitor to ever complete.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-17 07:41:10 -08:00
Wang Long 717679b7ad io: stop screwing with \n in console output
The default terminal setting for a new pty on Linux (unix98) has +ONLCR,
resulting in '\n' writes by a container process to be converted to
'\r\n' reads by the managing process. This is quite unexpected, To fix it, make
the terminal sane after opening it by setting -ONLCR.

this patch fix method comes from: eea28f480d
thanks @cyphar Aleksa Sarai <asarai@suse.de>

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2017-01-14 06:49:13 +00:00
sandyskies 246cde09d7 fix misspelling
Signed-off-by: sandyskies <chenmingjie0828@163.com>
2017-01-11 21:48:58 +08:00
sandyskies 374210a88b delete state directory after unclean exits
Signed-off-by: sandyskies <chenmingjie0828@163.com>
2017-01-11 21:33:50 +08:00
Wang Long 3fc9dbd908 Refactor enum map range to slice range
grep -r "range map" show 5 parts use map to range enum types,
use slice instead can get better performance and less memory usage.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-12-20 10:33:16 +08:00
Qiang Huang bb338ce1b9 Merge pull request #371 from coolljt0725/delete
[v0.2.x]: Ignore `does not exit` error on deleting container from runtime
2016-12-20 09:33:22 +08:00
Lei Jitang ebfb6e0940 Ignore `does not exit` error on deleting container from runtime
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-11-28 20:24:22 -05:00
Michael Crosby 9c21822f34 Merge pull request #358 from mlaventure/ctr-cleanup-tmp
Cleanup ctr stdio tmp directory
2016-11-28 10:03:05 -08:00
Kenfe-Mickael Laventure ae22f10b37 Cleanup ctr stdio tmp directory
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-28 08:28:16 -08:00
Michael Crosby 03e5862ec0 Merge pull request #354 from crosbymichael/derr
Fix the error check in Delete method
2016-11-17 14:24:35 -08:00
Wang Long 9ff4a00252 Fix the error check in Delete method
we should check the `derr` at here, not the `err`.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-17 10:23:47 -08:00
Kenfe-Mickaël Laventure 2c973d798e Merge pull request #348 from crosbymichael/killall
Use runc kill all for process termination
2016-11-17 10:15:14 -08:00
Michael Crosby 6dd962382f Merge pull request #351 from mlaventure/fix-orphan-detection
Fix orphan detection for short lived processes
2016-11-17 10:14:48 -08:00
Michael Crosby 5f089ee73d Merge pull request #353 from mlaventure/test-restore-exec
Add test case for exec after restore
2016-11-17 10:01:15 -08:00
Kenfe-Mickael Laventure 794f1c461a Add test case for exec after restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-16 15:33:32 -08:00
Kenfe-Mickaël Laventure a0fec3ea4a Merge pull request #352 from coolljt0725/fix_exec
Fix exec old running container with live-restore
2016-11-16 15:33:20 -08:00
Lei Jitang d59314b9a8 Fix exec old running container with live-restore
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-11-16 08:40:40 +00:00
Kenfe-Mickael Laventure ea39b52079 Fix orphan detection for short lived processes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-15 12:39:36 -08:00
Michael Crosby 36d6c04213 Move `killAll()` to linux specific file
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-10 09:25:21 -08:00
Michael Crosby 545a724dc7 Update runc to 51371867a01c467f08af739783b8beafc15
This adds the `kill --all` feature to runc.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-09 15:40:24 -08:00
Michael Crosby f504ed8216 Use runc kill all for process termination
Before this change we would rely on containerd to call delete that also
had logic to kill all processes in a container via cgroups for
containers that run in another pid namespace.  This changes allows us to
decouple the kil all logic and delete so that we don't have to have
containerd calling delete and it can all be handled in the shim again.
This will hopefully prevent races where higher level logic was trying to
remove a containers fs before the shim actually exits.  Now the exit
fifo will not be closed until the shim actually exits.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-09 15:40:14 -08:00
Michael Crosby 8517738ba4 Merge pull request #342 from datawolf/remove-unused-code
Remove unused function getDefaultID()
2016-11-07 09:21:32 -08:00
Michael Crosby 50adcb9c83 Merge pull request #341 from datawolf/fix-pprof-address
api: fix pprof-address usage
2016-11-07 09:21:13 -08:00
Wang Long 185e2254c5 Remove unused function getDefaultID()
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-07 14:57:29 +08:00
Wang Long 2dfb24bbea api: fix pprof-address usage
Adding the following line will install handlers under the /debug/pprof/ URL to download live profiles:

```
import _ "net/http/pprof"
```

see: https://golang.org/pkg/net/http/pprof/
     https://golang.org/pkg/runtime/pprof/

Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-05 09:49:39 +00:00
Kenfe-Mickaël Laventure 0686d5f46b Merge pull request #340 from crosbymichael/bump-runc-nov4
Bump runc version to ac031b5bf1cc92239461125f4c1ff
2016-11-04 13:51:44 -07:00
Michael Crosby 2e28d8007a Bump runc version to ac031b5bf1cc92239461125f4c1ff
log:

`git log--no-merges 02f8fa7863dd3f82909a73e2061897828460d52f..ac031b5bf1cc92239461125f4c1ffb760522bbf2`

```
* d5525cc add test cases for exec command
* fd7ab60 libcontainer: make tests to make sure we don't mess with \r
* eea28f4 libcontainer: io: stop screwing with \n in console output
* 603c151 (fork/ambient-tag, ambient-tag) Move ambient capabilties
* behind build tag
* fcc40b7 (fork/remove-exec-panic, remove-exec-panic) Remove panic from
* init
* 34d7c5c fix error message
* 9b15bf1 nsenter: fix up comments
* b15668b Fix all typos found by misspell
* 1535e67 Updating container state and status API in README
* 81d6088 Unify rootfs validation
* 2d0d936 Small correction in update resource file usage
* 16ad385 Correction in util error messages
* 3db2c43 man page update for delete command
* 4d76a85 Clarify libseccomp-devel in guide
* f520eab Remove unnecessary cloneflag validation
* a0f7977 Detect and forbid duplicated namespace in spec
* 6c147f8 Make parent mount private before bind mounting rootfs
* 1ab3c03 validator: actually test success
* 2a94c36 validator: unbreak sysctl net.* validation
* 2c74f86 Employ jq and state command to make sure that pid-file
* contains the right information
* e3cd191 nsenter: un-split clone(cloneflags) for RHEL
* 2cd9c31 nsenter: guarantee correct user namespace ordering
* ed053a7 nsenter: specify namespace type in setns()
* 4cfbd25 Small typo in README
* ba1c0b4 check the arguments for `runc create`
* 41c3581 add test cases about host ns
* bc84f83 fix docker/docker#27484
* f8e6b5a rootfs: make pivot_root not use a temporary directory
* b2a194f Updating bash completion for ps command
* f550f04 fix nits in stderr log
* 596a4c3 add test cases for create command
* 5aef160 add test cases for list command
* c4e7f01 Add an integration test for tmpfs copy up
* c7406f7 Support copyup mount extension for tmpfs mounts
* 4356468 Parse the new extension flags
* f5103d3 config: Add new Extensions flag to support custom mount
* options in runc
* 799911a godeps: Add fileutils dependency
* c179b0f Some refactor and cleanup
* a83f5ba Fix issue in `GetProcessStartTime`
* d223e2a Ignore error when starting transient unit that already exists
* 6e97f3a tests: mask: use test paths rather than /sys
* 528bf37 ps error logging improvement
* 38560a0 checkpoint: fix gofmt
* ed6c5c0 update the man for runc delete command
* a367e4b Add num check for kill command
* 034cba6 Fixing runc panic for missing file mode
* 6932807 Add support for r/o mount labels
* 74bfe50 start mulit-containers with `runc start` command
* 2f5c0af pause and resume multi-containers
* 4b263c9 Fixing runc panic during hugetlb pages
* 1cd0502 Valide platform on loading config.json
* 491cada DupSecOpt needs to match InitLabels
* affc105 tiny fix, add a null check for specs.Resources.Pids.Limit
* dba9253 remove /tmp/bats from dev_runc
* 1b876b0 fix typos with misspell
* 5eaa9ed just fix a typo
* 9df4847 tiny fix
* 7e38b37 Delete: exit with non zero if one of the containers
* encountered an error
* 1a6391b Revert "simplify ps command"
* 98afb73 Add integration test for ps command
* 067ce21 simplify ps command
* 11222ee (fork/kmem) Don't enable kernel mem if not set
* 1a75f81 systemd cgroup driver supports slice management
```
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-04 10:27:16 -07:00
Michael Crosby f99ddf569e Merge pull request #339 from mlaventure/sync-exit-events
Sync exit events
2016-11-03 10:33:29 -07:00
Kenfe-Mickael Laventure 307cfeca36 Sync exit events
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-03 10:23:08 -07:00
Michael Crosby 7f6fe43e6b Merge pull request #335 from mlaventure/json-compat-master
master: Update readEventLogs to support old Event format
2016-10-31 11:25:58 -07:00