1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg
Brian Goff b27f70d45a Fix issue with plugin scanner going to deep
The plugin spec says that plugins can live in one of:

- /var/run/docker/plugins/<name>.sock
- /var/run/docker/plugins/<name>/<name>.sock
- /etc/docker/plugins/<name>.[json,spec]
- /etc/docker/plugins/<name>/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>.<json,spec>
- /usr/lib/docker/plugins/<name>/<name>.<json,spec>

However, the plugin scanner which is used by the volume list API was
doing `filepath.Walk`, which will walk the entire tree for each of the
supported paths.
This means that even v2 plugins in
`/var/run/docker/plugins/<id>/<name>.sock` were being detected as a v1
plugin.
When the v1 plugin loader tried to load such a plugin it would log an
error that it couldn't find it because it doesn't match one of the
supported patterns... e.g. when in a subdir, the subdir name must match
the plugin name for the socket.

There is no behavior change as the error is only on the `Scan()` call,
which is passing names to the plugin registry when someone calls the
volume list API.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-02-02 16:49:14 -05:00
..
aaparser apparmor: make pkg/aaparser work on read-only root 2017-05-18 00:05:13 +10:00
archive Make image (layer) downloads faster by using pigz 2018-01-16 10:49:18 -08:00
authorization Update libcontainerd to use containerd 1.0 2017-10-20 07:11:37 -07:00
broadcaster
chrootarchive Close pipe in chrootarchive.invokeUnpack when cmd.Start()/json.NewEncoder failed. 2017-11-24 13:41:08 +08:00
containerfs pkg/package: remove promise package 2017-09-21 17:56:45 -07:00
devicemapper Devicemapper: ignore Nodata errors when delete thin device 2018-01-02 18:04:25 +00:00
directory Remove redundant build-tags 2017-12-18 17:41:53 +01:00
discovery Add gosimple linter 2017-09-12 12:09:59 -04:00
dmesg Remove redundant build-tags 2017-12-18 17:41:53 +01:00
filenotify Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
fileutils Remove solaris files 2017-10-24 15:39:34 -04:00
fsutils Remove redundant build-tags 2017-12-18 17:41:53 +01:00
homedir Remove redundant build-tags 2017-12-18 17:41:53 +01:00
idtools Remove redundant build-tags 2017-12-18 17:41:53 +01:00
ioutils Make image (layer) downloads faster by using pigz 2018-01-16 10:49:18 -08:00
jsonmessage Move RFC3339NanoFixed to a more appropriate package. 2017-09-25 16:07:24 -04:00
locker pkg/locker: add benchmarks 2017-10-02 11:20:21 -07:00
longpath
loopback Add gosimple linter 2017-09-12 12:09:59 -04:00
mount Remove redundant build-tags 2017-12-18 17:41:53 +01:00
namesgenerator added more awesome and notable women to names-generator.go 2017-11-26 21:40:02 -08:00
parsers Remove redundant build-tags 2017-12-18 17:41:53 +01:00
pidfile [project] change syscall to /x/sys/unix|windows 2017-07-11 08:00:32 -04:00
platform Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
plugingetter Fixup some issues with plugin refcounting 2017-10-21 15:17:57 -04:00
plugins Fix issue with plugin scanner going to deep 2018-02-02 16:49:14 -05:00
pools Add gosimple linter 2017-09-12 12:09:59 -04:00
progress Update the stream formatter to display custom unit numbers. 2017-05-11 11:13:11 -07:00
pubsub Make plugin emit strongly typed, consumable events 2017-07-06 14:26:06 -04:00
reexec Remove redundant build-tags 2017-12-18 17:41:53 +01:00
signal Remove redundant build-tags 2017-12-18 17:41:53 +01:00
stdcopy Spelling fixes 2017-07-03 13:13:09 -07:00
streamformatter Add goimports to linters. 2017-08-21 18:15:08 -04:00
stringid pkg: remove random package 2017-05-08 17:02:02 -07:00
symlink [project] change syscall to /x/sys/unix|windows 2017-07-11 08:00:32 -04:00
sysinfo Remove redundant build-tags 2017-12-18 17:41:53 +01:00
system Bump RS3 final build, and remove LCOW_SUPPORTED 2018-01-19 12:22:56 -08:00
tailfile
tarsum Windows: Case-insensitive filename matching against builder cache 2017-12-14 13:49:40 -08:00
term Remove redundant build-tags 2017-12-18 17:41:53 +01:00
truncindex
urlutil Move IsGitTransport() to gitutils 2017-06-26 10:07:04 -07:00
useragent
README.md Rename a few docker to moby 2017-10-25 13:56:12 +02:00

pkg/ is a collection of utility packages used by the Moby project without being specific to its internals.

Utility packages are kept separate from the moby core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Moby organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!