Commit graph

2011 commits

Author SHA1 Message Date
Derek McGowan
50841b16fe
Ensure opaque directory permissions respected
When converting an opaque directory always keep the original
directory tar entry to ensure directory is created with correct
permissions on restore.

Closes #27298

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-12-02 16:16:59 -08:00
Tonis Tiigi
a8ffa0128c chroot: remount everything as private in new mntns
If parent of the destination path is shared, this
path will be unmounted from the parent ns even if
the path itself is private.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit b511d1f0ca)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-21 14:59:58 -07:00
Tonis Tiigi
3f21a28ec0 chroot: let root be cleaned up by kernel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 70dfea63ba)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-21 14:59:50 -07:00
Tonis Tiigi
16f11aef3c Fix error reporting in CopyFileWithTar
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 57e12037ac)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-20 11:38:58 -07:00
Kenfe-Mickael Laventure
3377b4b9b7 Update containerd and runc
containerd: 0366d7e9693c930cf18c0f50cc16acec064e96c5
runc: 02f8fa7863dd3f82909a73e2061897828460d52f

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-06 09:28:08 -07:00
Ji.Zhilong
d5aaaa7ea3 devmapper: prevent libdevmapper from deleting device symlinks in RemoveDeviceDeferred
if there is no cookie set in dm task, or flag DM_UDEV_DISABLE_LIBRARY_FALLBACK
is cleared for a DM_DEV_REMOVE task, libdevmapper will fallback to clean up the
symlink under /dev/mapper by itself, no matter the device removal is executed
immediately or deferred by the kernel.In some cases, the removal is deferred by the
kernel, while the symlink is deleted directly by libdevmapper, when docker tries to
activate the device again, the deferred removal will be canceld, but the symlink will
not show up again, so docker's attempt to mount the device by the symlink will fail,
and it will eventually leads to a `docker start/diff` error.

Fixes #24671

Signed-off-by: Ji.Zhilong <zhilongji@gmail.com>
(cherry picked from commit 5e505d101f)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-09-26 19:35:43 -07:00
Yong Tang
f2a48d2ff3 Fix AuthZ plugins headers change issue
This fix tries to address the issue raised in 25927 where
the HTTP headers have been chaged when AUthZ plugin is in
place.

This issue is that in `FlushAll` (`pkg/authorization/response.go`),
the headers have been written (with `WriteHeader`) before all the
headers have bee copied.

This fix fixes the issue by placing `WriteHeader` after.

