Commit Graph

2042 Commits

Author SHA1 Message Date
e730a09366 Merge pull request #23497 from shishir-a412ed/dm_task_run_failed
Fixes Issue # 23418: Race condition between device deferred removal and resume device.
Upstream-commit: 87e48ecd048c0b083fe09fb8d74c83364abd41e6
Component: engine
2016-08-03 21:54:33 +02:00
6d26e235fc Merge pull request #25105 from hqhq/fix_kmem_test
Fix TestUpdateKernelMemoryUninitialized on new kernel version
Upstream-commit: b47df1ddbe847bdffccb76239e3288d59b69cb3b
Component: engine
2016-08-02 17:15:53 +02:00
1e0e8f732e Fixes Issue # 23418: Race condition between device deferred removal and resume device.
Problem Description:

An example scenario that involves deferred removal
1. A new base image gets created (e.g. 'docker load -i'). The base device is activated and
mounted at some point in time during image creation.
2. While image creation is in progress, a privileged container is started
from another image and the host's mount name space is shared with this
container ('docker run --privileged -v /:/host').
3. Image creation completes and the base device gets unmounted. However,
as the privileged container still holds a reference on the base image
mount point, the base device cannot be removed right away. So it gets
flagged for deferred removal.
4. Next, the privileged container terminates and thus its reference to the
base image mount point gets released. The base device (which is flagged
for deferred removal) may now be cleaned up by the device-mapper. This
opens up an opportunity for a race between a 'kworker' thread (executing
the do_deferred_remove() function) and the Docker daemon (executing the
CreateSnapDevice() function).

This PR cancel the deferred removal, if the device is marked for it. And reschedule the
deferred removal later after the device is resumed successfully.

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 0e633ee14aca32480ac4735675222c35f4e11d8c
Component: engine
2016-08-02 10:33:58 -04:00
5ef37313b9 Fix TestUpdateKernelMemoryUninitialized on new kernel version
Fixes: #25073

