Commit Graph

1685 Commits

Author SHA1 Message Date
57ef1043ab Merge pull request #18449 from coolljt0725/plugins_cleanup
pkg/plugins/client.go: don't try to encode os decode if it's nil
Upstream-commit: 5f1af8da5bd824010d3c744d3adf23106f22c6a9
Component: engine
2015-12-07 16:03:28 +01:00
1af1c81aab Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
Upstream-commit: 1f8efc687cdf8ba98a7332cf9d4401afb8108be6
Component: engine
2015-12-07 14:38:21 +01:00
54d257ee92 pkg/plugins/client.go: don't try to encode os decode if it's nil
When user call the `Call()` method, they don't always want to sent
some args or get the return value, so they use `nil` when call `Call()`
method and this will casue an error. It's better to not trying to
encode or decode if it's nil.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: a2d348968fe754df41d0a1b56c7ba29ebbaa6849
Component: engine
2015-12-05 02:55:50 -05:00
9e539c7be0 Merge pull request #14466 from Mashimiao/add-support-blkio_throtte_bps
Add support for blkio read/write bps device
Upstream-commit: cb6a1a6042fc30e0beeaa79a2f8def4b53019483
Component: engine
2015-12-04 12:29:58 +01:00
6790de2194 Merge pull request #18412 from aaronlehmann/runcommand-race
Fix race in RunCommandWithOutputForDuration
Upstream-commit: 7c1c96551d41e369a588e365a9bb99acb5bc8fdb
Component: engine
2015-12-03 19:35:04 -08:00
7be0f9667b Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 3f15a055e5c50d0f08d4c3e7cd9618d537b84f29
Component: engine
2015-12-04 09:26:03 +08:00
9dd07d2075 Merge pull request #18411 from aaronlehmann/unit-test-timing
Adjust TestDockerCmdWithTimeout timeout to improve reliability
Upstream-commit: 4e6bea596472a02509bb966d077a93fe9490f6e1
Component: engine
2015-12-03 16:34:36 -08:00
9a19c84124 Fix race in RunCommandWithOutputForDuration
This function was starting a goroutine that modifies one of its return
values. The intent is for the goroutine to only influence the return
value when it's causing the function to return, but it's racy and can
also modify the return value when the function is returning due to the
timeout. Fix the goroutine to not modify return values directly.

Also, give the channel a buffer so that the goroutine doesn't block
forever after a timeout.

Fixes #18305

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2704fd9156bfb0fb8dc16c42902bb18ea5aa94a9
Component: engine
2015-12-03 16:34:01 -08:00
4ee82987ec Adjust TestDockerCmdWithTimeout timeout to improve reliability
I saw a failure of TestDockerCmdWithTimeout. This test starts a command
that produces output after 10 ms, but uses a 5 ms timeout, so normally
the command will be killed before the output. The time intervals are so
small that the timeout may not reliably trigger before the output, which
can cause the test to fail.

This commit changes the test to only fail if the process is still alive
after 10 seconds. This means the test will confirm that the timeouts are
happening, but not attempt to gauge that the timeouts are happening
within milliseconds of when they are expected (which can't be done
reliably).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 13d768b8ee05d3158c62d761e4ebe657cd7a8c25
Component: engine
2015-12-03 14:42:32 -08:00
0082efd193 Merge pull request #18266 from calavera/events_pub_sub
Event PubSub topics + linear filtering.
Upstream-commit: 33ab2bb52c130380e038013d68fdd8ad3c663360
Component: engine
2015-12-03 17:11:40 +01:00
d555e15f77 Add PubSub topics.
A TopicFunc is an interface to let the pubisher decide whether it needs
to send a message to a subscriber or not. It returns true if the
publisher must send the message and false otherwise.

Users of the pubsub package can create a subscriber with a topic
function by calling `pubsub.SubscribeTopic`.

Message delivery has also been modified to use concurrent channels per
subscriber. That way, topic verification and message delivery is not
o(N+M) anymore, based on the number of subscribers and topic verification
complexity.

Using pubsub topics, the API stops controlling the message delivery,
delegating that function to a topic generated with the filtering
provided by the user. The publisher sends every message to the
subscriber if there is no filter, but the api doesn't have to select
messages to return anymore.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 434d2e8745696255a204d9eefc6a2854ff74e5c2
Component: engine
2015-12-02 16:43:49 -05:00
79750c94df Make filtering a linear operation.
Improves the current filtering implementation complixity.
Currently, the best case is O(N) and worst case O(N^2) for key-value filtering.
In the new implementation, the best case is O(1) and worst case O(N), again for key-value filtering.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 93d1dd8036d57f5cf1e5cbbbad875ae9a6fa6180
Component: engine
2015-12-02 11:12:42 -05:00
71b21cf347 This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over

