Commit Graph

974 Commits

Author SHA1 Message Date
9de48f55f2 Merge pull request #10439 from estesp/10426-fix-arg-list-too-long
Pass excludes/options to tar unarchiver via environment versus cmd line
Upstream-commit: f207dd5e7c3a99b1f26014a575197e8b9cc41ed8
Component: engine
2015-02-20 23:48:55 -08:00
4ab4d22713 Merge pull request #10865 from ahmetalpbalkan/win-cli/tar-path
pkg/archive: Canonicalize stored paths
Upstream-commit: 1d382f9c2d368adfea5b12316e3836ec82bd8d81
Component: engine
2015-02-20 17:20:51 -08:00
efffe9523d Fix for help when $HOME is /
estesp noticed that when $HOME is / the ~ substitutions messes up
becuase it tries to replace all paths that start with "/" with "~".
This fixes it so that it will only replace it when $HOME isn't "/".

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 116367eb07351125754aef01f7d3da152b018710
Component: engine
2015-02-19 22:21:17 -08:00
044126e88b Pass excludes/options to tar unarchiver via environment
Fixes #10426

Because of the ability to easily overload the shell max argument list
length once the image count is several hundred, `docker load` will
start to fail because of this as it passes an excludes list of all
images in the graph.  This patch uses an environment variable with the
json marshalled through it to get around the arg length limitation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 743c9ba1fb1d946ac99bc86fb573341b2d5a0a8b
Component: engine
2015-02-19 17:53:39 -08:00
ae2aead6a0 Merge pull request #10819 from jsdir/10815-relative-path-fix
Fixed relative filepath check
Upstream-commit: 08544a89ebdb781234fd559230c5cde30da4503b
Component: engine
2015-02-19 12:54:44 -08:00
a45709a819 Shorten printed Windows paths on docker help cmd
This makes use of `%USERPROFILE%` as a substitute for
`~` on Windows and prints shorter strings for default
cert paths etc.