Update kernel memory on running containers without initialized
is forbidden only on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: da5d66fb70064b093f73cc31eddb7e8285048161
Component: engine
2016-08-02 13:17:20 +08:00
5bb33260e8 Revert "Add checking err for IsWindowsClient()"
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: d0b9c33f71f1e87e2236f1f9894ce28827791a7a
Component: engine
2016-08-01 17:33:41 -07:00
f1f1cf0467 Merge pull request #25294 from klinden/patch-1
adding entry for Hugh Beaver
Upstream-commit: f2fb28cbb3f32b6ffec209dd4452b126f769f2ef
Component: engine
2016-08-02 01:01:13 +02:00
d1166d12d4 Add entries for Hugh Beaver, Lois Haibt and some more adjectives
Signed-off-by: Kyle Linden <kyle.linden@appliedis.com>
Upstream-commit: 653d083c1e887617f87d89a128d1398b90e0dd50
Component: engine
2016-08-01 16:05:27 -04:00
25dfa2b9fa Merge pull request #24821 from thaJeztah/stringid-refactor
Minor refactor and beter coverage for pkg/stringid
Upstream-commit: d2eb5dc9e0365ea4d50076011a7ef92d435b5032
Component: engine
2016-08-01 21:12:14 +02:00
c8468e1fc2 make pkg pidfile support darwin
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: a91f59d4873e9866928261ad62ebcea3ef7add5f
Component: engine
2016-08-01 22:01:20 +08:00
e8a4996d93 Merge pull request #25066 from lixiaobing10051267/masterErr
Add checking err for IsWindowsClient()
Upstream-commit: 4554e6065100d493dd9cd2935901b8532a0dc504
Component: engine
2016-07-30 17:25:08 +01:00
74764063d5 Merge pull request #24081 from Microsoft/jjh/signaltofile
Windows: Stack dump to file
Upstream-commit: 1e6fd0378b431425180bad9fe2c38b296c1bc5bf
Component: engine
2016-07-29 22:09:35 +02:00
488d786bb3 Merge pull request #24745 from daehyeok/logrus
Refactoring for logrus formatting
Upstream-commit: 170abb5f7cabf4921a378d76532e74a272fbe39c
Component: engine
2016-07-28 16:50:19 -07:00
e9800c4e43 Modify func name from TestChtimes to TestChtimesLinux
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Modify func note

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 1df9f0932e50ae497a6c79fc3a0ee85cb67f60d4
Component: engine
2016-07-27 10:05:59 +08:00
0a12b515a3 Merge pull request #25086 from dmcgowan/overlay2-fix-sub-directory-whiteouts
Fix overlay2 sub directory whiteouts
Upstream-commit: bb27d017f395d5683d0f82a203038c3055be91d8
Component: engine
2016-07-26 20:45:41 -04:00
5b655758f7 Fix files in subdirectories creating bad whiteout
Closes #23863

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 1c0f6653ba82c933885719478e90c13f8d7e32b7
Component: engine
2016-07-26 12:03:55 -07:00
a35fb01dfe add to check err
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: b4833e3b3d683242c016e64d8de7385fcb4c8932
Component: engine
2016-07-26 21:43:32 +08:00
ac18bf29a1 Fix pkg/plugins TLSConfig panic
Fix #25046

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b1e71bdd1d624e297509a62b072082524dc841fc
Component: engine
2016-07-26 08:53:54 +00:00
b6548fce21 Merge pull request #24961 from jstarks/vt_th2_fix
Windows: Restore console mode on set mode failure
Upstream-commit: bff9a0556f785b094b55fcc9c1e5f83cf74a9aaa
Component: engine
2016-07-25 09:49:34 +02:00
d204454a26 Merge pull request #24977 from lixiaobing10051267/masterNote
Modify several fun notes in fsnotify.go
Upstream-commit: 1f3b400d3c92657a915610a3702cdf4012beffbd
Component: engine
2016-07-25 09:41:17 +02:00
8e3d8789cb Merge pull request #24963 from allencloud/fix-typos
fix typos
Upstream-commit: 40044cb18fd4ff0ed13d8cdd41ec4dcecdac0703
Component: engine
2016-07-25 09:39:48 +02:00
17ffda94c4 Modify several fun notes in fsnotify.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: ff2c898652de37f70cd2774a208e61b112d06e1b
Component: engine
2016-07-24 13:35:33 +08:00
7ce557c2bc Func name wrong in notes of response.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: d6556a6ef716387122574e37cce4f009b1e21c25
Component: engine
2016-07-23 16:03:27 +08:00
1c3431e16a fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4e959ef2f7f063803d04e06166f459257eb94b5c
Component: engine
2016-07-23 11:32:23 +08:00
aaeaca1829 Windows: Restore console mode on set mode failure
SetConsoleMode() on input handles appears to remember invalid bits that
were set, causing problems for other programs (such as xcopy.exe) trying
to set the console mode after docker.exe has exited. Always restore
the input console mode on set failure.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 83c186fdd4332b8a08db715e8cb5dd1e80a56567
Component: engine
2016-07-22 18:34:15 -07:00
4a9015ab13 Windows: Stack dump to file
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b63c92bf241f410b0bda46b42b26f2f86b394c56
Component: engine
2016-07-21 20:04:47 -07:00
9afdf020b7 Minor refactor and beter coverage for pkg/stringid
This slightly simplifies TruncateID() by only
trimming the string if needed.

Also improved unit-tests for this package;

