Commit Graph

911 Commits

Author SHA1 Message Date
4b105a7583 Create tests for pkg/iptables
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
Upstream-commit: 0da92633b4161ed1f8babe5ec4a9fe98257d34b5
Component: engine
2014-12-21 12:57:32 +10:00
ae55b92633 Create DOCKER forward chain on driver init
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
Upstream-commit: 2865373894f1532fa725481e8f04db4a5d7a0aa8
Component: engine
2014-12-21 12:57:32 +10:00
c720d69487 Move per-container forward rules to DOCKER chain
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
Upstream-commit: cc89b30d35edc02fc598a0b26fe7a1ed002238e4
Component: engine
2014-12-21 12:57:32 +10:00
913aff3176 pkg/units: fix size_test.go compilation
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: e59aad9cd387bf20dc0f4664afdd5c55b394cb5b
Component: engine
2014-12-19 18:38:12 +02:00
ad1b9f394b Merge pull request #9746 from unclejack/graphdb_fix
pkg/graphdb: use transactions for transactions
Upstream-commit: f7a449f92b88ca2a3db2fb33abade8c25a19c390
Component: engine
2014-12-19 11:11:59 -05:00
e2e02c60dd pkg/graphdb: use transactions for transactions
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: e9f37a011872fa89669dc105df27e1c6e16124b6
Component: engine
2014-12-19 13:57:21 +02:00
c7d1f45ca3 Merge pull request #9233 from inatatsu/fix-pkg-units-size-for-gccgo
Fix to avoid a compile error due to float to int truncation with GCCGO
Upstream-commit: 2acb856dff848bd69c5e971f6352854a26362164
Component: engine
2014-12-18 18:33:01 -08:00
5cdc9005f7 pkg/tarsum: delete the logging code
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: e7c0587d541cd9f224df622b2f97c918e68cfb05
Component: engine
2014-12-18 23:38:26 +02:00
9c05f0eaf9 Refactor to optimize storage driver ApplyDiff()
To avoid an expensive call to archive.ChangesDirs() which walks two directory
trees and compares every entry, archive.ApplyLayer() has been extended to
also return the size of the layer changes.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 35a22c9e12c05e2a0a205964702ced78ea39d7a1
Component: engine
2014-12-17 21:54:23 -08:00
7662fb34f6 Fix to avoid a compile error due to float to int truncation with GCCGO
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: c16e41245ebaf426a5ad27ebe82597647c7743a3
Component: engine
2014-12-17 22:44:55 +00:00
bebcb13002 Fix vet errors about formatting directives
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a7ae7fed7311551975d2bccb7417c328be3ea478
Component: engine
2014-12-12 10:58:56 -08:00
7886e44221 Fix vet errors about unkeyed fields
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e7d086c2be41dfedfa5f2fb0c437eb5bbf6f2f5d
Component: engine
2014-12-12 10:44:59 -08:00
d25c7e6450 Decompress archive before streaming the unpack in a chroot
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	pkg/archive/archive.go
	pkg/chrootarchive/archive.go

Conflicts:
	pkg/archive/archive.go
Upstream-commit: 001ac15b54686761960352103ebf4ff2c6e1d803
Component: engine
2014-12-11 16:29:13 -05:00
a176492278 Update chroot apply layer to handle decompression outside chroot
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	pkg/archive/diff.go
	pkg/chrootarchive/archive.go

Conflicts:
	pkg/archive/diff.go
	pkg/chrootarchive/diff.go
Upstream-commit: 7862f831fe99a221a0499b7764a8709e5f463bb9
Component: engine
2014-12-11 16:28:24 -05:00
c828e1305e symlink: add more tests
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 5f0f0c228d438f01c3b9837eb6e8e97133d9d1f5
Component: engine
2014-12-11 16:26:01 -05:00
9e40785aa2 symlink: cleanup names and break big test into multiple smaller ones
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: ff4d05ed73dfff44f9bb919a0a6fccff17f866a9
Component: engine
2014-12-11 16:26:01 -05:00
8345114eb4 Refactor of symlink tests to remove testdata dir
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: b7f352b0fb7159af283275437ad69142addab13b
Component: engine
2014-12-11 16:26:01 -05:00
203304857b Simplify FollowSymlinkInScope based on Go 1.3.3's EvalSymlinks
Signed-off-by: Andrew Page <admwiggin@gmail.com>
Upstream-commit: fa3ec89515431ce425f924c8a9a804d5cb18382f
Component: engine
2014-12-11 16:26:01 -05:00
62c0414eca Merge pull request #9258 from rhvgoyal/transaction-id-improvements
devmapper fix usage of pool transaction id 
Upstream-commit: 74bbb935715a3f384a4a3a527053af5419f5a72e
Component: engine
2014-12-11 12:58:18 -05:00
7f9567ff56 Merge pull request #9099 from vbatts/vbatts-tarsum_spec
pkg/tarsum: specification on TarSum checksum algorithm
Upstream-commit: 428c263a6c2a0606a5eed25beaf2ef93da14a4b7
Component: engine
2014-12-10 10:24:48 -08:00
a4b445d2e9 Flush stdin from within chroot archive
This makes sure that we don't buffer in memory and that we also flush
stdin from diff as well as untar.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d1535131d259bb8a980770d47c0865a1be4373e3
Component: engine
2014-12-08 15:41:07 -08:00
d19caad485 Merge pull request #9539 from flynn/chroot-untar-empty-archive-slow
Fix chroot untar for zero padded archive from slow reader
Upstream-commit: c9285a08b161f31f37915f929252c9ba1a83ffa9
Component: engine
2014-12-08 17:59:21 -05:00
c21c1c5984 Removed race condition
If two interrupts were fired really quickly interruptCount could have been incremented twice before the LoadUint32 making cleanup not being called at all.

