Commit graph

977 commits

Author SHA1 Message Date
Brian Goff
b78e4216a2 Create extpoint for graphdrivers
Allows people to create out-of-process graphdrivers that can be used
with Docker.

Extensions must be started before Docker otherwise Docker will fail to
start.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-09-09 20:24:35 -04:00
Vincent Demeester
6990b76a69 Lint package pkg/devicemapper
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-05 23:15:13 +02:00
Shishir Mahajan
4870fb36d4 Warning message for lvm devmapper running on top of loopback devices
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-08-31 10:35:48 -04:00
Miguel Morales
95e3a4ca6d Typo fix then -> than
Signed-off-by: Miguel Morales <mimoralea@hp.com>
2015-08-28 10:44:39 -05:00
Michael Crosby
20bb065535 Add aufs data structure for added mount information
This adds a data struct in the aufs driver for including more
information about active mounts along with their reference count.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-08-26 16:38:13 -07:00
Jessica Frazelle
bd06432ba3 cleanup and fix btrfs subvolume recursion deletion
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-08-25 13:00:41 -07:00
Ma Shimiao
dea78fc2ce fix 9939: docker does not remove btrfs subvolumes when destroying container
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-08-24 14:52:07 -07:00
Alexander Morozov
1544c5edb6 Merge pull request #15735 from tonistiigi/graph-register-readcloser
Make graph.Register take in io.Reader
2015-08-24 10:40:04 -07:00
Jessie Frazelle
90801ab939 Merge pull request #15708 from Microsoft/sjw/graphdriver_missing_parent
Windows: Graphdriver should reject create of layer w/o parent
2015-08-21 16:34:03 -07:00
Stefan J. Wernli
a456f20b44 Windows: Graphdriver should reject create of layer w/o parent
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-08-21 13:23:04 -07:00
Tonis Tiigi
2d1158790d Make graph.Register take in io.Reader
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-08-20 20:37:11 -07:00
Doug Davis
90ebc3b455 Merge pull request #14928 from brahmaroutu/lint_daemon_graphdriver
daemon/graphdriver fix lint errors/warnings
2015-08-20 03:25:00 -07:00
Laszlo Meszaros
78676f19c1 deviceset.go: fixed link in warning about udex sync is not supported
Signed-off-by: Laszlo Meszaros <lacienator@gmail.com>
2015-08-19 14:16:40 +02:00
Srini Brahmaroutu
9e1a41aae5 daemon/graphdriver fix lint errors/warnings
Addresses #14756

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-08-17 19:27:36 +00:00
Stefan J. Wernli
dfbb5520e3 Windows: Graph remove custom interface and add central store
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>

Windows: add support for images stored in alternate location.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-08-14 23:45:53 -07:00
Kir Kolyshkin
15a232fd06 graphdriver/zfs: fix GetMetadata() comment
Commit e27c904 added a wrong and misleading comment
to GetMetadata(). Fix it using the wording from
commit 407a626 which introduced GetMetadata().

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-08-11 18:16:11 -07:00
Kir Kolyshkin
f5f7fee2ec graphdriver/zfs: privatize mountPath and zfsPath
These functions are not part of the graphdriver.Driver
interface and should therefore be private.

Also, remove comments added by commit e27c904 as they are
* pretty obvious
* no longer required by golint

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-08-11 18:16:08 -07:00
Alexander Morozov
0bfad28b86 Merge pull request #15422 from kolyshkin/graphtest-fix
graphtest: filter out lost+found dir entry
2015-08-10 12:21:21 -07:00
Alexander Morozov
6f89a8ee1b Merge pull request #15404 from vbatts/vbatts-dm-zero-sized-field
devicemapper: fix zero-sized field access
2015-08-10 09:16:11 -07:00
Vincent Batts
f83d05c3be devicemapper: fix zero-sized field access
Fixes: #15279

Due to
7904946eeb
the devices field is dropped.

This solution works on go1.4 and go1.5

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-08-10 11:11:58 -04:00
Qiang Huang
81cc8ebc93 Change all docker -d to docker daemon
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-10 20:48:08 +08:00
Kir Kolyshkin
158c536267 graphtest: filter out lost+found dir entry
Ploop graph driver provides its own ext4 filesystem to every
container. It so happens that ext4 root comes with lost+found
directory, causing failures from DriverTestCreateEmpty() and
DriverTestCreateBase() tests on ploop.

While I am not yet ready to submit ploop graph driver for review,
this change looks simple enough to push.

Note that filtering is done without any additional allocations,
as described in https://github.com/golang/go/wiki/SliceTricks.

[v2: added a comment about lost+found]

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-08-09 10:23:36 -07:00
David Calavera
f1f6738d97 Fix typo in Overlay documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-08-08 15:11:09 -07:00
Veres Lajos
5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
Srini Brahmaroutu
de3944219f daemon/graphdriver/overlay/ fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-08-07 18:34:59 +00:00
Tibor Vass
8534090476 Merge pull request #15252 from coolljt0725/14765_enable_golint_3
Enable golint in pkg/archive
2015-08-05 19:27:48 -04:00
Arnaud Porterie
2c3cd949c8 Merge pull request #15269 from brahmaroutu/lint_daemon_graphdriver_zfs
daemon/graphdriver/zfs fix lint errrors/warnings
2015-08-04 18:41:02 -07:00
Srini Brahmaroutu
e27c904b99 daemon/graphdriver/zfs fix lint errrors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-08-04 18:30:55 +00:00
Lei Jitang
ba332b7d12 Enable golint in pkg/arcive
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-04 09:52:54 +08:00
Srini Brahmaroutu
3e7f9c636a daemon/graphdriver/vfs fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-08-03 17:46:42 +00:00
Tibor Vass
8d2739df98 Merge pull request #15146 from kolyshkin/mkdirall
Simplify and fix MkdirAll usage
2015-07-30 22:40:57 -04:00
Srini Brahmaroutu
22873eae31 fix unit test breakage due to lint changes
Addresses #14756

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-31 00:22:28 +00:00
Kir Kolyshkin
a83a769347 Simplify and fix os.MkdirAll() usage
TL;DR: check for IsExist(err) after a failed MkdirAll() is both
redundant and wrong -- so two reasons to remove it.

