Commit Graph

16981 Commits

Author SHA1 Message Date
Shijiang Wei e2c6a8be7c Add the parent directory to changes set if new files are generated
The "TestChangesWithChanges" case randomlly fails on my development
VM with the following errors:
```
--- FAIL: TestChangesWithChanges (0.00s)
        changes_test.go:201: no change for expected change C /dir1/subfolder != A /dir1/subfolder/newFile
```

If I apply the following patch to changes_test.go, the test passes.

```diff
diff --git a/pkg/archive/changes_test.go b/pkg/archive/changes_test.go
index 290b2dd..ba1aca0 100644
--- a/pkg/archive/changes_test.go
+++ b/pkg/archive/changes_test.go
@@ -156,6 +156,7 @@ func TestChangesWithChanges(t *testing.T) {
        }
        defer os.RemoveAll(layer)
        createSampleDir(t, layer)
+       time.Sleep(5 * time.Millisecond)
        os.MkdirAll(path.Join(layer, "dir1/subfolder"), 0740)

        // Let's modify modtime for dir1 to be sure it's the same for the two layer (to not having false positive)
```

It seems that if a file is created immediately after the directory is created,
the `archive.Changes` function could't recognize that the parent directory of
the new file is modified.

Perhaps the problem may reproduce on machines with low time precision?
I had successfully reproduced the failure on my development VM as well as
a VM on DigitalOcean.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-06-10 20:29:29 +08:00
Nicolas Borboën e12839fa5a Typo psuedo - pseudo
Signed-off-by: ponsfrilus <ponsfrilus@gmail.com>
2015-06-10 13:27:55 +02:00
Arnaud Porterie 55bdb51659 Merge pull request #13699 from calavera/volume_backwards
Allow to downgrade local volumes from > 1.7 to 1.6.
2015-06-09 19:51:06 -07:00
David Calavera bd9814f0db Allow to downgrade local volumes from > 1.7 to 1.6.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-06-09 18:04:59 -07:00
Michael Crosby 4750e1f77e Merge pull request #13784 from mrjana/cnm_integ
libnetwork: Add garbage collection trigger
2015-06-09 17:24:30 -07:00
Arnaud Porterie c3b962d327 Merge pull request #13831 from LK4D4/update_libcontainer
Update libcontainer to v2.1.1
2015-06-09 17:12:20 -07:00
Arnaud Porterie 13baeb3b70 Merge pull request #13815 from tiborvass/do-not-send-basic-auth-on-302
Do not set auth headers for registry v1 if 302
2015-06-09 15:34:53 -07:00
Jessie Frazelle ceee2595b6 Merge pull request #12583 from Mic92/hack/explicit-bundles
Hack/explicit bundles
2015-06-09 14:34:52 -07:00
mapk0y 416e855e9b fix typo.
Signed-off-by: mapk0y <mapk0y@gmail.com>
2015-06-10 06:26:07 +09:00
Alexander Morozov 38acd31e8a Update libcontainer to v2.1.1
It includes fix for mounting / as volume on SELinux.
docker/libcontainer#619

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-09 13:54:57 -07:00
Alexander Morozov 5e86b818ed Merge pull request #13828 from calavera/plugin_fixes
Fix volume plugin serialization.
2015-06-09 13:30:55 -07:00
David Calavera 18ddc2728d Merge pull request #13805 from aboch/czo
Add integ test for unpublished ports in ps o/p
2015-06-09 11:30:06 -07:00
Alexander Morozov 06aef2b5c2 Merge pull request #13819 from Mashimiao/optimize-logic-of-get-container
daemon: cleanup getting container logic
2015-06-09 10:42:24 -07:00
David Calavera 30448166de Fix volume plugin serialization.
Unmarshal errors into strings.
Fix `omit` typos.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-06-09 10:39:46 -07:00
Alessandro Boch 7b9ae696d8 Add integ test for unpublished ports in ps o/p
- This is a test to assert the fix #13734

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-09 09:40:19 -07:00
Sebastiaan van Stijn 90259fed2e Merge pull request #12031 from jlhawn/build_cache_ignore_mtime
Make build cache ignore mtime
2015-06-09 18:26:07 +02:00
James Turnbull 3b01dac44d Merge pull request #13814 from duglin/DocTweak
Fix COPY/ADD quoted/json form
2015-06-09 04:56:35 -04:00
Ma Shimiao 73bc885b23 daemon: cleanup getting container logic
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-06-09 14:47:07 +08:00
Jörg Thalheim 2b4facdf2e hack: explicit bundles for integration-cli prequisites
no longer load hide critical code such as in .integration-daemon-{start,stop},
if this step failed, it will had logged the corresponding module before:

