Commit graph

885 commits

Author SHA1 Message Date
Alexander Morozov
04fb504442 Merge pull request #9479 from jlhawn/tarsum_test_fix
Correct TarSum benchmarks: 9kTar and 9kTarGzip
2014-12-05 14:47:54 -08:00
Josh Hawn
d98b6f38ba 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)
2014-12-03 22:26:06 -08:00
Jessica Frazelle
267e518231 Fix output format where no variable specified in mount pkg
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-03 19:02:51 -08:00
Jessie Frazelle
7a025f3fdf Merge pull request #9451 from erikh/fix-sqlite
graphdb: initialize the database semi-idempotently on every connection, not just new installs.
2014-12-03 17:17:20 -08:00
Andy Goldstein
5e3e0f129e 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>
2014-12-03 16:12:24 -05:00
Josh Hawn
985d3bd404 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)
2014-12-03 10:44:05 -08:00
Josh Hawn
2b403ab360 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)
2014-12-02 15:28:13 -08:00
Erik Hollensbe
12efe03ef0 graphdb: initialize the database semi-idempotently on every connection.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-12-02 03:02:25 -08:00
Michael Crosby
8c02df4c6c Merge pull request #9407 from hqhq/hq_fix_comments
flag: fix the comments
2014-12-01 11:27:06 -08:00
Qiang Huang
16130e775f flag: fix the comments
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-11-30 01:58:16 +08:00
Alexandr Morozov
2ebf95a81e Change path breakout detection logic in archive package
Fixes #9375

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-28 09:44:47 -08:00
4e3563a9b6 Merge pull request #9006 from snitm/thin-pool-improvements
Thin pool improvements
2014-11-26 14:44:09 -05:00
1867fe24fe Merge pull request #9279 from yoheiueda/termios-via-cgo
Use termios via CGO
2014-11-25 20:04:26 -05:00
Brian Goff
32fb3913b5 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>
2014-11-25 18:55:40 -05:00
unclejack
f47ea48cfe pkg/tarsum: add maintainers & add missing s
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2014-11-26 00:44:16 +02:00
Yohei Ueda
c1532556b2 Use termios via CGO only on Linux
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-25 20:49:01 +09:00
Tibor Vass
3792c61c3c Merge pull request #9323 from unclejack/merge_release_v1.3.2
Merge release v1.3.2 to master
2014-11-24 19:26:36 -05:00
Jessie Frazelle
201d4c614e Merge pull request #9324 from crosbymichael/git-urls
Move IsGIT and IsURL to urlutil package
2014-11-24 16:07:42 -08:00
Michael Crosby
fffe2a4d4d Merge pull request #9173 from vbatts/vbatts-dm_clarify_TaskCreate
pkg/devicemapper: clarify TaskCreate and createTask
2014-11-24 15:45:54 -08:00
Michael Crosby
d7eadc78dc Move git and url checks into pkg
This moves the IsGIT and IsURL functions out of the generic `utils`
package and into their own `urlutil` pkg.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-24 18:10:37 -05:00
Tibor Vass
bdff6d8011 archive: do not call FollowSymlinkInScope in createTarFile
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-11-25 01:03:41 +02:00
unclejack
78bd3c0356 pkg/chrootarchive: provide TMPDIR for ApplyLayer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-25 01:03:41 +02:00
Tibor Vass
a80a838e6f archive: prevent breakout in ApplyLayer
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-11-25 01:03:41 +02:00
Tibor Vass
aa62eca940 archive: prevent breakout in Untar
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-11-25 01:03:41 +02:00
Tibor Vass
1752a203af archive: add breakout tests
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	pkg/archive/archive.go
		fixed conflict which git couldn't fix with the added BreakoutError

Conflicts:
	pkg/archive/archive_test.go
		fixed conflict in imports
2014-11-25 01:03:41 +02:00
unclejack
5343f641d3 don't call reexec.Init from chrootarchive
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	daemon/graphdriver/aufs/aufs_test.go
		fixed conflict caused by imports
2014-11-25 01:03:40 +02:00
Tibor Vass
466e44195a pkg/chrootarchive: pass TarOptions via CLI arg
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	graph/load.go
		fixed conflict in imports
