1
0
mirror of https://github.com/docker/cli.git synced 2026-01-23 15:21:32 +03:00
Commit Graph

4237 Commits

Author SHA1 Message Date
Alexander Larsson
d9b9f3ddbd Add tests for the changes detection code
This adds 3 tests:

Verify that ChangesDirs() returns nothing when run on a copy of the
same directory.

Verify that various mutations of a directory get reported with the
right changes.

Verify that ExportChanges() + ApplyLayer() of the above mutation gets
an identical directory.

Unfortunately the last test is disabled because it fails in multiple
ways atm. But I want to get it in so that we can fix it.
Upstream-commit: f7238f94e8b5b31e78360c342676ca84b5984806
Component: engine
2013-11-15 09:49:46 +01:00
Alexander Larsson
b091059403 Use ExportChanges() in runtime.Diff()
This code was duplicated in two places, one which was unused. This
syncs the code and removes the unused version.
Upstream-commit: d69a6a20f0b6657821638ee591920d071a784b0e
Component: engine
2013-11-15 09:49:42 +01:00
Alexander Larsson
39e4a0bc9e ApplyLayer() use RemoveAll to handle removing directories
rmTargetPath can be a directory, so we have to use RemoveAll() or we
will fail to whiteout non-empty directories.
Upstream-commit: 006e2a600ce689770ba2c49805bc4f634976f365
Component: engine
2013-11-14 22:56:18 +01:00
Michael Crosby
5f7a312280 Merge branch 'dm-plugin-new-ChangesDirs' of https://github.com/alexlarsson/docker into alexlarsson-dm-plugin-new-ChangesDirs
Conflicts:
	archive/changes.go