This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: b3e527dfd242ad30c0297c8b257862116cf2c50e
Component: engine
2015-12-02 10:06:59 -05:00
57432b4d63 Merge pull request #17438 from pmalmgren/17037-systemd226-cgroup
Fix docker status incorrectly reports containerized
Upstream-commit: c84f5dfd7431dfef94a073b47f591515a58d9e00
Component: engine
2015-11-30 11:47:16 -08:00
e285c73838 Merge pull request #18241 from LK4D4/remove_listenbuffer
Remove listenbuffer
Upstream-commit: 2a354790a635537c2ed5325b6615e9bdccdc6954
Component: engine
2015-11-30 14:37:14 -05:00
d6e4b2d7b7 Merge pull request #18178 from jfrazelle/apparmor-we-meet-again
Fix docker-default profile handing signals
Upstream-commit: e852959fadf7ec77ffb57877806603b8c0bf523e
Component: engine
2015-11-30 11:34:34 -08:00
d3dbad3a43 check version for docker-default aa profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: f8db9a09e0ec9b1925839ffff4f1cc5fe3ace630
Component: engine
2015-11-30 10:18:12 -08:00
0940f2e2b9 Merge pull request #18296 from jfrazelle/add-james
add james golick to names generator
Upstream-commit: 221d979e7b6fbc1c631370a8d44bc588b68df543
Component: engine
2015-11-30 10:00:21 -08:00
3f8975aab8 Remove listenbuffer package
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a0251b2bbfe259c8d089e34415159f1b609779be
Component: engine
2015-11-30 09:04:59 -08:00
59911bba39 Remove usage of listenbuffer package
It actually adds nothing to queuing requests.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ca5795cef810c85f101eb0aa3efe3ec8d756490b
Component: engine
2015-11-30 09:04:55 -08:00
21928a9bde Merge pull request #18226 from duglin/Issue18170
Fix for zero-sized layers
Upstream-commit: a26accfb5d52f81b6df339da36855b85d3a473fe
Component: engine
2015-11-30 09:57:37 -06:00
bbfa3215a0 add james golick to names generator
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: bf66deeb080787c3bda9aa619d3cdb22c68bbee1
Component: engine
2015-11-29 10:40:12 -08:00
a047f4a27c Fix for zero-sized layers
Moved a defer up to a better spot.

Fixed TestUntarPathWithInvalidDest to actually fail for the right reason

Closes #18170

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 7bb9fc415ac50abf5f754005264bfe152eeca7d6
Component: engine
2015-11-25 18:02:03 -08:00
89ca8a3104 Fix spelling of 'existent'
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Upstream-commit: 899caaca9c990067d541231c6d288de89dbb79e7
Component: engine
2015-11-25 13:45:37 +00:00
0093235ece Merge pull request #17924 from aaronlehmann/content-addressability
Content addressability
Upstream-commit: a2ab05098d1033f6b282ccaf7301f2a31eda1a9c
Component: engine
2015-11-24 11:01:33 -08:00
e105a29374 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4352da7803d182a6013a5238ce20a7c749db979a
Component: engine
2015-11-24 09:40:25 -08:00
bea0c01ef1 Fix race in locker call to dec()
Can't safely use uint32 for locker since we need to decrement the count,
which requires loading the unit and doing some math, which is inherintly
racey.
Instead use Int32 which we can safely use with atomic and AddInt32 with
`-1`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 985175fd8f8f662d5067bd62a89330e9a437375c
Component: engine
2015-11-24 11:59:09 -05:00
60942ba73e Ensure adding a broken tar doesn't silently fail
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 3243e504d01ea1efa141f3e3cc296903d7d62ca4
Component: engine
2015-11-23 14:18:58 +00:00
f9f128d85f Merge pull request #18146 from JamesKyburz/random-additions
Random additions
Upstream-commit: 692bfdaee3b48f4e5174bb80098692a0ded1aecf
Component: engine
2015-11-21 13:18:09 -05:00
9f0c131692 Merge pull request #16613 from WeiZhang555/docker-cp-symlink
Add option `-L` to allow `docker cp` follow symbol link
Upstream-commit: 3ff9bb53326312a66fee19bc56dd2ad9c642b133
Component: engine
2015-11-21 17:03:24 +01:00
d6089c6fe2 Add nauseous and pedantic
Signed-off-by: James Kyburz <james.kyburz@gmail.com>
Upstream-commit: f8a6726daddedd33c9e14db2133b0f5321c5ff5f
Component: engine
2015-11-21 16:23:07 +01:00
b97ed2a561 Merge pull request #17495 from mikebrow/docker-tz-and-nanosecond-updates
modifying docker --since and --until to support nanoseconds and time …
Upstream-commit: 6653f827965b431139af141fa2cc68a6513abe71
Component: engine
2015-11-20 23:37:44 +01:00
4599b4fbfc Merge pull request #17456 from Microsoft/TestChtimesFix
Fix ChTimes to prevent setting times past the Unix Max Time
Upstream-commit: 6e727a4c8037d3ea43913ee23f34c9babaf420eb
Component: engine
2015-11-20 18:07:09 +01:00
27af07df7b Add '-L' option for cp
Fixes #16555