2014-11-25 01:03:40 +02:00
unclejack
e19f49915f add pkg/chrootarchive and use it on the daemon
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	builder/internals.go
	daemon/graphdriver/aufs/aufs.go
	daemon/volumes.go
		fixed conflicts in imports
2014-11-25 01:03:40 +02:00
unclejack
2746675b42 pkg/symlink: avoid following out of scope
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-25 00:27:05 +02:00
Doug Davis
0b5fa520c2 Add missing unit testcase for new IsSet() func in mflag
Forgot to add this when I did PR #9259

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-22 05:37:36 -08:00
Jessie Frazelle
ecb536e190 Merge pull request #9188 from somaopensource/8777-fix
Fix for #8777 (continuing PR #9061)
2014-11-21 17:57:56 -08:00
Vincent Batts
6948710cc0 pkg/devicemapper: clarify TaskCreate and createTask
* Rename and expose createTask() to TaskCreateNamed()
* add comments

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-21 20:54:50 -05:00
Michael Crosby
7b1da173e5 Merge pull request #9183 from vbatts/dm_udevwait
devmapper: Call UdevWait() even in failure path
2014-11-21 17:28:37 -08:00
Michael Crosby
3aded1b5c7 Merge pull request #9086 from vbatts/vbatts-tarsum_more_tests
pkg/tarsum: adding more tests
2014-11-21 17:12:55 -08:00
Alexander Morozov
0d5323cb60 Merge pull request #9261 from unclejack/fix_test_tmp_cleanup
fix cleanup of /tmp in tests
2014-11-21 08:48:04 -08:00
Yohei Ueda
92251ceb7b Use termios via CGO
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-21 22:12:03 +09:00
Jessica Frazelle
26f399ddf3 Typed errors for iptables chain raw command output. YAYYYYYY.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-11-20 18:07:11 -08:00
Michael Crosby
4687dc48f6 Merge pull request #9259 from duglin/Issue9221
Make --tlsverify enable tls regardless of value specified
2014-11-20 17:41:31 -08:00
Michael Crosby
557dcbcc9e Merge pull request #9248 from vbatts/vbatts-fix_gh9241
pkg/tarsum: actually init the TarSum struct
2014-11-20 17:15:15 -08:00
Doug Davis
0a3565494b Make --tlsverify enable tls regardless of value specified
I also needed to add a mflag.IsSet() function that allows you to check
to see if a certain flag was actually specified on the cmd line.

Per #9221 - also tweaked the docs to fix a typo.

Closes #9221

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-20 16:09:06 -08:00
Michael Crosby
869842478e Revert "Support hairpin NAT"
This reverts commit 95a400e6e1a3b5da68431e64f9902a3fac218360.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-20 14:22:32 -08:00
unclejack
895e64b880 pkg/symlink: fix cleanup for tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-20 19:36:54 +02:00
unclejack
a590874f19 pkg/archive: fix TempArchive cleanup w/ one read
This fixes the removal of TempArchives which can read with only one
read. Such archives weren't getting removed because EOF wasn't being
triggered.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-20 19:34:35 +02:00
unclejack
bdb6fee38c pkg/system: fix cleanup in tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-20 19:33:15 +02:00
Oh Jinkyun
2ada51fd7f Fix for #8777
Now filter name is trimmed and lowercased before evaluation for case
insensitive and whitespace trimemd check.

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
2014-11-20 13:36:46 +09:00
Josh Hawn
c91f8d09a5 Add unit test for tarSum.Sum() with no data
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-19 15:55:21 -05:00
Vincent Batts
64b1cbc289 pkg/tarsum: actually init the TarSum struct
closes #9241

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-19 15:46:03 -05:00
Michael Crosby
bfe8d7af74 Merge pull request #8937 from vbatts/vbatts-mount_optional_fields
pkg/mount: include optional field
2014-11-17 18:25:00 -08:00
Vincent Batts
d2a55acf47 pkg/mount: testing mountinfo fields
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-17 16:17:06 -05:00
Vivek Goyal
17e6f792c7 devmapper: Call UdevWait() even in failure path
Currently we set up a cookie and upon failure not call UdevWait(). This
does not cleanup the cookie and associated semaphore and system will
soon max out on total number of semaphores.

To avoid this, call UdevWait() even in failure path which in turn will
cleanup associated semaphore.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-15 09:41:27 -05:00