Upstream-commit: eace2dbe1d49ad6a990f5b42f092d3f4d77bf225
Component: engine
2013-11-14 12:23:01 -08:00
Solomon Hykes
1ac8c4289f Merge pull request #29 from crosbymichael/try-load-aufs
Try to load aufs first then check in filesystems for aufs support
Upstream-commit: 099c53b28ef361c236b0c2b22dbf6a43bb647af2
Component: engine
2013-11-14 10:11:19 -08:00
Michael Crosby
93ce091ee1 Try to load aufs first then check in filesystems for aufs support
Upstream-commit: 7b2d59b91e64e72e346747cf2e561be8afc87fa7
Component: engine
2013-11-14 09:42:12 -08:00
Guillaume J. Charmes
ce293b5a8b Merge pull request #28 from crosbymichael/close-sparse-files
Close sparse files when done
Upstream-commit: 529c30261efeede3a101fc62a0f72cbf992b3b02
Component: engine
2013-11-14 07:02:47 -08:00
Michael Crosby
cfec1cc83c Close sparse files when done
Upstream-commit: bbc9fc79072bc259371aa96958336baaf8b53638
Component: engine
2013-11-13 17:05:32 -08:00
Michael Crosby
64a84d3816 Merge pull request #27 from shykes/refactor_dm
Add more dm unit tests
Upstream-commit: 7682ec04cd0a1b3a8244fe048ae20976404110f1
Component: engine
2013-11-13 16:50:26 -08:00
Guillaume J. Charmes
30fa838234 Merge branch 'shykes-0.6.5-dm-plugin' into refactor_dm
Upstream-commit: 590465b3952b008436193fc960a1d076071b1cad
Component: engine
2013-11-13 16:47:37 -08:00
Guillaume J. Charmes
ef863f235c More dm unit tests
Upstream-commit: 05d70cbcf4ebf30b11d54a177e47649e4e229403
Component: engine
2013-11-13 16:46:10 -08:00
Michael Crosby
934d4ff883 Merge pull request #26 from shykes/refactor_dm
Refactor dm
Upstream-commit: 539708aa8afeeb2c55ed9cb25948ff44f6440df5
Component: engine
2013-11-13 15:45:58 -08:00
Guillaume J. Charmes
de8a847f51 Merge branch 'shykes-0.6.5-dm-plugin' into refactor_dm
Upstream-commit: 3aaef96e3677a08aa3ca175941afcc867c1aab7c
Component: engine
2013-11-13 15:44:13 -08:00
Guillaume J. Charmes
a6f6a49815 Merge pull request #25 from crosbymichael/add-aufs-diff-test
Add test for ApplyDiff
Upstream-commit: 921e2e9ae233ac4d3227b4d3c2c435e459672897
Component: engine
2013-11-13 15:43:26 -08:00
Guillaume J. Charmes
c2fdc4428e Merge pull request #24 from crosbymichael/dm-tests
Add device mapper tests for driver.go
Upstream-commit: b50838c359ccf73b7fe2bff83b76db6d01d47643
Component: engine
2013-11-13 15:41:59 -08:00
Guillaume J. Charmes
e69802932f Add devmapper_test.go
Upstream-commit: 4bebca848ea3546cd5813ab4c13b0248050454d8
Component: engine
2013-11-13 15:35:52 -08:00
Michael Crosby
dd83a25360 Add test coverage for devicemapper driver.go
Upstream-commit: 6b3dd02bb8068fd9f1d35e75db95d0650a1d3123
Component: engine
2013-11-13 14:56:26 -08:00
Michael Crosby
1b8dd1a73f Make sure setInitialized is called when device is mounted
Upstream-commit: 80e73195583c5a9bf02c58ba92832a0bb2819361
Component: engine
2013-11-13 14:54:47 -08:00
Guillaume J. Charmes
3a53e72829 Create devmapper_wrapper.go
Upstream-commit: 1d188c8737f97a4882851ccd0150cd09c7f6c1e9
Component: engine
2013-11-13 14:36:31 -08:00
Michael Crosby
19f53e14f1 Add test for ApplyDiff
Upstream-commit: a69d86e0b19d804819d37a2a9edc03803267f579
Component: engine
2013-11-13 11:03:56 -08:00
Guillaume J. Charmes
60ef46d821 Merge pull request #15 from alexlarsson/dm-plugin-explicit-init
Remove devicemapper lazy initialization
Upstream-commit: 46ab7d1e8a4256a39ee700ae217fedca20bc1ccf
Component: engine
2013-11-13 10:46:24 -08:00
Guillaume J. Charmes
32f37aa122 Merge pull request #23 from crosbymichael/ignore-dir-sizes
Ignore dir sizes in TreeSize func
Upstream-commit: e3597624dd7b818234da50993a5b2597d11ebc5a
Component: engine
2013-11-13 10:40:03 -08:00
Michael Crosby
2e972c6b88 Ignore dir sizes in TreeSize func
Upstream-commit: a4f14528c25c4a092c30334d05008fe44275a79e
Component: engine
2013-11-13 10:33:24 -08:00
Michael Crosby
4f1e360778 Merge pull request #22 from shykes/shykes-0.6.5-dm-plugin
Fix ImageTree test
Upstream-commit: a06edd77e5e6e8de1fd1e745bc462af6cbd11001
Component: engine
2013-11-12 12:30:30 -08:00
Guillaume J. Charmes
ce008ff5b0 Fix ImageTree test
Upstream-commit: 08623dc216227d6377cb4558caedd75cacf68755
Component: engine
2013-11-12 12:25:35 -08:00
Guillaume J. Charmes
88636cc70a Merge pull request #17 from alexlarsson/dm-plugin-whiteout-directory
archive.ApplyLayer() - handle directory whiteouts
Upstream-commit: 50d80a89381366001d2e888b822a139cd8eb2025
Component: engine
2013-11-12 12:16:30 -08:00
Alexander Larsson
82914826a6 archive.ApplyLayer() - handle directory whiteouts
When directories are white-outed we can get called with the previously
removed directories. Handle this with os.IsNotExist(error).
Upstream-commit: 6f3c32eb18f0a604ba2638b6a9f19f8824412fd1
Component: engine
2013-11-12 21:14:54 +01:00
Guillaume J. Charmes
ce2d4b5f4c Merge pull request #21 from crosbymichael/pull-parent-layers
Pull parent layers first before children
Upstream-commit: 0dd92d8f1cb13a0e0d6a84bb591efae1da118c71
Component: engine
2013-11-12 11:50:20 -08:00
Michael Crosby
67a0c658d3 Pull parent layers first before children
Upstream-commit: 7301fbe035ca450e2aea86b8f2467cffd3fac18b
Component: engine
2013-11-12 11:48:35 -08:00
Guillaume J. Charmes
18c77ffe37 Merge pull request #20 from crosbymichael/force-driver-to-implement-differ
Force driver to implement differ
Upstream-commit: 4ec05b5dbfa109a0812b553258158969347c79ea
Component: engine
2013-11-12 11:48:20 -08:00
Michael Crosby
084cb15f1a Allow drivers to implement ApplyDiff in Differ interface
Upstream-commit: 5d9723002bc764e2c768e5184994d7949f55fc49
Component: engine
2013-11-11 19:09:57 -08:00
Michael Crosby
b93991acb1 Add ability to exclude files from tar
Upstream-commit: 2c7f50a77dc281289387008b4a08656e7e5328be
Component: engine
2013-11-11 14:30:38 -08:00
Michael Crosby
86d455035f Remove Differ and Changer interfaces
Add the methods to the Driver interface
to force the drivers to implement the methods
Upstream-commit: 4d1a537433ede2bbc75b0a4817e8121f9e03fd86
Component: engine
2013-11-11 12:10:53 -08:00
Solomon Hykes
675c173a12 Hack: set NONUKE environment variable to run the tests without cleanup, to investigate temp directories
Upstream-commit: ec6fe9f2007a0400a441b79c89bced5727589ba9
Component: engine
2013-11-11 18:56:21 +00:00
Solomon Hykes
dfe224141f Merge pull request #19 from alexlarsson/dm-plugin-Diff-fallback
Implement fallback operation for driver.Diff()
Upstream-commit: e87c3ea34243eb398364927d93ef27ee560e5601
Component: engine
2013-11-11 10:09:12 -08:00
Alexander Larsson
122fd6b9c2 Implement fallback operation for driver.Diff()
This moves the Diff() operation to a separate Differ interface and
implements a fallback that uses the Changes() results to encode
a diff tar.
Upstream-commit: e82f8c1661f3fa18e4dc6ca3aebe4dcc46e8961b
Component: engine
2013-11-11 17:46:07 +01:00
Alexander Larsson
d30197ef54 archive.ChagesDir() - faster and better implementation
This replaces the current version with the latest version from the
dm branch. Advantages in this version:

