Commit graph

611 commits

Author SHA1 Message Date
Darren Stahl
00fd466e00 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 22c83c567f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:40:35 -08:00
Victor Vieux
4edaaeb671 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 9c559e6d0b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:50:06 -08:00
Brian Goff
d63582c131 Allow graphdriver plugins to use v2
Currently the plugin initialization is too late for a loaded v2 plugin
to be usable as a graph driver.

This moves the initialization up before we create the graph driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 020b051dfb)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:49:03 -08:00
Tõnis Tiigi
d54f4472fd Merge pull request #28229 from darrenstahlmsft/FixUnexpectedResult
Fix failure to get containers when deleting a layer
2016-11-10 17:10:05 -08:00
Vincent Demeester
f3f9b3dac9 Merge pull request #28264 from dmcgowan/fix-overlay2-naivediff-unittest
Skip overlay2 diff tests when using naivediff
2016-11-11 00:24:06 +01:00
Darren Stahl
d4095a5902 Fix failure to get containers when deleting a layer
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-10 14:07:11 -08:00
Derek McGowan
5a1b557281
Skip overlay2 diff tests when using naivediff
Naivediff fails when layers are created directly on top of
each other. Other graphdrivers which use naivediff already
skip these tests. Until naivediff is fixed, skip with overlay2
when running tests on a kernel which causes naivediff fallback.
Fix applydiff to never use the naivediff size when not applying
changes with naivediff.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-10 13:52:22 -08:00
Michael Crosby
1883b73a57 Merge pull request #27753 from tonistiigi/fix-overlay-unmount
Fix overlay unmount for the root case
2016-11-10 13:14:45 -08:00
Brian Goff
a3b0ade346 Merge pull request #28138 from dmcgowan/handle-overlay2-copy-up-bug
Use naive diff for overlay2 when opaque copy up bug present
2016-11-09 22:29:19 -05:00
Sebastiaan van Stijn
f11ac963af Merge pull request #27915 from rhvgoyal/graph-create-opts
Pass all graphdriver create() parameters in a struct
2016-11-10 01:07:41 +01:00
Tibor Vass
5e3d777401 Merge pull request #28002 from Microsoft/jjh/noreexec
Windows: Allow a no-reexec option for importLayer
2016-11-09 14:46:21 -08:00
Derek McGowan
64b43ed5ec
Use naive diff for overlay2 when opaque copy up bug present
When running on a kernel which is not patched for the copy up bug
overlay2 will use the naive diff driver.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-09 13:42:10 -08:00
Victor Vieux
643ac2f804 Merge pull request #27433 from AkihiroSuda/fix-ovl-xfs-ftype0
overlay: warn if overlay backing fs doesn't support d_type
2016-11-09 13:39:07 -08:00
Vivek Goyal
b937aa8e69 Pass all graphdriver create() parameters in a struct
This allows for easy extension of adding more parameters to existing
parameters list. Otherwise adding a single parameter changes code
at so many places.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2016-11-09 15:59:58 -05:00
Akihiro Suda
2e20e63da2 overlay: warn if overlay backing fs doesn't support d_type
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-11-09 07:18:27 +00:00
John Howard
d9294719b5 Windows: Allow a no-reexec option for importLayer
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-08 17:57:43 -08:00
Darren Stahl
c58e8dea6c Terminate template VMs on layer delete
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-08 15:39:25 -08:00
Amit Krishnan
934328d8ea Add functional support for Docker sub commands on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-11-07 09:06:34 -08:00
Vincent Demeester
1f4137857f Merge pull request #28006 from dmcgowan/clean-overlay2-layerstore
Cleanup invalid code in overlay2 and layer store
2016-11-02 23:16:38 -07:00
John Howard
cb352501af Merge pull request #27963 from darrenstahlmsft/RenameDelete
Windows: Rename layers before deletion
2016-11-02 19:20:39 -07:00
Derek McGowan
6622cc970e
Cleanup invalid code in overlay2 and layer store
The overlay2 change ensures that the correct path is used to resolve the
symlink. The current code will not fail since the symlinks are always given
a value of "../id/diff" which ends up ignoring the incorrect "link" value.
Fix this code so it doesn't cause unexpected errors in the future if the
symlink changes.

The layerstore cleanup ensures that the empty layer returns a tar stream if
the provided parent is empty. Any value other than empty still returns an
error since the empty layer has no parent. Currently empty layer is not
used anywhere that TarStreamFrom is used but could break in the future if
this function is called.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-02 16:13:53 -07:00
Alexander Morozov
78a83a2269 Merge pull request #27932 from thaJeztah/promote-overlay
promote overlay(2) graphdriver
2016-11-02 07:00:49 -07:00
Darren Stahl
be68006d19 Windows: Rename layers before deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-01 18:05:09 -07:00
Michael Crosby
22f3e43e9a Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
2016-11-01 14:30:18 -07:00
Brian Goff
362369b4bb Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-01 13:41:59 -04:00
Sebastiaan van Stijn
299beff1c4
promote overlay(2) graphdriver
Now that overlay has matured, using
overlay is a better choice than devicemapper
on loopback devices.

