Commit Graph

207 Commits

Author SHA1 Message Date
8cd4fe0243 Wait to delete container when restoring on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: dbdc8bbee4a26093e6342f93bb63a09fbe850f58
Component: engine
2017-03-31 10:59:00 -07:00
9a572f349e Merge pull request #31629 from darrenstahlmsft/ShutdownLock
Windows: Stop holding client container lock during shutdown
Upstream-commit: caf8d884aadd4cc56c1ffb524ce9b6d51ad63d88
Component: engine
2017-03-23 18:16:56 -07:00
dc089ee246 Merge pull request #31503 from Microsoft/jjh/cleanuphcsonrestore
Windows: Cleanup HCS on restore
Upstream-commit: 2fca6526d6c9dfdc714f3a1b8ee880fbbab7580e
Component: engine
2017-03-13 13:43:35 +01:00
b027885182 Handle paused container when restoring without live-restore set
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: c458d3bb98bb85359ffaf3b9e54d837ee001829a
Component: engine
2017-03-09 13:37:08 -08:00
cfda5ee425 Stop holding client container lock during shutdown
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: b819ffdb2079bf2e805f8ca2ed84f184fe601269
Component: engine
2017-03-07 16:24:34 -08:00
b03c0791bf Windows: Cleanup HCS on restore
Signed-off-by: John Howard <jhoward@microsoft.com>

This ensures that any compute processes in HCS are cleanedup
during daemon restore. Note Windows cannot (currently) reconnect
to containers on restore.
Upstream-commit: f59593cbd1c177fe2d5a1b1f00efe9987d25a526
Component: engine
2017-03-02 15:13:12 -08:00
709434a772 (*) Support --net:container:<containername/id> for windows
(*) (vdemeester) Removed duplicate code across Windows and Unix wrt Net:Containers
(*) Return unsupported error for network sharing for hyperv isolation containers

Signed-off-by: Madhan Raj Mookkandy <MadhanRaj.Mookkandy@microsoft.com>
Upstream-commit: 040afcce8f3f54c64d328929c5115128f623deb1
Component: engine
2017-02-28 20:03:43 -08:00
f8a42143d3 Windows: Remove unused commandLine
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7106a92f26271e0d2c6623446ce4a8bc987c445
Component: engine
2017-02-02 11:16:11 -08:00
b304d83344 Merge pull request #30117 from msabansal/natfix
Added support for dns-search and fixes #30102
Upstream-commit: c0a1d2e0d88ff3cae6802dfbd128c7739e8c2bcc
Component: engine
2017-01-31 11:05:29 +01:00
047ed027d7 Windows: Remove GetPidsForContainer
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f47e417466532212534a18d510a9d76e2e8f9f61
Component: engine
2017-01-18 12:28:52 -08:00
3fdf20b049 Added support for dns-search and fixes #30102
Signed-off-by: msabansal <sabansal@microsoft.com>
Upstream-commit: e6962481a032c7278bc17c8fdcc42831c6d0b88f
Component: engine
2017-01-13 12:01:10 -08:00
2d095c22c0 Remove timeout on fifos opening
Instead of a timeout the context is cancelled on error to ensure
proper cleanup of the associated fifos' goroutines.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: c178700a0420118fe7f632af4da1bc43abd3a9bf
Component: engine
2017-01-13 11:46:48 -08:00
8928076872 fix typo in libcontainerd/client.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 39a24019e3a7b2f423090dff4793698001620737
Component: engine
2017-01-11 23:10:02 +08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
c493517769 fix some typos in libcontainer\types_windows.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: f385846d6ff48c17b7fc8173b8370df17c76ad40
Component: engine
2016-12-14 16:33:03 +08:00
90c004590f Move process functions to pkg/system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8c1ac816657a1371597c4b2d1a758bee0114e0d7
Component: engine
2016-12-12 09:28:41 +01:00
dc6f3f84fc Fix docker restart panic on machine ungracefully shutdown
Machine ungracefully shutdown leaves a lot of container has a
Running=true state.

```
$ cat config.v2.json | jq .

    "Running": true,
    "Paused": false,
    "Restarting": false,

```

And the next docker start will fail with panic.