We only scan each directory tree once, which means less i/o and less chance
of container changes inbetween the two scans causing inconsistencies.

We avoid comparing some fields for change detection:

* Inode
* size-in-blocks
  These can change during a copy operation (e.g. in the dummy backend)
  without needing to actually reflect a change in content or metadata.

* Ctime
  Any copy operation will create a new Ctime value, and there is no
  API to change it to the "source" value.

* size for directories
  The size of a directory doesn't have to be the same just because you
  recreated the same content as another director. Internal details in
  the filesystem may make these different with no "real" change.
Upstream-commit: b6ef4bc9521346dc5066d71821c6cadfbeced9d3
Component: engine
2013-11-11 14:51:19 +01:00
Alexander Larsson
8f13be5bb1 Remove devicemapper lazy initialization
We now always initialize devicemapper on startup, so
no need for the code that did lazy initialization, we
just delete it.
Upstream-commit: b5795749d1688f99df422dd7068b189e5b25e5e9
Component: engine
2013-11-11 13:29:27 +01:00
Solomon Hykes
7c76e102e9 Don't use drivers to store temporary image downloads
Upstream-commit: 948bb29d27dc7e367cd27003c059d83301b15c4f
Component: engine
2013-11-09 00:53:58 +00:00
Michael Crosby
82d35959fb Merge pull request #13 from crosbymichael/fix-volume-mount
Do not pass container information when creating a volume
Upstream-commit: 1f35531f396dba279b289a515416351568b96c0a
Component: engine
2013-11-08 16:35:00 -08:00
Michael Crosby
23a64a84bf Merge pull request #12 from crosbymichael/core-driver-test-failures
Core driver test failures
Upstream-commit: f30c660f6fe5e313f24f1646f9b5aaa3b487f5ab
Component: engine
2013-11-08 16:33:53 -08:00
Michael Crosby
911620a74d Do not pass container information when creating a volume
Upstream-commit: ddb27268c98941b9f8a131b7b5403eb4d44beebb
Component: engine
2013-11-08 16:11:57 -08:00
Michael Crosby
28000adccb Allow drivers to export their own diff
Upstream-commit: 1eb00e1d5b375cb79d492f1c5cd95d7317bc543c
Component: engine
2013-11-08 15:32:50 -08:00
Michael Crosby
f4f11a5ecb Allow driver to provide changes if it impl the Changer interface
Upstream-commit: 95147675870e9e84deb354f09f0f670a5cb2b1e1
Component: engine
2013-11-08 14:54:20 -08:00
Michael Crosby
4806ef83eb Add unit test for child changes diff in aufs
Upstream-commit: f512049c8f9e64848cd8b1be794619f01c5227f2
Component: engine
2013-11-08 12:25:17 -08:00
Michael Crosby
c94da34819 Make sure dirs are created before injecting file
Upstream-commit: 20f690f1762e369e9ad761e166f22ff57a17275a
Component: engine
2013-11-08 12:06:15 -08:00
Michael Crosby
4c9c43a611 Use tmp dir in driver home
Upstream-commit: 6669c86fdf1ae07b66a6e178e269d797f6397bca
Component: engine
2013-11-08 11:56:34 -08:00
Solomon Hykes
22263cd931 Merge pull request #6 from alexlarsson/fix-ApplyLayer-remove
archive.ApplyLayer() remove files recursively
Upstream-commit: 78ef0bd9985d899dda6fdfc8c35d9ab47f7f07d7
Component: engine
2013-11-08 11:46:55 -08:00
Solomon Hykes
f101f6ce8f Merge pull request #10 from crosbymichael/aufs-fixes
Aufs fixes and driver dir namespaceing 
Upstream-commit: c1563de7a1b65c26fc3155194458b4c6097548e9
Component: engine
2013-11-08 11:45:45 -08:00
Michael Crosby
d9e6045c49 Name sure drivers are confined into their own dir
Upstream-commit: 08a276986c363c5b2e7435fb59935485c53aae59
Component: engine
2013-11-08 11:36:58 -08:00