This change promotes overlay in the
priority list. It also adds the
overlay2 graphdriver to the list
because overlay2 (if supported)
should be preferred over overlay.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-10-31 23:32:10 -07:00
Daehyeok Mun
fa710e504b Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

Fixed issue #23459

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-10-31 22:05:01 -06:00
John Howard
4fac603682 Windows: support docker diff
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-28 11:06:54 -07:00
Tonis Tiigi
e4349ad901 Fix overlay unmount for the root case
In root case no mount call or reference count
increment actually happens so don’t try to unmount.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-25 14:40:13 -07:00
Kenfe-Mickael Laventure
7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Stephen J Day
aa2cc18745
pkg/archive: remove unnecessary Archive and Reader type
The `archive` package defines aliases for `io.ReadCloser` and
`io.Reader`. These don't seem to provide an benefit other than type
decoration. Per this change, several unnecessary type cases were
removed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-10-20 19:31:24 -07:00
YuPengZTE
fa378413f8 Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-10-19 17:46:27 +08:00
Derek McGowan
520034e35b
Add limit to page size used by overlay2 driver
Go can falsely report a larger page size than supported,
causing overlay2 mount arguments to be truncated. When overlay2
detects the mount arguments have hit the page limit, it will
switch to using relative paths. If this limit is smaller than
the actual page size there is no behavioral problems, but if it
is larger mounts can fail for images with many layers.

Closes #27384

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-10-18 17:34:19 -07:00
Alexander Morozov
32156e1758 Merge pull request #27483 from YuPengZTE/devFixLink
Fix the typo of link in devmapper
2016-10-18 12:45:31 -07:00
YuPengZTE
f7701d90a9 Fix the typo of link in devmapper
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-10-18 16:02:38 +08:00
Daniel Nephin
eb4c4b7ecf Make golint happy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-17 17:28:27 -07:00
Daniel Nephin
767727480f move graphdriver/projectquota.go to its own package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-17 17:27:24 -07:00
Amir Goldstein
9ea5071446 projectquota: fix build failure with new kernels
In kernel version >= v4.5 the project quota ioctl definitions
have been made public via the include/uapi/linux/fs.h API, so
that ext4 could use the same API.

Avoid re-defining the ioctl API if it is already defined in fs.h.

Signed-off-by: Amir Goldstein <amir73il@aquasec.com>
2016-10-17 21:44:23 +03:00
Michael Crosby
8863a9f62c Merge pull request #24771 from aquasecurity/xfs_quota
Implement XFS quota for overlay2
2016-10-17 09:23:42 -07:00
Sebastiaan van Stijn
f2c094cb99 Merge pull request #27334 from darrenstahlmsft/ExpandSandboxSizeZero
Windows: Stop expanding sandbox size when no new size is specified
2016-10-14 17:51:32 -07:00
Sebastiaan van Stijn
429812f86a Merge pull request #27335 from barracks510/master
Simplify function signature
2016-10-13 18:54:01 -07:00
Elena Morozova
64238fef8c all: replace loop with single append
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
2016-10-13 13:31:52 -07:00
Dennis Chen
445620f231 Simplify function signature
Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-10-12 21:31:55 -04:00
Darren Stahl
0da31c68f1 Stop expanding sandbox size when no new size is specified
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-12 16:58:57 -07:00
Anusha Ragunathan
a98be0344b Update plugingetter import path in docker/docker.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-10-11 11:24:18 -07:00
Tonis Tiigi
d1a83059f7 Fix naivediffdriver timestamp precision bug
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-10-07 13:52:17 -07:00
Brian Goff
c2f57291ac Merge pull request #26898 from YuPengZTE/devErrorsNew
In error, the first letter is low-case letter
2016-09-27 10:10:57 -04:00
YuPengZTE
110ab746ba In error, the first letter is low-case letter
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-09-27 10:40:07 +08:00
Michael Crosby
c35ab68665 Merge pull request #26536 from anusha-ragunathan/aufs_unmount
Add retry logic during aufs unmount.
2016-09-26 13:17:12 -07:00
Anusha Ragunathan
0e539fec33 Add retry logic during aufs unmount.
Treat EBUSY as a transient error and retry. Also stop ignoring unmount errors.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-09-23 13:15:04 -07:00