- Add a test for GenerateNonCryptoID()
- Add a test for shortening a sha-256 ID
- Make TestShortenId() more "unit", by using a fixed string, instead of calling GenerateRandomID()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 78eab14d0b2128ffaff2b3c0cd32c5339ef35ad7
Component: engine
2016-07-20 00:23:06 +02:00
766219b46e Merge pull request #24776 from anusha-ragunathan/plugins-connect
Add only legacy plugins to the legacy lookup map.
Upstream-commit: 6875f71d7c6a01b918fcc372ac2c17c5a0d65418
Component: engine
2016-07-19 17:11:50 +02:00
7f898cc8b4 Use const http status code instead of just numbers see #24783
Signed-off-by: Doron Podoleanu <doronp@il.ibm.com>
Upstream-commit: 6bec735c91c378e1c9cde1744e7c8aca7397104a
Component: engine
2016-07-19 10:40:20 +03:00
7078c249a4 Merge pull request #23878 from jstarks/fix_windows_console
Windows: Always enable VT emulation
Upstream-commit: e6a97db2c932a2b80180c10f2896d7594108a406
Component: engine
2016-07-18 16:23:04 -07:00
0228458e3c Add only legacy plugins to the legacy lookup map.
Legacy plugin model maintained a map of plugins. This is
not used by the new model. Using this map in the new model
causes incorrect lookup of plugins. This change uses adds
a plugin to the map only if its legacy.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 8fd779dc28a11d8727d76e9553379b0c854f7c4c
Component: engine
2016-07-18 15:43:44 -07:00
d3ae6c280d Refactoring for logrus formatting
Use module name logrus instead of log.
Use logrus.[Error|Warn|Debug|Fatal|Panic|Info]f instead of w/o f

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 6a1183b3ae512961f41a8ccfc8205e08294216f4
Component: engine
2016-07-18 12:53:34 -06:00
a878f5d7fb Merge pull request #24714 from allencloud/better-docker-network-create-help-output
better command `docker network create -h` output
Upstream-commit: 98a4b3e332b908d5be6f59a0612b597653ccdee0
Component: engine
2016-07-18 16:05:46 +00:00
8db8376b96 Fix a wrong word in comment.
Signed-off-by: Cao Weiwei <cao.weiwei30@zte.com.cn>
Upstream-commit: 9be8bf019419be76e9582188888b80b0940abf74
Component: engine
2016-07-17 13:08:07 +08:00
c1bbe8252f Fix a syntax error in comments
Signed-off-by: Cao Weiwei <cao.weiwei30@zte.com.cn>
Upstream-commit: 3fc9a9ccb8ec8783bfcc02b7e4dfd7ee6468fa86
Component: engine
2016-07-16 22:41:04 +08:00
cd03aec1cb better command docker network create -h output
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d0081a0f476f91b0dc6b28c480e7c95c06b05ebb
Component: engine
2016-07-16 15:32:17 +08:00
04c06a5318 return err when stack name does not exist
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 416613f2e54581c62d3efa1c4f0288b6e7d58365
Component: engine
2016-07-12 00:59:30 +08:00
e758a53186 Make the docker proxy a standalone binary not a re-exec
This reduces memory usage with a lot of docker proxy processes.
On Docker for Mac we are currently carrying a patch to replace
the binary as we modify it to forward ports to the Mac rather
than the Linux VM, this allows us to simply replace this binary
in our packaging with one that has a compatible interface. This
patch does not provide an easy way to substitute a binary as
the interface is complex and there are few use cases, but where
needed this can be done.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 0682468431867e3382a759402eb92df5877e310b
Component: engine
2016-07-07 12:53:39 +01:00
7ac01fb32e Use newer default values for mounts CLI
In the API:
`Writable` changed to `ReadOnly`
`Populate` changed to `NoCopy`