Also removes string escaping/quotes around default
path values printed in `docker help` command as they
are not really necessary and adds double backslashes
(\\) on windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 1c9b37cb965be459a93ce07539d7b2a53fbdbc6a
Component: engine
2015-02-18 23:04:56 -08:00
e82a370fd1 pkg/homedir: implement GetShortcutString()
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 8ca37e47607b16535468eb119e90567d4f598b8f
Component: engine
2015-02-18 22:56:03 -08:00
b5e8758d2a pkg/archive: Canonicalize stored paths
Currently pkg/archive stores nested windows files with
backslashes (e.g. `dir\`, `dir\file.txt`) and this causes
tar not being correctly extracted on Linux daemon.

This change assures we canonicalize all paths to unix
paths and add them to tar with that name independent of platform.

Fixes the following test cases for Windows CI:
- TestBuildAddFileWithWhitespace
- TestBuildCopyFileWithWhitespace
- TestBuildAddDirContentToRoot
- TestBuildAddDirContentToExistingDir
- TestBuildCopyDirContentToRoot
- TestBuildCopyDirContentToExistDir
- TestBuildDockerignore
- TestBuildEnvUsage
- TestBuildEnvUsage2

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 28842d3f093e69cf62a090a532aacba1e6ff6d1c
Component: engine
2015-02-17 16:51:04 -08:00
05210fc269 Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
Upstream-commit: 0826ac1581bdb71b889a0cb260422ce985aca317
Component: engine
2015-02-16 20:38:52 -06:00
ac657c8159 Rename BINDDIR to BIND_DIR
It turns out the back-to-back `D`s here were tripping people up because visually, it looks like a typo.  This renames the variable to `BIND_DIR`, but allows `BINDDIR` to continue working for backwards-compatibility.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 987050a52b0ce6d5ae77554a03af5923304bd3e5
Component: engine
2015-02-13 15:50:42 -07:00
440786c4fd Merge pull request #10424 from LK4D4/fix_non_tailed_log_format
Fix logs, so now, old and followed logs has same format without []
Upstream-commit: e4a49ae1885a7f80e713d1d1fc852f6e4214dfe6
Component: engine
2015-02-06 14:35:45 -08:00
dfd79f3c67 Merge pull request #9705 from acbodine/9311-truncindex-error-duplicate-id-on-ambiguous-id
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Upstream-commit: 34c804a139cc086e9fa6d3f99442f083b6d5e1e7
Component: engine
2015-02-06 14:01:28 -08:00
f888d788f6 Merge pull request #10612 from vbatts/vbatts-archive_sort
pkg/archive: sort files
Upstream-commit: 02e50999f56e7f02d670494b101e677bc1001987
Component: engine
2015-02-06 16:50:53 -05:00
62119ca587 Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: f9ae2d4fd4c5b4afb7a2299b93a800f718b63a2a
Component: engine
2015-02-06 11:42:45 -08:00
084e9ad0b5 pkg/archive: test that confirms hardlink ordering
This test was written against
master(abdfb21e3a761efdd70614de42905ff7911c5372) as a failing test, but
works with this patch set.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 899a2dda097a57a12f8794ded4a706781173aa5d
Component: engine
2015-02-06 18:14:38 +01:00
6910db2df7 pkg/archive: sort files
sort changes found and exported.

Sorting the files before appending them to the tar archive
would mean a dependable ordering for types like hardlinks.

Also, combine sort logic used

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 32d6d49539f5876e6ef75f00db917d8a3aaa0569
Component: engine
2015-02-06 18:13:57 +01:00
8423899da1 Merge pull request #10547 from duglin/Issue10214
Pretty the help text
Upstream-commit: a271eaeba224652e3a12af0287afbae6f82a9333
Component: engine
2015-02-04 11:31:18 -08:00
013dbb146f Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2203b37733e76d653cfe3b0ec5870786076adce7
Component: engine
2015-02-04 07:59:16 -08:00
5bd881552f fix comments typos
s/propogated/propagated

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Upstream-commit: ef3192f161a89bbff11d88da523be61484a822f2
Component: engine
2015-02-04 10:47:37 +08:00
b0b84165b4 Fix logs, so now, old and followed logs has same format without []
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e16bcc3928d0ae07cb9c02840fbb92f1ed2a7a3f
Component: engine
2015-01-28 17:57:10 -08:00
dbb2daa29d Merge pull request #10197 from vbatts/vbatts-dm_cookie_support
devicemapper: API for cookie support
Upstream-commit: c81fb7fa4a41dfdc21eb37dade0eb71bd1dfa855
Component: engine
2015-01-27 11:44:03 -08:00
c4558ad58c Merge pull request #10305 from jlhawn/use_tarsum_v1
Always store images with tarsum.v1 checksum added
Upstream-commit: bfa0dc47da2d9e6399fa32bda72a7074224c815d
Component: engine
2015-01-26 14:42:07 -08:00
299d22c2cc pkg/archive: remove tar autodetection log line
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: a5cc1c556dcd6dfe5c1aed4bec95aaff6ddfad61
Component: engine
2015-01-24 08:43:03 +02:00
cc58d5c62d Always store images with tarsum.v1 checksum added
Updates `image.StoreImage()` to always ensure that images
that are installed in Docker have a tarsum.v1 checksum.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: ba3bad66f92da057dba2a43ff9a512cf7ad72375
Component: engine
2015-01-23 11:30:27 -08:00
ce792ad046 Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
Upstream-commit: 4d10b32380793ce5e324a429ce2db60125aae205
Component: engine
2015-01-22 10:36:20 +03:00
685b876322 Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
Upstream-commit: d25a65375c880017ac0c516389b0b7afde810517
Component: engine
2015-01-21 17:11:31 -08:00
dcea23baf1 Merge pull request #10231 from estesp/move-iptables-check
Move iptables check out of runtime init() to separate function
Upstream-commit: f3aed2a2974bba4fdca947227d877bcc2c7d540b
Component: engine
2015-01-21 10:46:40 -08:00
b793c28c03 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 217a2bd1b62788e53fd38810b30672db58a4efc5
Component: engine
2015-01-20 20:21:47 -08:00
045cd9fe99 Add pubsub package to handle robust publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2f46b7601a3f5e11359b79624d73075b69778fbb
Component: engine
2015-01-20 20:21:46 -08:00
42697702c5 Move iptables check out of runtime init() to separate function
Due to the iptables package being `init`ed at start of the docker
runtime, this means the iptables --wait command listing all rules
is run, no matter if the command is simply "docker -h".  It makes
more sense to both locate the iptables command and check for the
wait flag support at the time iptables is actually used, as it
may not be used at all if certain network support is off/configured
differently.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 5e8285b08120f674b12a34c3f146216f6854a173
Component: engine
2015-01-20 21:04:22 -05:00
f11f701e04 Merge pull request #10222 from vbatts/vbatts-dm_flag_and_output
dm flag and output
Upstream-commit: 9b2afa04f8ab491d56614835de09eb0880250309
Component: engine
2015-01-20 18:45:43 -05:00
ca9b7e2a12 Merge pull request #10193 from vbatts/vbatts-dm_logging
devmapper: initialize log levels
Upstream-commit: fa7af79885f43bdbd0d13b6c8e1bdbab7b2cc722
Component: engine
2015-01-20 14:06:01 -05:00
3757727dfa devicemapper: define device-mapper log levels
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: a687e8d86ba07ebb42d988b6e13102569b60e673
Component: engine
2015-01-20 13:31:12 -05:00
dbf7d610b8 Merge pull request #10005 from estesp/fix-localhost-nameserver-cleanup
Clean up localhost resolv logic and add IPv6 support to regexp
Upstream-commit: e9d3e237e5cffef0dfcd4949c31959cd25863f3f
Component: engine
2015-01-20 10:30:06 -08:00
b85d65e0eb devicemapper: API for checking cookie support
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: cb81ed34a52420528281ccaa99e16c472f4f533a
Component: engine
2015-01-19 20:35:20 -05:00
5e93ebec1e Clean up localhost resolv logic and add IPv6 support to regexp
Addresses #5811

This cleans up an error in the logic which removes localhost resolvers
from the host resolv.conf at container creation start time. Specifically
when the determination is made if any nameservers are left after
removing localhost resolvers, it was using a string match on the word
"nameserver", which could have been anywhere (including commented out)
leading to incorrect situations where no nameservers were left but the
default ones were not added.

This also adds some complexity to the regular expressions for finding
nameservers in general, as well as matching on localhost resolvers due
to the recent addition of IPv6 support.  Because of IPv6 support now
available in the Docker daemon, the resolvconf code is now aware of
IPv6 enable/disable state and uses that for both filter/cleaning of
nameservers as well as adding default Google DNS (IPv4 only vs. IPv4
and IPv6 if IPv6 enabled).  For all these changes, tests have been
added/strengthened to test these additional capabilities.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 93d51e5e971e001d80e9ffa863439f2d72215b5a
Component: engine
2015-01-19 19:35:55 -05:00
279519e07d devicemapper: debug output specifics
moar information for the information gods

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 4cfe9df0a9c206c368a90f460fea8fab197265d9
Component: engine
2015-01-19 17:21:10 -05:00
2622e003cc devicemapper: define the fallback flag
DM_UDEV_DISABLE_LIBRARY_FALLBACK is disabled by most applications today
when using device-mapper, and ensuring that device-mapper is in sync
with udev. This flag instructs devicemapper to not fallback to creating
the device nodes itself. In the case of udev sync not being supported,
devicemapper will attempt to create the devices in a timely manner,
regardless of udev.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: dbb642b7fbdf42d3b401d610403ba58ebbde38d7
Component: engine
2015-01-19 17:06:53 -05:00
b3b9656da1 devicemapper: dm_udev_get_sync_support
expose an api to call dm_udev_get_sync_support/dm_udev_set_sync_support

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 9c3380039e15f11fc07741edd4cbc0c7e5c490aa
Component: engine
2015-01-19 15:15:51 -05:00
c13d2851b8 Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 213e3d116642431adbe634d39740eddc5a81e063
Component: engine
2015-01-15 14:05:05 -08:00
dea4567bd2 correct the flag comments
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 00bd7b4c414061d71d7f94b5850cbe132da623f0
Component: engine
2015-01-13 15:40:24 +08:00
6a864dec5f Merge pull request #10029 from soulshake/add-cecilia-payne-gaposchkin
Add Cecilia Payne-Gaposchkin to names generator.
Upstream-commit: 9b0072a7e63f560614fb9ba1b454b444cf4fe13e
Component: engine
2015-01-12 17:31:19 -08:00
aa2236d495 Add Cecilia Payne-Gaposchkin to the names generator.
Signed-off-by: AJ Bowen <aj@gandi.net>
Upstream-commit: 41178adb7e4e3df27c99c462b069dc9c196af2c3
Component: engine
2015-01-12 16:24:15 -08:00
502d87f39d fix issue with goimport
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: b70632ec532d4a948e227a646f8286d7c439cb4f
Component: engine
2015-01-12 22:52:19 +00:00
8015360eaf update copyrights to 2015
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e5869b2b0bdf85d15813c714565fd49943c3d754
Component: engine
2015-01-12 22:47:36 +00:00
e142c94642 Add Laura Poitras to the names generator.
http://www.wired.com/2014/10/laura-poitras-crypto-tools-made-snowden-film-possible/

Signed-off-by: AJ Bowen <aj@gandi.net>
Upstream-commit: 883d1415355244b2a2710d0860e5019bc697839b
Component: engine
2015-01-12 09:35:12 -08:00
78ad19e428 Add Aaron Swartz to the names generator.
https://en.wikiquote.org/wiki/Aaron_Swartz

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 5b8c8b1819d0f2dcbe7d708b1ae8f579a73401bd
Component: engine
2015-01-09 22:25:53 -08:00
8404235dd8 Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
Upstream-commit: 92af1f014520b4f75a6220478b01ed6a02ca5bfb
Component: engine
2015-01-08 14:06:55 -08:00
ae1406d798 Update container resolv.conf when host network changes /etc/resolv.conf
Only modifies non-running containers resolv.conf bind mount, and only if
the container has an unmodified resolv.conf compared to its contents at
container start time (so we don't overwrite manual/automated changes
within the container runtime). For containers which are running when
the host resolv.conf changes, the update will only be applied to the
container version of resolv.conf when the container is "bounced" down
and back up (e.g. stop/start or restart)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 63a7ccdd2372d87f56f7a86da07c72ea51332c2a
Component: engine
2015-01-08 14:15:13 -05:00
b060268a74 Merge pull request #8748 from duglin/Issue8330
Have .dockerignore support Dockerfile/.dockerignore
Upstream-commit: 6d780139c4b7960b482a5f4fbf043adb6673864b
Component: engine
2015-01-06 13:47:42 -08:00