Quoting MkdirAll documentation:

> MkdirAll creates a directory named path, along with any necessary
> parents, and returns nil, or else returns an error. If path
> is already a directory, MkdirAll does nothing and returns nil.

This means two things:

1. If a directory to be created already exists, no error is returned.

2. If the error returned is IsExist (EEXIST), it means there exists
a non-directory with the same name as MkdirAll need to use for
directory. Example: we want to MkdirAll("a/b"), but file "a"
(or "a/b") already exists, so MkdirAll fails.

The above is a theory, based on quoted documentation and my UNIX
knowledge.

3. In practice, though, current MkdirAll implementation [1] returns
ENOTDIR in most of cases described in #2, with the exception when
there is a race between MkdirAll and someone else creating the
last component of MkdirAll argument as a file. In this very case
MkdirAll() will indeed return EEXIST.

Because of #1, IsExist check after MkdirAll is not needed.

Because of #2 and #3, ignoring IsExist error is just plain wrong,
as directory we require is not created. It's cleaner to report
the error now.

Note this error is all over the tree, I guess due to copy-paste,
or trying to follow the same usage pattern as for Mkdir(),
or some not quite correct examples on the Internet.

[v2: a separate aufs commit is merged into this one]

[1] https://github.com/golang/go/blob/f9ed2f75/src/os/path.go

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-07-30 11:48:08 -07:00
Arnaud Porterie
8724e8953d Merge pull request #15040 from vbatts/vbatts-double-decompress-fix
archive, graphdriver: double decompress fix
2015-07-29 16:48:02 -07:00
Jessie Frazelle
75f8bdd970 Merge pull request #13542 from kvasdopil/freebsd-work
Make docker build on FreeBSD
2015-07-29 15:15:37 -07:00
Tibor Vass
c09c497c71 Merge pull request #15111 from Microsoft/fix-archive-copy-log
Fix log to logrus
2015-07-29 14:48:19 -04:00
Alexey Guskov
26c03d561a make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-07-29 21:25:56 +03:00
John Howard
2bf73c4b1a Fix log to logrus
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-29 09:58:07 -07:00
Srini Brahmaroutu
972a94b449 daemon/graphdriver/devmapper/ fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-29 01:43:34 +00:00
Vincent Batts
273f50c741 graphdriver/*: expect uncompressed tar for ApplyDiff
The `ApplyDiff` function takes a tar archive stream that is
automagically decompressed later. This was causing a double
decompression, and when the layer was empty, that causes an early EOF.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-07-28 16:36:39 -04:00
Jessie Frazelle
e06df594f5 Merge pull request #14863 from brahmaroutu/lint_daemon_graphdriver_aufs
daemon/graphdriver/aufs fix lint errors/warnings
2015-07-28 11:46:40 -07:00
Srini Brahmaroutu
55885daa56 daemon/graphdriver/aufs fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-28 06:17:05 +00:00
Srini Brahmaroutu
12460f41a4 daemon/graphdriver/graphtest/ fix lint errors/warnings
Addresses #14756

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-28 06:01:00 +00:00
David Calavera
5bac5302e5 Fix typo in overlay's create godoc.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-27 15:37:26 -07:00
Jessie Frazelle
303345dc6a Merge pull request #14875 from brahmaroutu/lint_daemon_graphdriver_btrfs
daemon/graphdriver/btrfs fix lint errors/warnings
2015-07-27 10:28:50 -07:00
Lei
e1c5e9b561 Add VxFS magic number, fixes #14847
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-24 16:37:56 +08:00
Srini Brahmaroutu
17c19f395f daemon/graphdriver/btrfs fix lint errors/warnings
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-23 22:48:45 +00:00
Flavio Castelli
f95b3a6b6a ZFS driver: raise better errors during init
The ZFS driver should raise proper errors when the ZFS utility is
missing or when there's no zfs partition active on the system. Raising the
proper errors make possible to silently ignore the ZFS storage
driver when no default storage driver is specified.

Previous to this commit it was no longer possible to start the
docker daemon in that way:

  docker -d --storage-opt dm.loopdatasize=2GB

The above command resulted in an exit error because the ZFS driver
tried to use the storage options.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2015-07-20 15:24:48 +02:00
Arnaud Porterie
98ed9a55f4 Merge pull request #14693 from LK4D4/update_libcontainer
Update libcontainer
2015-07-17 13:02:04 -07:00
Vivek Goyal
424d5e55a2 devicemapper: Change default basesize to 100G
Current default basesize is 10G. Change it to 100G. Reason being that for
some people 10G is turning out to be too small and we don't have capabilities
to grow it dyamically.

This is just overcommitting and no real space is allocated till container
actually writes data. And this is no different then fs based graphdrivers
where virtual size of a container root is unlimited.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-07-17 11:10:23 -04:00