Commit graph

769 commits

Author SHA1 Message Date
unclejack
2f3002a00b add pkg/chrootarchive and use it on the daemon
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-11 23:20:02 +02:00
unclejack
53245b1ad0 pkg/archive: add interface for Untar
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-11 23:19:54 +02:00
unclejack
d98455f741 pkg/reexec: move reexec code to a new package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	integration/runtime_test.go
		fixed imports
2014-11-11 23:19:34 +02:00
unclejack
ffb90589a5 pkg/symlink: avoid following out of scope
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-10 17:57:54 +02:00
shuai-z
1942888a9f removed redundant Clean
The doc (or src) says: The result is Cleaned.

http://golang.org/pkg/path/filepath/#Join

Signed-off-by: shuai-z <zs.broccoli@gmail.com>
2014-11-10 17:57:01 +02:00
Michael Crosby
63363f2d49 Merge pull request #8350 from erikh/add_erikh_maintainer_proxy
Add erikh as maintainer of pkg/proxy
2014-10-01 15:50:41 -07:00
Erik Hollensbe
773d3ad712 Add erikh as maintainer of pkg/proxy
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-01 15:37:46 -07:00
Rafe Colton
bd898dfb55 Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific
packages, only those in pkg and vendor, it can be safely moved into pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
2014-09-29 23:23:36 -07:00
Rafe Colton
fdc594e811 Move Matches() file path matching function into pkg/fileutils
This is the second of two steps to break the archive package's
dependence on utils so that archive may be moved into pkg. `Matches()`
is also a good candidate pkg in that it is small, concise, and not
specific to docker internals

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
2014-09-29 23:21:41 -07:00
Rafe Colton
32cc6ab501 Move Go() promise-like func from utils to pkg/promise
This is the first of two steps to break the archive package's dependence
on utils so that archive may be moved into pkg.  Also, the `Go()`
function is small, concise, and not specific to the docker internals, so
it is a good candidate for pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
2014-09-29 23:16:27 -07:00
Derek McGowan
6a33e70bd5 pkg/tarsum: fix panic with dynamic buffer
When read is called on a tarsum with a two different read sizes, specifically the second call larger than the first, the dynamic buffer does not get reallocated causing a slice read error.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2014-09-25 15:58:35 -07:00
Alexandr Morozov
56483ba9b4 Test for jsonlog.WriteLog
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 19:19:25 +04:00
Alexandr Morozov
4b052e7192 Benchmark for jsonlog.WriteLog
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-23 18:24:18 +04:00
Victor Vieux
c8ef31d338 Merge pull request #5956 from vbatts/vbatts-tarsum_hashes
tarsum: allow for generic hashes
2014-09-22 11:11:25 -07:00
unclejack
deaded4ca8 pkg/jsonlog: avoid JSONLog allocation in loop
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 18:57:28 +03:00
Alexandr Morozov
be805c6709 Close logs pipes and catch write errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-22 10:55:46 +04:00
Alexandr Morozov
f87a053913 Change unused WriteCloser to Writer
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-22 10:54:58 +04:00
Guillaume Dufour
e7af2e5d92 FIX 6613:launch docker fail with space named drive
Signed-off-by: Guillaume Dufour <guillaume.duff@gmail.com>
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-19 12:07:53 -04:00
Michael Crosby
3a8f8e206f Merge pull request #6950 from jfrazelle/6831-check-flag-centos6.5
Fix duplicate iptables rules
2014-09-18 17:51:15 -07:00
Vincent Batts
dd62962c4d tarsum: allow for alternate block ciphers
Not breaking the default cipher and algorithm for calculating checksums,
but allow for using alternate block ciphers during the checksum
calculation.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-09-18 10:34:58 -04:00
Michael Crosby
ff8c7b20ac Merge pull request #8041 from unclejack/lower_allocations_broadcastwriter
lower the number of allocations in broadcastwriter
2014-09-17 15:26:44 -07:00
unclejack
bd8be73fc6 Merge pull request #7889 from vbatts/vbatts-tarsum_name_collision
tarsum: name collision fix
2014-09-17 21:59:39 +03:00
Vincent Batts
a705b08336 tarsum: name collision fix
If a tar were constructed with duplicate file names, then depending on
the order, it could result in same tarsum.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-17 14:37:46 -04:00
Alexandr Morozov
4f58459de9 Benchmark for StdWriter.Write
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-17 19:24:07 +04:00
unclejack
3a38c974cb stdcopy: improve perf by avoiding buffer growth
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 18:06:17 +03:00
unclejack
c20c59e557 move stdcopy to pkg/stdcopy
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 18:06:17 +03:00
unclejack
df3e370955 use custom marshalling for JSONLog
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 17:03:54 +03:00
unclejack
4154bf0817 add the timeutils package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 14:30:08 +03:00
e32fdc563a Merge pull request #8063 from jlhawn/tarsum_empty_tar_archive
tarsum: correct close and finish reads
2014-09-16 15:41:28 -04:00
Tibor Vass
a6dc61ec4c Merge pull request #8059 from estesp/8057-refactor-regexp-to-package-var
Refactor all pre-compiled regexp to package level vars
2014-09-16 15:04:23 -04:00
Phil Estes
c876988ae5 Refactor all pre-compiled regexp to package level vars
Addresses #8057

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2014-09-16 12:57:44 -04:00
Josh Hawn
96721b293c Correct tarsum finish logic
Tarsum now correctly closes the internal TarWriter which appends
a block of 1024 zeros to the end of the returned archive.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
2014-09-16 09:34:21 -07:00
Vincent Batts
1fd5c14258 tarsum: version the addition of xattrs
Now that TarSum can be versioned, move the addition of xattr headers in
to the next version of TarSum

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-15 16:08:05 -04:00
Vincent Batts
3417eb9f00 tarsum: include xattr headers in to the checksum
this is to enhance the tarsum algorithm, but _MUST_ be done in lock step
with the same for docker-registry. (PR will be cited)

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-09-15 15:05:01 -04:00
Vincent Batts
ed3d01687d tarsum: TarSum is not the interface
don't export the exsisting TarSum struct and call the interface 'TarSum'
instead.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-10 21:56:20 -04:00
Vincent Batts
14689ec238 TarSum: versioning
This introduces Versions for TarSum checksums.
Fixes: https://github.com/docker/docker/issues/7526

