Commit Graph

11545 Commits

Author SHA1 Message Date
Alexandr Morozov 18d9f1978b Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 08:26:22 -08:00
Brian Goff e86223e7b3 Bring API docs inline with 1.3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-11-05 09:38:44 -05:00
Vivek Goyal 8c9e5e5e05 devmapper: Save and restore NextDeviceId in a file
The way thin-pool right now is designed, user space is supposed to keep
track of what device ids have already been used. If user space tries to
create a new thin/snap device and device id has already been used, thin
pool retuns -EEXIST.

Upon receiving -EEXIST, current docker implementation simply tries the
NextDeviceId++ and keeps on doing this till it finds a free device id.

This approach has two issues.

- It is little suboptimal.
- If device id already exists, current kenrel implementation spits out
  a messsage on console.

[17991.140135] device-mapper: thin: Creation of new snapshot 33 of device 3 failed.

Here kenrel is trying to tell user that device id 33 has already been used.
And this shows up for every device id docker tries till it reaches a point
where device ids are not used. So if there are thousands of container and
one is trying to create a new container after fresh docker start, expect
thousands of such warnings to flood console.

This patch saves the NextDeviceId in a file in
/var/lib/docker/devmapper/metadata/deviceset-metadata and reads it back
when docker starts. This way we don't retry lots of device ids which 
have already been used. 

There might be some device ids which are free but we will get back to them
once device numbers wrap around (24bit limit on device ids).

This patch should cut down on number of kernel warnings.

Notice that I am creating a deviceset metadata file which is a global file
for this pool. So down the line if we need to save more data we should be
able to do that.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2014-11-05 09:25:02 -05:00
Vivek Goyal 8e9a18039b devmapper: Export nextDeviceId so that json.Marshal() can operate on it
I was trying to save nextDeviceId to a file but it would not work and
json.Marshal() will do nothing. Then some search showed that I need to
make first letter of struct field capital, exporting this field and
now json.Marshal() works.

This is a preparatory patch for the next one.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2014-11-05 09:25:02 -05:00
Vivek Goyal 67fbd34d83 devmapper: Move file write and rename functionality in a separate function
Currently we save device metadata and have a helper function saveMetadata()
which converts data in json format as well as saves it to file. For
converting data in json format, one needs to know what is being saved.

Break this function down in two functions. One function only has file
write capability and takes in argument about byte array of json data.
Now this function does not have to know what data is being saved. It
only knows about a stream of json data is being saved to a file.

