Commit graph

851 commits

Author SHA1 Message Date
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
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
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
Ahmet Alp Balkan
718066ad61 Refactor pkg/archive with a platform-independent stat struct
pkg/archive contains code both invoked from cli (cross platform) and
daemon (linux only) and Unix-specific dependencies break compilation on
Windows. We extracted those stat-related funcs into platform specific
implementations at pkg/system and added unit tests.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:54 -08:00
Ahmet Alp Balkan
515e7481de Extract mknod, umask, lstat to pkg/system
Some parts of pkg/archive is called on both client/daemon code. To get
it compiling on Windows, these funcs are extracted into files with
build tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:54 -08:00
Ahmet Alp Balkan
91ea04eea7 Extract client signals to pkg/signal
SIGCHLD and SIGWINCH used in api/client (cli code) are not
available on Windows. Extracting into separate files with build
tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:53 -08:00
John Gossman
2d644f8ab1 Refactor pkg/term package for Windows tty support
Signed-off-by: John Gossman <johngos@microsoft.com>
2014-11-14 18:20:53 -08:00
Michael Crosby
d246e5f28e Merge pull request #9164 from vbatts/vbatts-dm_removedevice
pkg/devicemapper: cleanup removeDevice differences
2014-11-14 16:56:02 -08:00
Michael Crosby
2b00ffc088 Merge pull request #9172 from vbatts/vbatts-dm_maintainer
pkg/devicemapper: missed MAINTAINERS on split
2014-11-14 13:29:34 -08:00
Vincent Batts
3bce14e7d0 pkg/devicemapper: defer udev wait during removal
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-14 15:17:33 -05:00
Vincent Batts
bc41337f3b pkg/devicemapper: missed MAINTAINERS on split
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-14 11:12:23 -05:00
Vincent Batts
7f1cdd81f0 pkg/devicemapper: cleanup removeDevice differences
Fixes failure on RemoveDevice when host is AUFS, and running
devicemapper test docker-in-docker

https://gist.github.com/tonistiigi/59559cbfb3f2df26b29c

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-13 22:43:03 -05:00
unclejack
e4af529ed7 Merge pull request #8869 from jlhawn/tarsum_version
Finalize TarSum Version 1 w/ refactor
2014-11-14 01:12:22 +02:00
Michael Crosby
004eb9e894 Merge pull request #8930 from vbatts/vbatts-mount_freebsd_fields
pkg/mount: adding fields supported by freebsd
2014-11-13 11:54:16 -08:00
Michael Crosby
2533456bd3 Merge pull request #8897 from vbatts/vbatts-mount_sharedsubtree
pkg/mount: sharedsubtree options and testing
2014-11-13 11:26:29 -08:00
07198ca6eb Merge pull request #8986 from vbatts/vbatts-pkg_devicemapper_bindings
devicemapper: split out devicemapper bindings
2014-11-12 19:59:36 -05:00
Steven Burgess
cabd5528e2 Fix comment to match the arg name
Signed-off-by: Steven Burgess <steven.a.burgess@hotmail.com>
2014-11-11 18:01:08 -05:00
unclejack
513934f6b1 pkg/archive: add interface for Untar
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-11 18:28:33 +02:00
58acf884c3 pkg/tarsum: adding more tests
Ensuring case size of headers will still be accounted for.
https://github.com/docker/docker/pull/8869#discussion_r20114401

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-11 08:48:11 -05:00
Alexandr Morozov
b87098729a Merge pull request #9028 from unclejack/add_yeong-sil_jang
pkg/namesgenerator: add Yeong-Sil Jang
2014-11-10 10:07:27 -08:00
Arnaud Porterie
828dd345d4 Merge pull request #6810 from phemmer/4442-hairpin-nat
Support hairpin NAT
2014-11-10 08:53:01 -08:00
unclejack
08768fd690 pkg/namesgenerator: add Yeong-Sil Jang
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-08 16:36:41 +02:00
Alexandr Morozov
3647373969 Merge pull request #8931 from vbatts/vbatts-mount_pid_mountinfo
pkg/mount: mountinfo from specified pid
2014-11-07 12:04:52 -08:00
Vincent Batts
2f09118747 pkg/mount: mountinfo from specified pid
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-07 13:37:23 -05:00
Michael Crosby
85f33388b4 Merge pull request #8983 from LK4D4/consistent_hosts
Consistent hosts
2014-11-06 11:51:28 -08:00
Alexandr Morozov
5ebff7da57 Test for etchosts consistency
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-06 11:36:09 -08:00
Alexandr Morozov
5ecbc5de38 Make /etc/hosts records consistent
Fixes #8972

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-06 11:36:00 -08:00
Yohei Ueda
3a138a9b5e Fix the unit test not to remove /tmp
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-07 02:43:59 +09:00
Vincent Batts
a5ad3ec0b7 devicemapper: split out devicemapper bindings
This is a first pass at splitting out devicemapper into separate, usable
bindings.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-05 18:10:38 -05:00
Josh Hawn
78ae4e8ad1 Finalize TarSum Version 1 w/ refactor
The current Dev version of TarSum includes hashing of extended
file attributes and omits inclusion of modified time headers.

I refactored the logic around the version differences to make it
more clear that the difference between versions is in how tar
headers are selected and ordered.

TarSum Version 1 is now declared with the new Dev version continuing
to track it.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-04 21:38:52 -08:00
Tibor Vass
bf0a0e9ca7 Merge pull request #8813 from jlhawn/aufs_exclude_on_tar_layer
Exclude `.wh..wh.*` AUFS metadata on layer export
2014-11-04 11:38:12 -05:00
Patrick Hemmer
21fc078476 Support hairpin NAT
This re-applies commit b39d02b with additional iptables rules to solve the issue with containers routing back into themselves.

The previous issue with this attempt was that the DNAT rule would send traffic back into the container it came from. When this happens you have 2 issues.
1) reverse path filtering. The container is going to see the traffic coming in from the outside and it's going to have a source address of itself. So reverse path filtering will kick in and drop the packet.
2) direct return mismatch. Assuming you turned reverse path filtering off, when the packet comes back in, it's goign to have a source address of itself, thus when the reply traffic is sent, it's going to have a source address of itself. But the original packet was sent to the host IP address, so the traffic will be dropped because it's coming from an address which the original traffic was not sent to (and likely with an incorrect port as well).

The solution to this is to masquerade the traffic when it gets routed back into the origin container. However for this to work you need to enable hairpin mode on the bridge port, otherwise the kernel will just drop the traffic.
The hairpin mode set is part of libcontainer, while the MASQ change is part of docker.

This reverts commit 63c303eecdbaf4dc7967fd51b82cd447c778cecc.

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2014-11-03 23:09:08 -05:00
Vincent Batts
8f30e895b2 pkg/mount: include optional field
one linux, the optional field designates the sharedsubtree information,
if any.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-03 22:05:04 -05:00
Tibor Vass
98e403702a Merge pull request #8863 from vbatts/vbatts-archive_stat
./pkg/archive: clean up Stat_t assertion
2014-11-03 19:14:39 -05:00
Vincent Batts
3a2c49a3d9 pkg/mount: adding fields supported by freebsd
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-03 14:01:50 -05:00
Vincent Batts
3894be0339 pkg/mount: testing for linux sharedsubtree mounts
* shared
* shared/slave
* unbindable
* private

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-10-31 15:31:34 -04:00