---> Making bundle: .integration-daemon-start (in bundles/1.7.0-dev/daemon-start)

which is nicer to debug.

This will make it also easier to execute a single tests in an interactive shell.

$ make shell
docker> . hack/make.sh binary .integration-daemon-start .integration-daemon-setup
docker> docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED STATUS              PORTS               NAMES
docker> go test github.com/docker/docker/integration-cli

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-06-09 07:22:26 +02:00
Alexander Morozov 7f6aa3b783 Merge pull request #13816 from xiekeyang/remove
Registry: remove unwanted return variable name
2015-06-08 20:38:30 -07:00
xiekeyang a31be25121 Registry: remove unwanted return variable name
Signed-off-by: xiekeyang <xiekeyang@huawei.com>
2015-06-09 10:58:33 +08:00
Jessie Frazelle 5e0e71bbe0 Merge pull request #13714 from flavio/add-suse-support-to-docker-installer
Added openSUSE and SUSE Linux Enterprise support to install.sh
2015-06-08 17:20:33 -07:00
Tibor Vass 123a0582b2 Do not set auth headers if 302
This patch ensures no auth headers are set for v1 registries if there
was a 302 redirect.

This also ensures v2 does not use authTransport.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-06-08 19:59:39 -04:00
Doug Davis f4a3e8bef0 Fix COPY/ADD quoted/json form
Minor tweak to the quoted/json form and made man page look like the Dockerfile
docs.  W/o the `,` people may think there should be a space delimited list.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-06-08 16:40:20 -07:00
Jessie Frazelle a2ab067b3c Merge pull request #13022 from Microsoft/10662-addrsrc
Windows: Add resources for manifest and icon
2015-06-08 15:16:10 -07:00
Jessie Frazelle 75f63499a0 Merge pull request #12992 from aidanhs/aphs-easy-debug-build
Allow passing DOCKER_DEBUG= to `make`
2015-06-08 15:15:49 -07:00
John Howard 9a9dc5ba96 Windows: Don't build Linux graph drivers
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-08 15:09:33 -07:00
David Calavera 4ad05ed985 Merge pull request #13808 from Microsoft/10662-volumefixcompile
Windows: Fix PR13278 compile break
2015-06-08 15:02:47 -07:00
Tianon Gravi 969cb545ae Merge pull request #13546 from hqhq/hq_checkconfig_rescount
Don't check RESOURCE_COUNTERS in new kernel
2015-06-08 14:43:17 -07:00
Tianon Gravi c69d3b749d Merge pull request #13790 from jfrazelle/update-authors-mailmap
update authors and mailmap
2015-06-08 14:24:32 -07:00
Josh Hawn cd7e2a6b2b [docs] Update builder docs on last-modified times
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-08 13:55:02 -07:00
Josh Hawn 0e10507a1c [builder] Make build cache ignore mtime
Build cache uses pgk/tarsum to get a digest of content which is
ADD'd or COPY'd during a build. The builder has always used v0 of
the tarsum algorithm which includes mtimes however since the whole
file is hashed anyway, the mtime doesn't really provide any extra
information about whether the file has changed and many version
control tools like Git strip mtime from files when they are cloned.