Corresponding CLI options updated to:
`volume-writable` changed to `volume-readonly`
`volume-populate` changed to `volume-nocopy`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 56f3422468a0b43da7bae7a01762ce4f0a92d9ff
Component: engine
2016-07-06 22:34:39 -04:00
fdcfb45adb Merge pull request #22472 from allencloud/make-pkg-fileutils-support-darwin
add fileutils_darwin.go in pkg/fileutils to support darwin platform
Upstream-commit: 92766c4b8359b7c3e2d51f301d2bef3253cf4710
Component: engine
2016-07-02 14:15:22 -07:00
92e4ef9b79 Add Andrew Wiles, Florence Nightingale, Thomas Edison to container names.
British mathematician Andrew Wiles is notable for solving Fermat's LAst
Theorem. Florence Nightingale was the first female inducted into the
Royal Statistical Society. Thomas Alva Edison was a prolific inventor,
noted for inventing the incandescent light bulb, the phonograph and the
motion picture camera (among many other).

Signed-off-by: Shourya Sarcar <shourya.sarcar@gmail.com>
Upstream-commit: 39dd365c5ef4e69e89353dc4a9af5d852094e471
Component: engine
2016-07-02 02:56:03 +00:00
765235d8c9 add fileutils_darwin.go in pkg/fileutils to support darwin platform
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d2dd1a1f7d9e7e522a9e0b3c3aec52c23abbdd46
Component: engine
2016-07-01 13:02:26 +08:00
3aada352fd Fix s390x build failure by removing golang.org/x/sys
This fix tries to fix the issue raised in #24168 where
golang.org/x/sys causes s390x build failure.

This fix removed the import of "golang.org/x/sys/unix".

This fix fixes #24168.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f3d8658fffbf901845c937a40efa66a5b06cdfc3
Component: engine
2016-06-30 06:32:32 -07:00
d4be296b2a Merge pull request #24080 from dmcgowan/atomic-writer-mode
Set permission on atomic file write
Upstream-commit: cbf785c45a8cca061028ec341320bcbd655cf1fd
Component: engine
2016-06-30 01:00:08 -07:00
6e93db8e82 Set permission on atomic file write
Perform chmod before rename with the atomic file writer.
Ensure writeErr is set on short write and file is removed on write error.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 1cd74902810b0eefddd173239cd95b506b34e678
Component: engine
2016-06-29 13:09:13 -07:00
d4e14be148 Merge pull request #23955 from yongtang/23768-cpu-count
Fix wrong CPU count after CPU hot-plugging
Upstream-commit: 50a173e3d5ca8ed3b52c53fde6729188fc02e9e7
Component: engine
2016-06-29 12:00:13 -07:00
943b955f19 Fix service update of Args
add a unit test

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 07b59ef210490df19f65da950d7d41176d104a31
Component: engine
2016-06-29 12:41:57 -04:00
a6603c31a0 Fix wrong CPU count after CPU hot-plugging on Windows
This fix tries to fix wrong CPU count after CPU hot-plugging.
On windows, GetProcessAffinityMask has been used to probe the
number of CPUs in real time.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3707a76921b412cb42e6134beaa0bddbb5e08f25
Component: engine
2016-06-25 22:20:29 -07:00
bde674f465 Fix wrong CPU count after CPU hot-plugging
This fix tries to address issues raised in #23768 where the CPU count
is not updated after cpu ho-plugging.

This fix follows the suggestion from #23768 and replace go's `runtime.NumCPU()`
with `sysconf(_SC_NPROCESSORS_ONLN)` so that correct CPU count could
be obtained even after CPU hot-plugging.

This fix is tested manually, as is suggested in #23768.

This fix fixes #23768.

The NumCPU() in Linux is based on @wmark 's implementation.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8b2383f5c1108c590928c0e6c57f1f0aa0dd36f6
Component: engine
2016-06-25 20:48:36 -07:00
6414685519 Merge pull request #23918 from LK4D4/avoid_copy
pkg/pools: avoid copy of sync.Pool
Upstream-commit: 296b5c761f0aa853062fcb9fb10b172845a1986a
Component: engine
2016-06-24 19:35:43 +02:00
f335a08e05 pkg/pools: avoid copy of sync.Pool
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ba3af336eb0bd5bd6082b41bb4ce0ea542c3f008
Component: engine
2016-06-23 16:09:13 -07:00