```

time="2016-12-01T01:54:45.086446715-05:00" level=warning msg="libcontainerd: client is out of sync, restore was called on a fully synced container (49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a)."
time="2016-12-01T01:54:45.087046004-05:00" level=warning msg="libcontainerd: failed to retrieve container 49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a state: rpc error: code = 2 desc = containerd: container not found"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5db7f3]

goroutine 57 [running]:
panic(0x16a8e60, 0xc420010130)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/docker/docker/libcontainerd.(*client).Restore(0xc4202e1a40, 0xc420415000, 0x40, 0xc42015a0b0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/docker/docker/libcontainerd/client_linux.go:457 +0x553
github.com/docker/docker/daemon.(*Daemon).restore.func1(0xc4201c46f0, 0xc4202581e0, 0xc4201c46e8, 0xc42047bfb0, 0xc42047bf80, 0xc42047bf50, 0xc42024ba10, 0xc420512c00)
        /go/src/github.com/docker/docker/daemon/daemon.go:205 +0x198
created by github.com/docker/docker/daemon.(*Daemon).restore
        /go/src/github.com/docker/docker/daemon/daemon.go:260 +0x7bb

```

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 267422e4d08244e701ce049ab55ca0ad9879ba78
Component: engine
2016-12-01 02:25:24 -05:00
eb1bfafb6a Fix race with containerd events stream on restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 9fff9bb761b3ceb1ef09ab2d6dbdbaa4463a063c
Component: engine
2016-11-30 10:15:39 -08:00
c081d78f0c Ignore "failed to close stdin" if container or process not found
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 9aedaf5b3acc0dd0df4a4b67c46cf922d42f62a3
Component: engine
2016-11-29 20:41:39 -05:00
c0d4c1f04f Fix race on sending stdin close event
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4e262f63876018ca78d54a98eee3f533352b0ac9
Component: engine
2016-11-21 17:43:01 -08:00
bee0ae1311 Shutdown instead of terminate process on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 8b503242734d66a223bf8d694f26901b1d02106d
Component: engine
2016-11-18 12:05:08 -08:00
0a4f3b6f0e fix a typo
Signed-off-by: Akshay Karle <akshay.a.karle@gmail.com>
Upstream-commit: 2d08a764211035ec93aa3a97afb2baff074103da
Component: engine
2016-11-17 16:51:37 -05:00
4d7a48f6ec Merge pull request #27955 from mlaventure/runc-docker-info
Add external binaries version to docker info
Upstream-commit: 0427afa409f1a2034537b4659bf7a3a1454fa617
Component: engine
2016-11-10 21:27:14 -08:00
828e14b6f7 Adding more strict resource checks on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 0ed00b36ff7d8651e4d11a41507f81441c081388
Component: engine
2016-11-09 16:29:54 -08:00
dc6854b4b3 Merge pull request #28184 from Microsoft/jjh/user
Windows: Plumb through user
Upstream-commit: f67d4b897adc9048269d1b91435b6dcbf69e36d1
Component: engine
2016-11-09 11:32:42 -08:00
515ebb7b5c Add expected 3rd party binaries commit ids to info
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 2790ac68b32b399c872de88388bdccc359ed7a88
Component: engine
2016-11-09 07:42:44 -08:00
7242352354 Stop returning errors that should be ignored while closing stdin
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: ae35c0f70e96de011ad376c8fffba8e8a52ec21f
Component: engine
2016-11-08 18:25:43 -08:00
234aecaaa6 Windows: Plumb through user
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5207ff7202327bd06fa7e8df4c58d6a944899b60
Component: engine
2016-11-08 17:41:56 -08:00
28d4c9907d Don’t warn on missing fifo
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ee9d28bd3fa3fb98a231a76bf4908397d63fec1d
Component: engine
2016-11-08 09:59:49 -08:00
6fb90ed484 Add functional support for Docker sub commands on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 934328d8ea650bf8a9c3c719999ce2a1f5dd5df6
Component: engine
2016-11-07 09:06:34 -08:00
c8300bf35f Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 4e15420b9be50ddd7fa65e5c7f9b732777f9cc35
Component: engine
2016-11-04 13:38:50 -07:00
62d913cd94 Clean up the constants in 'libcontainerd' that are no longer in use
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 1ad989559f73be34d180122609882273c1ad9f6a
Component: engine
2016-10-28 13:39:04 +08:00
b4087aee32 Fix logging formatting
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: aa01ee4ac5b8bd2be25db06938533347223f30ba
Component: engine
2016-10-25 18:34:35 -07:00
1883869e16 Move stdio attach from libcontainerd backend to callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 37a3be2449d2a314305615ffcc287a598a829dba
Component: engine
2016-10-24 00:20:36 -07:00
6b04858e42 Refactor stdin closing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6f2658fb8cbaf5972c4c069817ed16e80d461514
Component: engine
2016-10-20 17:10:15 -07:00
5c4198ba60 Fix issues with fifos blocking on open
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6d26464502b4e8ecfd8f5605196605624fb79944
Component: engine
2016-10-20 17:02:02 -07:00
dd35c23542 record pid of exec'd process
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 18083481361a4053d1081a201120a916239fc0ed
Component: engine
2016-10-20 17:06:11 +02:00
bf1e1cd730 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: e03bf1221ee2c863f25a57af4d415e2d8ff4f26c
Component: engine
2016-10-19 12:39:25 -02:00
6e21c70cae Merge pull request #26795 from darrenstahlmsft/PauseResume
Implement Pause Resume support for Windows
Upstream-commit: dd383898cdcbcef7bd48bc0115cc9a739cf610f3
Component: engine
2016-10-13 18:08:11 -07:00
955590ce96 Merge pull request #27310 from swernli/servicing-error-reporting
Fixing error reporting on servicing failure
Upstream-commit: e736b9a1725bcac02589a7bf61f21c2a0490203d
Component: engine
2016-10-12 08:47:54 -07:00
77b18735c8 Fixing error reporting on servicing failure
The code that handles waiting for the servicing container to complete correctly grabs the exit code and logs a failure, but doesn't return that failure to the caller, mistakenly causing servicing operations to look successful when they really failed during processing.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: f65647463eb8e6ba0675d295aed492d3617306a2
Component: engine
2016-10-11 17:11:56 -07:00
83dc9e6cea Implement Pause Resume support for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 69985e85d37af827fe2940a35d13e8b20a08fc8c
Component: engine
2016-10-11 16:23:35 -07:00
23ee37555b Merge pull request #26690 from mwhudson/ignore-oom_score_adj-failure
Ignore failure to set oom_score_adj, as happens in an unprivileged container.
Upstream-commit: d316e172da464bd7fb88e45069cb459f90f710bd
Component: engine
2016-10-11 10:01:22 +01:00
97516856c4 Remove restartmanager from libcontainerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 606a245d8548e98e889df1b9cf511b5953a309b9
Component: engine
2016-10-07 12:09:54 -07:00
d1b375bf46 Merge pull request #23389 from Microsoft/jjh/credentialspec
Windows: Support credential specs
Upstream-commit: b3cc3d7bf9606b64833d5596fee84bff416652c3
Component: engine
2016-10-07 18:32:44 +02:00
75a301f015 Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e85867cb68cc28208c91bb43fc5cdcff824c468e
Component: engine
2016-10-06 09:32:22 -07:00
02536572fb Revendor hcsshim to v0.5.1
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 267c04aa36a54260242a2cffbd19d4f25f782e94
Component: engine
2016-10-05 14:40:51 -07:00
7b053bbb81 Merge pull request #27149 from swernli/servicing_fix
Fixing servicing bug by always specifying LayerFolderPath
Upstream-commit: 33ae7d4c195d9096def013fcd4af32df3c2f4606
Component: engine
2016-10-05 13:21:47 -07:00
c735d7ed2f Merge pull request #27038 from jstarks/non_base_utilityvm
Windows: support Windows servicing layers
Upstream-commit: 214b70e6ef9c5430c48cd88303f4cc0574e0037a
Component: engine
2016-10-05 10:02:31 -07:00
546bf84a57 Merge pull request #27152 from darrenstahlmsft/Rounding
Windows: fix rounding error in container resources
Upstream-commit: c48317ad7ca4eebe7f84cab6075707493eb7c567
Component: engine
2016-10-04 21:08:14 -04:00