This allows me to reuse this function to save a different type of
metadata. In this case I am planning to save NextDeviceId so that
docker can use this device Id upon next restart. Otherwise docker
starts from 0 which is suboptimal.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2014-11-05 09:25:02 -05:00
Blake Geno cbb88741e4 Removed fixme from utils_test.go
Signed-off-by: Blake Geno <blakegeno@gmail.com>
2014-11-05 08:36:08 -05:00
James Turnbull a61c4dc959 Merge pull request #8876 from whoshuu/docpatch-2
Remove out-of-context code block
2014-11-05 10:52:50 +01:00
unclejack 03f67aa46a bump fpm to 1.3.2
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-05 10:12:57 +02:00
unclejack 662efd95c7 Merge pull request #8577 from vbatts/vbatts-registry_certs
registry: don't iterate through certs
2014-11-05 09:46:24 +02:00
James Turnbull 387c892126 Merge pull request #8915 from gDD/patch-1
Remove extra line feed typo
2014-11-05 08:22:09 +01:00
James Turnbull 49ecc499d7 Merge pull request #8908 from medimatrix/patch-1
Grammatical mistake in docs
2014-11-05 08:21:00 +01:00
George Xie c81337d5db unify `–`(en dash) to `-` when specifying options
Signed-off-by: Xie Shi <georgexsh@gmail.com>
2014-11-05 13:50:59 +08:00
Sven Dowideit 0d513b5a84 Merge pull request #8900 from nhsiehgit/updatefooter
Updatefooter
2014-11-04 17:14:58 -08:00
Tibor Vass b79211f4ae Merge pull request #8345 from duglin/Issue5184
Add a better error message when we get an unknown http issue
2014-11-04 20:07:41 -05:00
Doug Davis 6fdaa66652 Add a better error message when we get an unknown http issue
Closes #5184

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-04 16:46:41 -08:00
Sven Dowideit 098ccba6bd Merge pull request #8892 from fredlf/relnotes-edit
Edits and refinements to 1.3.1 release notes.
2014-11-04 16:43:07 -08:00
Blake Geno 224999d9c2 made getDefaultNetworkMtu private
Signed-off-by: Blake Geno <blakegeno@gmail.com>
2014-11-04 18:53:34 -05:00
Nathan Hsieh ebeccee968 Updated footer to match rest of site
Signed-off-by: Nathan Hsieh <hsieh.nathan@gmail.com>
2014-11-04 15:28:38 -08:00
Tianon Gravi c478143ec0 Merge pull request #8404 from danjpgriffin/master
Preserve extended attributes and acls on archlinux build
2014-11-04 14:14:10 -07:00
Vincent Batts a368e064a9 registry: don't iterate through certs
the golang tls.Conn does a fine job of that.
http://golang.org/src/pkg/crypto/tls/handshake_client.go?#L334

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-04 16:12:23 -05:00
Tianon Gravi 14e65b4f81 Merge pull request #8936 from jfrazelle/drone-server
Switch Travis for Drone
2014-11-04 11:18:39 -07:00
Tianon Gravi c6cf978b4b Merge pull request #8700 from unclejack/install_no_pull
contrib/install.sh: remove pull of hello-world
2014-11-04 10:28:43 -07:00
Solomon Hykes 59d4161f69 Merge pull request #8950 from Bertg/patch-1
makes the -s --size option documentation clearer
2014-11-04 09:09:15 -08:00
unclejack f9d80712d9 contrib/install.sh: remove pull of hello-world
This removes the pull of the hello-world image from install.sh to
address privacy concerns.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-04 19:05:47 +02:00
Alexandr Morozov b8678aa7f5 Merge pull request #8946 from unclejack/stream_decode
Decode JSON to avoid ReadFile
2014-11-04 09:02:40 -08:00
Bert Goethals 762ffda95d makes the -s --size option documentation clearer 2014-11-04 17:49:39 +01:00
Jessie Frazelle a34f31b488 Merge pull request #8871 from tonistiigi/start-wait-hijack
Wait for hijack on docker start command
2014-11-04 08:46:56 -08:00
Tibor Vass fa59fe997c Merge pull request #8877 from erikh/proxy_error_check
proxy: Fix a potential panic handling error states.
2014-11-04 11:40:02 -05:00
Tibor Vass 6718791ea2 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
Arnaud Porterie edae8830a9 Merge pull request #8906 from dqminh/remove-copy-directory
change util.CopyDirectory to archive.CopyWithTar
2014-11-04 08:02:35 -08:00
Alexandr Morozov 9eb8fcd58a Merge pull request #8390 from MalteJ/set-macaddress
Adding docker-cli run param to set MAC address
2014-11-04 07:54:59 -08:00
Malte Janduda 28605bc4d5 enhancing set-macaddress docu #2
Signed-off-by: Malte Janduda <mail@janduda.net>
2014-11-04 15:19:47 +01:00
unclejack f665be55fe volume: stream JSON & Decode
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-04 16:15:07 +02:00
unclejack 4dbbe4f51a image: stream img JSON & Decode in LoadImage
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-04 16:15:00 +02:00
unclejack 4bc28f4e6b daemon/container: stream & decode JSON
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-04 16:14:47 +02:00
Sven Dowideit b68d7d39bc Merge pull request #8924 from pdericson/api-doc-fix
Fix typo in api docs: stdou -> stdout
2014-11-03 23:09:16 -08:00
Patrick Hemmer 95a400e6e1 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 63c303eecd.

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2014-11-03 23:09:08 -05:00
Tibor Vass 5b03a21963 Merge pull request #8799 from jlhawn/remove_jsondata_arg
Remove `jsonData` argument from `image.StoreImage`
2014-11-03 20:55:40 -05:00
Jessica Frazelle 4b4b88a873 Switch travis status to drone.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-11-03 17:48:50 -08:00
Jessica Frazelle 471adb73a9 Remove travis CI.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-11-03 17:46:33 -08:00
Josh Hawn 26184de8ab Remove `jsonData` argument from `image.StoreImage`
The argument specified the json data to save to disk when registering
a new image into the image graph. If it is nil, then the given image
is serialized to json and that is written by default. This default
behavior is sufficient if the given image was originally deserialzed
from this jsonData to begin with which has always been the case.

Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-03 17:39:21 -08:00
Tibor Vass 54d6d12556 Merge pull request #8863 from vbatts/vbatts-archive_stat
./pkg/archive: clean up Stat_t assertion
2014-11-03 19:14:39 -05:00
Tibor Vass b8ab729ae6 Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix
On daemon shutdown iptables cleanup successfully
2014-11-03 18:29:51 -05:00
Fred Lifton 06f366bf00 Added missing item from Changelog
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
2014-11-03 13:51:51 -08:00
Fred Lifton 1a1b0f223d Edits and refinements to 1.3.1 release notes.
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
2014-11-03 13:50:42 -08:00
Michael Crosby a7dea37b78 Merge pull request #8901 from dmcgowan/v2_registry_mirror_check
Skip V2 registry and immediately fallback to V1 when mirrors are provided
2014-11-03 13:37:55 -08:00
Tibor Vass a85f58719f Merge pull request #8739 from duglin/CleanupDockerIgnores
Do some cleanup on .dockerignore paths
2014-11-03 16:05:24 -05:00
Tibor Vass 38d3888194 Merge pull request #8932 from duglin/UpdateLogrus
Update logrus to the latest so we can use ParseLevel() for PR #8335
2014-11-03 16:00:22 -05:00
Fred Lifton 8872c2903a Merge pull request #8907 from icecrime/clarify_user_instruction_doc
Clarify USER instruction documentation
2014-11-03 11:58:56 -08:00
Doug Davis a12d897394 Update logrus to v0.6.0 so we can use ParseLevel() for PR #8335
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-03 11:57:30 -08:00