Signed-off-by: Erik Dubbelboer <erik@dubbelboer.com>
Upstream-commit: 46b1194d996f6535e657bcb88428303305d3fe68
Component: engine
2014-12-06 22:52:19 +08:00
6465d98afa Fix chroot untar for zero padded archive from slow reader
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Upstream-commit: c128c134d71d01c555a6354d2ae7f6964f93df90
Component: engine
2014-12-06 02:44:31 +00:00
93dd7fb297 Merge pull request #9479 from jlhawn/tarsum_test_fix
Correct TarSum benchmarks: 9kTar and 9kTarGzip
Upstream-commit: 984b072a37ee090bc24511137919211ec2fbb542
Component: engine
2014-12-05 14:47:54 -08:00
9d37d55377 Correctly close generated benchmark archives
Another update to TarSum tests, this patch fixes an issue where
the benchmarks were generating archives incorrectly by not closing
the tarWriter.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 385917e22c5bd0d577a5a0be0de9e88a0499fe87
Component: engine
2014-12-03 22:26:06 -08:00
de88b2cc7b Fix output format where no variable specified in mount pkg
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6fd818f3ef8ca018b74544362c37d41a1095ba9d
Component: engine
2014-12-03 19:02:51 -08:00
65e3ca93a1 Merge pull request #9451 from erikh/fix-sqlite
graphdb: initialize the database semi-idempotently on every connection, not just new installs.
Upstream-commit: 8520fd55b66b44f669f6ad6886c7c46d066bd6ca
Component: engine
2014-12-03 17:17:20 -08:00
717d7acf81 Fix invalid argument error on push
With 32ba6ab from #9261, TempArchive now closes the underlying file and
cleans it up as soon as the file's contents have been read. When pushing
an image, PushImageLayerRegistry attempts to call Close() on the layer,
which is a TempArchive that has already been closed. In this situation,
Close() returns an "invalid argument" error.

Add a Close method to TempArchive that does a no-op if the underlying
file has already been closed.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 48ec176cd51da20e23564941da2d9906a7779d28
Component: engine
2014-12-03 16:12:24 -05:00
54cbb45483 Correct TarSum benchmarks: 9kTar and 9kTarGzip
These two cases did not actually read the same content with each iteration
of the benchmark. After the first read, the buffer was consumed. This patch
corrects this by using a bytes.Reader and seeking to the beginning of the
buffer at the beginning of each iteration.

Unfortunately, this benchmark was not actually as fast as we believed. But
the new results do bring its results closer to those of the other benchmarks.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 92fd49f7ca42cf5d97825853034eac685b90fc1d
Component: engine
2014-12-03 10:44:05 -08:00
eb11479882 devmapper: Use device id as specified by caller
Currently devicemapper CreateDevice and CreateSnapDevice keep on retrying
device creation till a suitable device id is found. 

With new transaction mechanism we need to store device id in transaction
before it has been created.

So change the logic in such a way that caller decides the devices Id to
use. If that device Id is not available, caller bumps up the device Id
and retries.

That way caller can update transaciton too when it tries a new Id. Transaction
related patches will come later in the series.
  
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 7b2b15d3e9f9b7ad898a36bbe5ceb42c9ca58d47
Component: engine
2014-12-03 13:06:43 -05:00
efbc3f4d55 Fix TarSum iteration test
I noticed that 3 of the tarsum test cases had expected a tarsum with
a sha256 hash of
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
As I've been working with sha256 quite a bit lately, it struck me that
this is the initial digest value for sha256, which means that no data
was processed. However, these tests *do* process data. It turns out that
there was a bug in the test handling code which did not wait for tarsum
to end completely. This patch corrects these test cases.