It preserves current functionality and abstracts the interface for
future flexibility of hashing algorithms. As a POC, the VersionDev
Tarsum does not include the mtime in the checksum calculation, and would
solve https://github.com/docker/docker/issues/7387 though this is not a
settled Version is subject to change until a version number is assigned.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-10 15:41:52 -04:00
47dabd55c0 Merge pull request #7921 from unclejack/increase_tarsum_buffer_size
pkg/tarsum: make buffer size dynamic
2014-09-09 16:10:02 -04:00
Vincent Batts
910b15be64 tarsum: use Debugf, not Infof
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-09 14:07:20 -04:00
Jessica Frazelle
3ed103c543 Fix duplicate iptables rules
If iptables version is < 1.4.11, try to delete the rule vs. checking if it exists. Fixes #6831.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: jfrazelle)
2014-09-07 15:12:19 -07:00
unclejack
76941e89b6 pkg/tarsum: add dynamic buffer sizing
This commit makes tarsum buffer allocation dynamic. This change
is required to avoid allocating memory excessively after the archive
buffering changes.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-06 17:39:43 +03:00
unclejack
884c3c7461 pkg/pool: add pools for bufio readers & writers
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:39 +03:00
unclejack
2a633df603 pkg/ioutils: add ReaderErrWrapper to readers
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
unclejack
65f57a95bb pkg/ioutils: add NewBufReaderWithDrainbufAndBuffer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
unclejack
028b28e406 pkg/ioutils: add WriteCloserWrapper
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
unclejack
27a8494fa3 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
Michael Crosby
d5de317844 Merge pull request #7809 from LK4D4/use_increment
Use increment operator
2014-09-01 11:16:25 -07:00
Alexandr Morozov
11c8ff4db8 Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-30 21:43:48 +04:00
Sven Dowideit
6a1cc969fc fs.Visit() returns nil flag
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
2014-08-29 15:38:03 +10:00
Michael Crosby
47f57a7b7c Merge pull request #7647 from ewindisch/erw-tarsum-maintainer
Add Eric Windisch to MAINTAINER for tarsum
2014-08-27 20:00:19 -07:00
Erik Hollensbe
e404a69123 pkg/networkfs/etchosts: tests for Update method
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:23:41 -07:00