Original docker `cp` always copy symbol link itself instead of target,
now we provide '-L' option to allow docker to follow symbol link to real
target.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 92600bdec1284f9031868751f61bef476d2e1dbd
Component: engine
2015-11-21 00:36:56 +08:00
e1191bf537 Merge pull request #17459 from brahmaroutu/Power_Z_CI
Build and test Docker on IBM Power and Z using gccgo. Enable CI on Po…
Upstream-commit: 249b3a9479048bcec8da0666c2e224dddcfc3de8
Component: engine
2015-11-19 15:50:07 -08:00
1d43e38301 Merge pull request #18082 from MHBauer/gh9406
Remove defaults for flags/options that expect no value
Upstream-commit: 9c21e852b2674a68d9b0fbbada368f5b7818b494
Component: engine
2015-11-19 15:06:21 -08:00
5fc4e385a6 This fixes Chtimes on systems with 32 bit Timespec
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 318ad1cb43bcf01f03d790ae258506121f30f117
Component: engine
2015-11-19 11:08:29 -08:00
c97969e0fa Merge pull request #18090 from vdemeester/17478-follow-up-cleanup-pkg-platform
Follow-up of 17478, unexport runtimeArchitecture method
Upstream-commit: aade9536b6b64f6db385f38078b20bff846aec54
Component: engine
2015-11-19 14:00:23 -05:00
135336d608 Move charsToString to architecture dependent source to fix casting problem
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: 7c1d49d90cbd91d7cc06d92686e2d09dd3dcac27
Component: engine
2015-11-19 18:09:08 +01:00
f51688acff Remove defaults for flags/options that expect no value
- isZeroValue function from upstream go
 - covers booleans, strings and numbers
 - change integration to reflect new behavior
 - resolves #9406

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 48718a3c772681b4a3644ba304d37fb9382e6f73
Component: engine
2015-11-19 08:37:51 -08:00
521256e49f Follow-up of 17478, unexport private method
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0ff3c10aa8328c1f574ae6dd8caf5e20c3b97dfa
Component: engine
2015-11-19 14:55:57 +01:00
42a56c8bb4 Merge pull request #17986 from bogdangrigg/master
Fix small typos in documentation files
Upstream-commit: c83373112c908f7c5afc85fc6b08640817920a6d
Component: engine
2015-11-17 16:45:38 -08:00
7f6a96fa5d Merge pull request #17434 from little-arhat/fix/newlines-in-json-status
Add newlines to FormatProgress for JSON as well
Upstream-commit: 53556183c7649480852d13d168a28dcfe92ac7f1
Component: engine
2015-11-17 15:52:31 -08:00
c4d89a3f60 Merge pull request #17478 from vdemeester/pr-13921
Carry#13921 : Expand /info: Expose OSType (GOOS), Architecture (GOARCH)
Upstream-commit: 104dab87ea73fbf7e4e592c2045b4f1ab56c6cfe
Component: engine
2015-11-17 15:44:57 -08:00
eb219a3ce5 Use /usr/lib/os-release if /etc/os-release is missing.
As per os-release spec, /usr/lib/os-release file should be tried if
/etc/os-release is missing.

http://www.freedesktop.org/software/systemd/man/os-release.html

Thanks James Hunt <james.o.hunt@intel.com> and
Dimitri John Ledkov <dimitri.j.ledkov@intel.com> for contribution.

Close #17174

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 292a15e40a7201801fb9b0abd81175fd0a09a814
Component: engine
2015-11-16 16:21:31 -08:00
2052e6ad6a Fix small typos in documentation files
Signed-off-by: Luca-Bogdan Grigorescu <bogdan@gmail.com>
Upstream-commit: d1e72baa15fb81a6dcf80e6727b884fc8ff67335
Component: engine
2015-11-15 00:53:27 +02:00
964f8b63bd Add pkg/parsers/architecture and pkg/platform
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 49779b674af09b46c165c8dfe2e76054336b0595
Component: engine
2015-11-14 23:03:02 +01:00
a1e14407db Merge pull request #17971 from narqo/simplify-addr-formating
Simplify final address formatting in parser.ParseTCPAddr
Upstream-commit: 1448cd3ec26ba98d4a0d53ff02a987ddab80939d
Component: engine
2015-11-14 08:38:09 +01:00
cf05bcf15c Build and test Docker on IBM Power and Z using gccgo. Enable CI on Power and Z.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: b1cc78b8f5d0c85c80c04a15fa791025ae7d22e6
Component: engine
2015-11-14 03:16:45 +00:00
d91b38c0d5 Merge pull request #17877 from aaronlehmann/capped-bytespipe
Cap the amount of buffering done by BytesPipe
Upstream-commit: 13963957ebadc663915aed8c61451a93db41c27c
Component: engine
2015-11-14 00:51:11 +02:00