This patch updates the build subsystem to use v1 of Tarsum which
explicitly ignores mtime when calculating a digest. Now ADD and
COPY will result in a cache hit if only the mtime and not the file
contents have changed.

NOTE: Tarsum is NOT a meant to be a cryptographically secure hash
function. It is a best-effort approach to determining if two sets of
filesystem content are different.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-08 13:54:47 -07:00
John Howard 71eadd4176 Windows: Fix PR13278 compile break
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-08 13:47:09 -07:00
Michael Crosby b099eb796a Merge pull request #13800 from eolamey/13799-fix-docs-url-in-systemd-service-file
Fix docs URL in systemd service file.
2015-06-08 09:36:36 -07:00
Sebastiaan van Stijn 875eafb00b Merge pull request #13713 from draghuram/manport
Fix examples in "docker port" man page.
2015-06-08 17:08:37 +02:00
Raghuram Devarakonda bf6492e689 Fix examples in "docker port" man page.
Closes #13667.

Signed-off-by: Raghuram Devarakonda <draghuram@gmail.com>
2015-06-08 10:40:24 -04:00
James Turnbull c622ca6d4b Merge pull request #13797 from eolamey/13796-tiny-systemd-docs-improvements
Tiny improvements to systemd docs.
2015-06-08 08:57:13 -04:00
Eric-Olivier Lamey 68bfd9e3ae Tiny improvements to systemd docs.
Show how to use `systemctl show` and recommend against modifying
system unit files in `/usr` and `/lib`.

Fixes #13796.

Signed-off-by: Eric-Olivier Lamey <eo@lamey.me>
2015-06-08 12:05:34 +00:00
Eric-Olivier Lamey dbf5e36fd6 Fix docs URL in systemd service file.
Fixes #13799.

Signed-off-by: Eric-Olivier Lamey <eo@lamey.me>
2015-06-08 10:21:43 +00:00
Alexander Morozov a63c7c7be6 Merge pull request #13582 from coolljt0725/remove_useless_code
Cleanup: remove some useless code
2015-06-07 23:01:39 -07:00
Jana Radhakrishnan c68e7f96f9 libnetwork: Add garbage collection trigger
When the daemon is going down trigger immediate
garbage collection of libnetwork resources deleted
like namespace path since there will be no way to
remove them when the daemon restarts.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-07 21:33:51 -07:00
Lei Jitang 67552fb22d Cleanup: remove some useless code and change verifyHostConfig to verifyContainerSetting
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-06-08 09:06:58 +08:00
Doug Davis 5d22afc54e Merge pull request #13795 from michael-k/daemonFolder
[integration-cli] Made doc consistent with code
2015-06-07 16:57:54 -04:00
Michael Käufl 54ac3d9c76 Made doc consistent with code
The name of the folder was shortened in a1ea562

Signed-off-by: Michael Käufl <docker@c.michael-kaeufl.de>
2015-06-07 22:32:29 +02:00
Doug Davis 07b22fcf50 Merge pull request #13787 from runcom/check-nil-Config
Avoid nil pointer dereference while creating a container with an empty Config
2015-06-07 12:28:41 -04:00
James Turnbull 3c37a307bc Merge pull request #13791 from eolamey/minor-docs-fixes
Fix a typo and a minor formatting issue in the docs.
2015-06-07 09:25:15 -04:00
Eric-Olivier Lamey 173d0918a8 Fix a typo and a minor formatting issue in the docs.
Signed-off-by: Eric-Olivier Lamey <eo@lamey.me>
2015-06-07 12:49:03 +00:00
Jessica Frazelle ae68dfe31b update authors and mailmap
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-06-06 21:42:14 -07:00
Alexander Morozov 3d10540bc3 Merge pull request #13757 from eolamey/13755-we-would-like-default-gateway-back-please
Restore --default-gateway{,-v6} daemon options.
2015-06-06 16:02:59 -07:00
Antonio Murdaca 4ce817796e Avoid nil pointer dereference while creating a container with an empty Config
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-06 20:07:32 +02:00