A test has been added to cover the changes.`

This fix fixes 25927

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 9cb8fb6ea0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-09-26 19:35:37 -07:00
Ron Williams
f4650e2eb8 Force input stream ANSI emulation for ConEmu.
Signed-off-by: Ron Williams <ron.a.williams@gmail.com>
(cherry picked from commit 0fd4bbda2d)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-09-26 19:35:18 -07:00
Akihiro Suda
49d9a425d5 Fix pkg/plugins TLSConfig panic
Fix #25046

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit b1e71bdd1d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:42 -07:00
Derek McGowan
3fba11f7c6 Fix files in subdirectories creating bad whiteout
Closes #23863

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 1c0f6653ba)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:42 -07:00
John Starks
43193233f8 Windows: Restore console mode on set mode failure
SetConsoleMode() on input handles appears to remember invalid bits that
were set, causing problems for other programs (such as xcopy.exe) trying
to set the console mode after docker.exe has exited. Always restore
the input console mode on set failure.

Signed-off-by: John Starks <jostarks@microsoft.com>
(cherry picked from commit 83c186fdd4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
allencloud
4cd455a8d9 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 4e959ef2f7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
Anusha Ragunathan
fee68def8f Add only legacy plugins to the legacy lookup map.
Legacy plugin model maintained a map of plugins. This is
not used by the new model. Using this map in the new model
causes incorrect lookup of plugins. This change uses adds
a plugin to the map only if its legacy.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 8fd779dc28)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:42 -07:00
John Starks
4d0f6041ad Windows: Always enable VT emulation
Always enable VT output emulation when starting the process so that
non-attaching commands can still output VT codes.

Also remove the version block for using the native console and just rely
on supported flags being present.

Signed-off-by: John Starks <jostarks@microsoft.com>
(cherry picked from commit 4acc2c7499)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:25 -07:00
allencloud
5fcac2cdfd better command docker network create -h output
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit d0081a0f47)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:24 -07:00
allencloud
25b235a1b1 return err when stack name does not exist
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 416613f2e5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:43:39 -07:00
Justin Cormack
d28a8673b5 Make the docker proxy a standalone binary not a re-exec
This reduces memory usage with a lot of docker proxy processes.
On Docker for Mac we are currently carrying a patch to replace
the binary as we modify it to forward ports to the Mac rather
than the Linux VM, this allows us to simply replace this binary
in our packaging with one that has a compatible interface. This
patch does not provide an easy way to substitute a binary as
the interface is complex and there are few use cases, but where
needed this can be done.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 0682468431)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:28 -07:00
Brian Goff
843b4a93fe Use newer default values for mounts CLI
In the API:
`Writable` changed to `ReadOnly`
`Populate` changed to `NoCopy`

Corresponding CLI options updated to:
`volume-writable` changed to `volume-readonly`
`volume-populate` changed to `volume-nocopy`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 56f3422468)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:30 -07:00
Derek McGowan
6234af6680 Set permission on atomic file write
Perform chmod before rename with the atomic file writer.
Ensure writeErr is set on short write and file is removed on write error.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 1cd7490281)
2016-07-01 00:39:50 -07:00
Daniel Nephin
cd0ffa9359 Fix service update of Args
add a unit test

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 07b59ef210)
2016-06-30 16:57:31 -07:00
Alexander Morozov
0ec119e727 pkg/pools: avoid copy of sync.Pool
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit ba3af336eb)
2016-06-30 16:47:48 -07:00
Derek McGowan
d99f4cc83d Fix overlay2 ignoring whiteout files
Currently when overlay creates a whiteout file then the overlay2 layer is archived,
the correct tar header will be created for the whiteout file, but the tar logic will then attempt to open the file causing a failure.
When tar encounters such failures the file is skipped and excluded for the archive, causing the whiteout to be ignored.
By skipping the copy of empty files, no open attempt will be made on whiteout files.

Fixes #23863

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit bd13c53f8d)
2016-06-30 16:47:46 -07:00
bin liu
6a5a150722 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
(cherry picked from commit 950073aabb)
2016-06-30 16:47:43 -07:00
Daniel Nephin
fb364d86fa Add some tests for bundlefile and improve the error messages for LoadFile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c0ea589c1b)
2016-06-16 23:36:59 -07:00
Tibor Vass
f37117045c plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-06-14 14:20:27 -07:00
Vincent Demeester
5338ae7133 Merge pull request #23425 from runcom/authz-race
pkg: authorization: lock when lazy loading
2016-06-13 23:20:37 +02:00
Michael Crosby
8a2f9a249c Merge pull request #22126 from dmcgowan/overlay-native-diff
Overlay multiple lower directory support
2016-06-13 13:15:39 -07:00
Alexander Morozov
8eb1d89c17 Merge pull request #22631 from runcom/fix-leak-mount
pkg: chrootarchive: chroot_linux: fix mount leak
2016-06-13 09:29:46 -07:00
Antonio Murdaca
d1b7e8373b authz: cleanups
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-12 17:23:19 +02:00
Antonio Murdaca
ceb9c5a88b pkg: authorization: lock when lazy loading
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-12 17:19:43 +02:00
Yong Tang
a72b45dbec 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.

This fix fixes #23459.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-11 13:16:55 -07:00
Vincent Demeester
ec1790d7f1 Merge pull request #23458 from runcom/warnf
*: fix logrus.Warn[f]
2016-06-11 21:42:12 +02:00
Antonio Murdaca
44ccbb317c *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-11 19:42:38 +02:00
Antonio Murdaca
809207fc74 pkg: proxy: fix TCPEchoServer.Close() in unit test
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-11 15:27:56 +02:00
Antonio Murdaca
7d22887b2c pkg: chrootarchive: chroot_linux: fix mount leak
When pivot_root fails we need to unmount the bind mounted path we
previously mounted in preparation for pivot_root.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-11 00:07:41 +02:00
fortinux
cd7ca2a1c7
update peaceful zen
Signed-off-by: fortinux <info@fortinux.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-10 16:39:05 +02:00
Aleksa Sarai
e6d856df43 pkg: archive: only ignore ENOTSUP when xattr fails
There might be other (valid) reasons for setxattr(2) to fail, so only
ignore it when it's a not supported error (ENOTSUP). Otherwise, bail.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-06-10 00:56:40 +10:00
Derek McGowan
8222c86360 Update archive package to support overlay whiteouts
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-06-08 00:10:16 -07:00
Viktor Stanchev
b03d3232d1 aufs compatibility
Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
2016-06-08 00:10:16 -07:00
Tibor Vass
ccaea227e0 Cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-06-06 15:57:51 -07:00
Alexander Morozov
b32478488c ioutils: fix race in access closeErr in bytespipe
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-06-06 11:29:47 -07:00
Brian Goff
2f40b1b281 Add support for volume scopes
This is similar to network scopes where a volume can either be `local`
or `global`. A `global` volume is one that exists across the entire
cluster where as a `local` volume exists on a single engine.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-06-05 15:37:15 -04:00
Brian Goff
79ff6eaf21 Enhance pluginrpc-gen parser
Now handles `package.Type` and `*package.Type`
Fixes parsing issues with slice and map types.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-06-05 15:37:15 -04:00
Sven Dowideit
98c245c9e6 Merge pull request #23193 from allencloud/fix-typos
use grep to find all a/an typos
2016-06-02 18:45:08 -07:00
Alexander Morozov
6e5894b551 pkg/parser/kernel: remove unused var block
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-06-02 10:50:36 -07:00
Alexander Morozov
34f54b3a11 Merge pull request #22549 from allencloud/make-pkg-parsers-support-darwin
add darwin support in package docker/pkg/parsers
2016-06-02 10:48:19 -07:00
Vincent Demeester
f69353a364 Merge pull request #23153 from AkihiroSuda/fix23152PkgGitutils
Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
2016-06-02 17:21:38 +02:00
Sebastiaan van Stijn
171af54931 Merge pull request #22460 from jwhonce/wip/sigpipe
Ignore SIGPIPE events
2016-06-02 16:05:22 +02:00
allencloud
c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Akihiro Suda
efc250bc6b Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
Fix #23152

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-06-02 17:44:09 +09:00