Commit Graph

620 Commits

Author SHA1 Message Date
38849b2667 Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 677fa03654886ee776ff478c30681d5376cfc196
Component: engine
2016-12-22 15:30:25 -05:00
44fa4f8ae7 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
Upstream-commit: ea2dd4b5d0b41552d047814d9e39ddaa3662ab41
Component: engine
2016-12-21 20:16:19 +08:00
b70f98ab3e Make graphdriver plugin use plugin BasePath
Also enables `PropagatedMount` for graphdrivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 500210475f6d841b2eacb42fb495e90108db2733
Component: engine
2016-12-15 16:22:13 -05:00
62b7ace712 daemon: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 3a42518042b36ad90950a3abf0aa125c0342b2c4
Component: engine
2016-12-14 22:36:58 +02:00
6dcc37964b Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f29bbd16f5d2bb82d815ea59f8ef85fe59384c89
Component: engine
2016-12-09 19:46:28 -05:00
167591374d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
Upstream-commit: 5c1826ec4de381df9f739ce0de28e37d4f734d47
Component: engine
2016-11-22 16:58:30 -08:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
163c2e9b09 First header should be a top level header
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 1e65db4206ba89af24400fbf9047b25ec98cfd02
Component: engine
2016-11-22 09:33:21 +08:00
40d5a75060 Merge pull request #28611 from vieux/fix_golint
fix a few golint errors
Upstream-commit: 96f50e9b7087bad25cb38e2985c26b509be0c403
Component: engine
2016-11-19 07:16:44 -05:00
c148947fe6 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 9c559e6d0b7190b4698de59e692a047beba017fd
Component: engine
2016-11-18 18:32:02 -08:00
33ea65e4f5 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>
Upstream-commit: 020b051dfb92edcb1e43cee77c881dd3e15481c0
Component: engine
2016-11-18 17:23:59 -05:00
7a9630020f fix t.Errorf to t.Error in serveral _test.go
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
Upstream-commit: f78f7de96aebee64b55bb9955fa6c97be2c59662
Component: engine
2016-11-14 17:54:43 +08:00
d19c3e6850 Merge pull request #28229 from darrenstahlmsft/FixUnexpectedResult
Fix failure to get containers when deleting a layer
Upstream-commit: d54f4472fdfad1a9c9b04ed2b50ac010556ab44e
Component: engine
2016-11-10 17:10:05 -08:00
f4dd1c6a23 Merge pull request #28264 from dmcgowan/fix-overlay2-naivediff-unittest
Skip overlay2 diff tests when using naivediff
Upstream-commit: f3f9b3dac9114cfe0f8bf0380dd7343cc58d3a1c
Component: engine
2016-11-11 00:24:06 +01:00
9a8c3a6932 Fix failure to get containers when deleting a layer
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d4095a5902b62181d49ef07db18610975cb49d08
Component: engine
2016-11-10 14:07:11 -08:00
17c10a9402 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)
Upstream-commit: 5a1b557281204964f37e81cb0776758360029555
Component: engine
2016-11-10 13:52:22 -08:00
881cd023ce Merge pull request #27753 from tonistiigi/fix-overlay-unmount
Fix overlay unmount for the root case
Upstream-commit: 1883b73a573fff613f944bb83e24db14d839902c
Component: engine
2016-11-10 13:14:45 -08:00
3d84cacc07 Merge pull request #28138 from dmcgowan/handle-overlay2-copy-up-bug
Use naive diff for overlay2 when opaque copy up bug present
Upstream-commit: a3b0ade34685f4f25875a0a485814d1acf373af3
Component: engine
2016-11-09 22:29:19 -05:00
75a25a369f Merge pull request #27915 from rhvgoyal/graph-create-opts
Pass all graphdriver create() parameters in a struct
Upstream-commit: f11ac963af5a94ae0c36aaa2a67a671c6a313e59
Component: engine
2016-11-10 01:07:41 +01:00
e85707f736 Merge pull request #28002 from Microsoft/jjh/noreexec
Windows: Allow a no-reexec option for importLayer
Upstream-commit: 5e3d777401cd96bd9958971533222726edb1caa5
Component: engine
2016-11-09 14:46:21 -08:00
5656296e4b 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)
Upstream-commit: 64b43ed5ecf3e805bd72bd6a9493c8c5d08478aa
Component: engine
2016-11-09 13:42:10 -08:00
9c868a7b94 Merge pull request #27433 from AkihiroSuda/fix-ovl-xfs-ftype0
overlay: warn if overlay backing fs doesn't support d_type
Upstream-commit: 643ac2f804a5242062113ace64bf68506027c9a6
Component: engine
2016-11-09 13:39:07 -08:00
459e915b2e 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>
Upstream-commit: b937aa8e6968d805527d163e6f477d496ceb88d7
Component: engine
2016-11-09 15:59:58 -05:00
af0174a7c5 overlay: warn if overlay backing fs doesn't support d_type
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 2e20e63da2a8a0ffbbb3f2146f87559e17f43046
Component: engine
2016-11-09 07:18:27 +00:00
dbcd2372ba Windows: Allow a no-reexec option for importLayer
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d9294719b50452b3d88372468b6264c9d2467f02
Component: engine
2016-11-08 17:57:43 -08:00
40ba948937 Terminate template VMs on layer delete
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: c58e8dea6ce1e9ff02c383c1698733fd0554ba2e
Component: engine
2016-11-08 15:39:25 -08:00
6fb90ed484 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>
Upstream-commit: 934328d8ea650bf8a9c3c719999ce2a1f5dd5df6
Component: engine
2016-11-07 09:06:34 -08:00
fb8fd8dbba Merge pull request #28006 from dmcgowan/clean-overlay2-layerstore
Cleanup invalid code in overlay2 and layer store
Upstream-commit: 1f4137857f6eb8edcbefe591e1abe04d83da3416
Component: engine
2016-11-02 23:16:38 -07:00
184a08cc1e Merge pull request #27963 from darrenstahlmsft/RenameDelete
Windows: Rename layers before deletion
Upstream-commit: cb352501af9e59f10f58846d4154c76726530753
Component: engine
2016-11-02 19:20:39 -07:00
94f5e97be8 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)
Upstream-commit: 6622cc970e27a7bf2798d751ed276265a3a2d404
Component: engine
2016-11-02 16:13:53 -07:00
0e01981fe9 Merge pull request #27932 from thaJeztah/promote-overlay
promote overlay(2) graphdriver
Upstream-commit: 78a83a22699198b31c8cbdace3a73c8502f99ba1
Component: engine
2016-11-02 07:00:49 -07:00
b8d232c6a7 Windows: Rename layers before deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: be68006d1928b34936050175e67f85b4ee7f67cf
Component: engine
2016-11-01 18:05:09 -07:00
9e9fd11160 Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
Upstream-commit: 22f3e43e9a35711bb63108f1714840a92a4b138e
Component: engine
2016-11-01 14:30:18 -07:00
c7c95dc226 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>
Upstream-commit: 362369b4bbea38881402d281ee2015d16e8b10ce
Component: engine
2016-11-01 13:41:59 -04:00
a691b85705 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>
Upstream-commit: 299beff1c4e2406d1e96c90a9e86e0770dd4342d
Component: engine
2016-10-31 23:32:10 -07:00
07a831dfc2 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>
Upstream-commit: fa710e504b0e3e51d4031790c18621b02dcd2600
Component: engine
2016-10-31 22:05:01 -06:00
22458c8162 Windows: support docker diff
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4fac603682747476a12dba0df79c10e919eddefb
Component: engine
2016-10-28 11:06:54 -07:00
f2841d5298 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>
Upstream-commit: e4349ad90114c741c729046f7749f0c2fde415c9
Component: engine
2016-10-25 14:40:13 -07:00
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
fe1dce6a91 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>
Upstream-commit: aa2cc18745cbe0231c33782f0fa764f657e3fb88
Component: engine
2016-10-20 19:31:24 -07:00
8fb804fc58 Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: fa378413f88054d0a336d675e7280930ddc86cb2
Component: engine
2016-10-19 17:46:27 +08:00
ed569140d9 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)
Upstream-commit: 520034e35b463e8c9d69ac78b52a4e5df958bc04
Component: engine
2016-10-18 17:34:19 -07:00
d85a4563ef Merge pull request #27483 from YuPengZTE/devFixLink
Fix the typo of link in devmapper
Upstream-commit: 32156e17584782ab7d08f37ec402c0d17bb2cd92
Component: engine
2016-10-18 12:45:31 -07:00
153b6651a5 Fix the typo of link in devmapper
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: f7701d90a94922fa6854cc80b2218392d6a4ac76
Component: engine
2016-10-18 16:02:38 +08:00
2cd33b295f Make golint happy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: eb4c4b7ecfb06e304139dcffe9ef309c57479211
Component: engine
2016-10-17 17:28:27 -07:00
5d899f98e2 move graphdriver/projectquota.go to its own package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 767727480f2856440cc908be7c9296dccb93346c
Component: engine
2016-10-17 17:27:24 -07:00
c6750abd82 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>
Upstream-commit: 9ea50714469c0c5773178222ae6b745701ac9076
Component: engine
2016-10-17 21:44:23 +03:00
7b84e05ca6 Merge pull request #24771 from aquasecurity/xfs_quota
Implement XFS quota for overlay2
Upstream-commit: 8863a9f62cb16fbdbb318165ffc8140aeb32c597
Component: engine
2016-10-17 09:23:42 -07:00
c040e3fa40 Merge pull request #27334 from darrenstahlmsft/ExpandSandboxSizeZero
Windows: Stop expanding sandbox size when no new size is specified
Upstream-commit: f2c094cb99b20faba0731509ca9ebb4c5e67e9cf
Component: engine
2016-10-14 17:51:32 -07:00
1e912551c1 Merge pull request #27335 from barracks510/master
Simplify function signature
Upstream-commit: 429812f86a7095c19ae48552f6b97150846ca29b
Component: engine
2016-10-13 18:54:01 -07:00