I'm unaware of anywhere else in the code base where this would be an issue,
though we definitily need to look out in the future to ensure we are
completing tarsum reads (waiting for EOF).

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 8d9e25dbddc189f4094e0f25a90f2b8a25deec9d
Component: engine
2014-12-02 15:28:13 -08:00
7bc79faafb graphdb: initialize the database semi-idempotently on every connection.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: fb06e1c6ebcf5408e6a7d0bfcf9264571eab69a1
Component: engine
2014-12-02 03:02:25 -08:00
e1900eef38 Merge pull request #9407 from hqhq/hq_fix_comments
flag: fix the comments
Upstream-commit: 42522d29c7351d960e2346f1e19e0ac6f7ce7ad5
Component: engine
2014-12-01 11:27:06 -08:00
86e291ef5c flag: fix the comments
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 9cc73c62e6779bf2c8eefc4192c017a2c73daf40
Component: engine
2014-11-30 01:58:16 +08:00
b86ab101dc Change path breakout detection logic in archive package
Fixes #9375

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: be5bfbe2217905ba129588fe17264b96c866e26d
Component: engine
2014-11-28 09:44:47 -08:00
7b6399d928 Merge pull request #9006 from snitm/thin-pool-improvements
Thin pool improvements
Upstream-commit: b47ff77b5ce852bd830bc617d1c4e2c37e346281
Component: engine
2014-11-26 14:44:09 -05:00
326fa034ea Merge pull request #9279 from yoheiueda/termios-via-cgo
Use termios via CGO
Upstream-commit: 79064a28203496c8f63510e73c32a7135f456a27
Component: engine
2014-11-25 20:04:26 -05:00
77c62b2fac Cleanup ParseHost
Current implementation is comingling things that ought not be together.
There are _some_ similarities between parsing for the different proto
types, but they are more different than alike, making the code extremely
difficult to reason about.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bd4fe9b9867c7633e520130b99e02798f49e6b44
Component: engine
2014-11-25 18:55:40 -05:00
fb0b016635 pkg/tarsum: add maintainers & add missing s
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 3db5ea1617549bbef7f645d4ecbf482ad1f31c71
Component: engine
2014-11-26 00:44:16 +02:00
fb15ffbdaa Use termios via CGO only on Linux
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
Upstream-commit: dfcf05a5d070823ade84ffba0e9784cdfe6d54b0
Component: engine
2014-11-25 20:49:01 +09:00
3388d83b40 Fix to avoid a compilation error of size_test.go with GCCGO due to float to int truncation
Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
Upstream-commit: 82a5cd0d3701fc559fb92290ed6bc2974a9d8b6d
Component: engine
2014-11-25 18:12:22 +09:00
132b9f8479 Revert "Fix to avoid a compile error due to float to int truncation with GCCGO"
This reverts commit 967a42f116d23051c862a3b4983925de2016f83c.

Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>

Roll back the change to fix the parameter of HumanSize from int64 to float64
Upstream-commit: 36560a76d71f1222122c9e6c82f76a609da564e9
Component: engine
2014-11-25 16:48:09 +09:00
ce14110804 tarsum: updates for jamtur01 comments
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7f84174109b734fac309c02e4b474aeff9dfca15
Component: engine
2014-11-24 23:18:48 -05:00
230f6a737f pkg/tarsum: review cleanup
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 3d6e63e0c4bab556fb8bd0abb65e4f7af35256fd
Component: engine
2014-11-24 23:18:48 -05:00
69cf264910 pkg/tarsum: review amendments
(separate commit to preserve github conversation)

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 3e08fb5ad2b882b12a396e258bc745254fac6f51
Component: engine
2014-11-24 23:18:48 -05:00
b9ee0de7eb pkg/tarsum: specification on TarSum checksum
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: f30fee69b14a5fd9df9abb00498f2aff6e378bbe
Component: engine
2014-11-24 23:18:47 -05:00
ed716fd8a8 Merge pull request #9323 from unclejack/merge_release_v1.3.2
Merge release v1.3.2 to master
Upstream-commit: e6ec703df31f04c3ea3a6aeb19881494a6ae58ae
Component: engine
2014-11-24 19:26:36 -05:00
bb7432e3f1 Merge pull request #9324 from crosbymichael/git-urls
Move IsGIT and IsURL to urlutil package
Upstream-commit: 2ad98b0cfa355901d345ab361160439b1a283971
Component: engine
2014-11-24 16:07:42 -08:00
5861a679d7 Merge pull request #9173 from vbatts/vbatts-dm_clarify_TaskCreate
pkg/devicemapper: clarify TaskCreate and createTask
Upstream-commit: fc66a22df6c08f1434eb77991410a1359c5afa49
Component: engine
2014-11-24 15:45:54 -08:00