Commit Graph

2554 Commits

Author SHA1 Message Date
eefbd135ae Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4785f1a7ab7ec857dc3ca849ee6ecadf519ef30e
Component: engine
2017-11-02 00:01:46 +00:00
89d76e74a5 Merge pull request #35341 from tklauser/utsname-x-sys
Simplify Utsname string conversion
Upstream-commit: 0bcca5ea863d8e100ede8b7e48d8209cc4620fec
Component: engine
2017-11-01 11:36:38 -07:00
f64b1b1e67 Simplify Utsname string conversion
Update golang.org/x/sys to 95c6576299259db960f6c5b9b69ea52422860fce in
order to get the unix.Utsname with byte array instead of int8/uint8
members.

This allows to use simple byte slice to string conversions instead of
using charsToString or its open-coded version.

Also see golang/go#20753 for details.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 6d068bc25b35a420e63e295ea4ab4ac4a6e6665b
Component: engine
2017-10-31 10:59:32 +01:00
3090f62b5d Merge pull request #35313 from charrywanganthony/RandomAlpha
Separate the GenerateRandomAlphaOnlyString function from stringutils
Upstream-commit: ba3bf8191e3390745420ada6b7f79483eb7e7be0
Component: engine
2017-10-29 22:33:57 +01:00
a313f92089 Merge pull request #35289 from zuiurs/namesgeneratorCmd
Fix a names-generator binary
Upstream-commit: e8730d052e625af3666176f7c1f596bb07fccbe2
Component: engine
2017-10-28 13:16:33 -07:00
be3cbac37e Separate the GenerateRandomAlphaOnlyString function from stringutils
Signed-off-by: chaowang <chaowang@localhost.localdomain>
Upstream-commit: 7c35a2418265336a572976e2ced378ef4b6f1666
Component: engine
2017-10-28 09:03:02 +08:00
7f1869d232 Merge pull request #35285 from crosbymichael/solaris
Remove solaris files
Upstream-commit: 17bb1d3663f6586e83b453670526e3186bb56dd3
Component: engine
2017-10-25 15:14:04 +02:00
aa769fd9a0 Rename a few docker to moby
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d040d637a950b10843a4535c6dbc1c66cc84dde7
Component: engine
2017-10-25 13:56:12 +02:00
61ad1e458b Fix a names-generator binary
To ensure that namesgenerator binary outputs random name
by initializing Seed.

Signed-off-by: Mizuki Urushida <z11111001011@gmail.com>

not use init function.

Signed-off-by: Mizuki Urushida <z11111001011@gmail.com>
Upstream-commit: eaab2f715039e212dd67c71c30f1f8a8cfc03ded
Component: engine
2017-10-25 18:21:17 +09:00
54e6932cca Merge pull request #35217 from cpuguy83/fix_chroot_mount_race
Use rslave instead of rprivate in chrootarchive
Upstream-commit: d891f2e3cab7509d5fe9336c7d2efffe1934accc
Component: engine
2017-10-24 22:13:28 +02:00
d78181e968 Remove solaris files
For obvious reasons that it is not really supported now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5a9b5f10cf967f31f0856871ad08f9a0286b4a46
Component: engine
2017-10-24 15:39:34 -04:00
1dbedcfc9e Merge pull request #34895 from mlaventure/containerd-1.0-client
Containerd 1.0 client
Upstream-commit: 402540708c9a0c35dc0b279a0f330455633537b8
Component: engine
2017-10-23 10:38:03 -04:00
f2d8311eb8 Merge pull request #35059 from cpuguy83/35002_handle_bind_create_errors
idtools don't chown if not needed
Upstream-commit: 113bebe0ee690246323171dad82f939c97fb2778
Component: engine
2017-10-20 08:39:23 -07:00
044d7f995b Update libcontainerd to use containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ddae20c032058a0fd42c34c2e9750ee8f6296ac8
Component: engine
2017-10-20 07:11:37 -07:00
55cea3f58e idtools don't chown if not needed
In some cases (e.g. NFS), a chown may technically be a no-op but still
return `EPERM`, so only call `chown` when neccessary.

This is particularly problematic for docker users bind-mounting an NFS
share into a container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fa9709a3fc51785c3dc0f7ca8f54dafde2e291ab
Component: engine
2017-10-19 16:06:25 -04:00
90d3bf5347 Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
Update golang.org/x/sys to 8dbc5d05d6edcc104950cc299a1ce6641235bc86 in
order to get the Major, Minor and Mkdev functions for every unix-like
OS. Use them instead of the locally defined versions which currently use
the Linux specific device major/minor encoding.

This means that the device number should now be properly encoded on e.g.
Darwin, FreeBSD or Solaris.

Also, the SIGUNUSED constant was removed from golang.org/x/sys/unix in
https://go-review.googlesource.com/61771 as it is also removed from the
respective glibc headers.

Remove it from signal.SignalMap as well after the golang.org/x/sys
re-vendoring.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 86f080cff0914e9694068ed78d503701667c4c00
Component: engine
2017-10-19 08:28:38 +02:00
fdc015d172 Removing unused code with a TODO that no longer needs to be done
Signed-off-by: Kate Heddleston <kate.heddleston@gmail.com>
Upstream-commit: 736fafb2d0b8b70573978f3d220be65afb1587f4
Component: engine
2017-10-16 14:57:48 -07:00
3c89b7fafe Use rslave instead of rprivate in chrootarchive
With `rprivate` there exists a race where a reference to a mount has
propagated to the new namespace, when `rprivate` is set the parent
namespace is not able to remove the mount due to that reference.
With `rslave` unmounts will propagate correctly into the namespace and
prevent the sort of transient errors that are possible with `rprivate`.

This is a similar fix to 117c92745b

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5ede64d63fec0b9d4cf921b6f8fb946e65287538
Component: engine
2017-10-16 13:49:31 -04:00
41e90bb713 Merge pull request #33488 from raja-sami-10p/pkg/idtools
Increase Coverage of pkg/idtools
Upstream-commit: be4586fffd0f4eb095fd6d94ad067dbf220c1bd3
Component: engine
2017-10-10 18:37:49 +02:00
3d973055bf LCOW: API change JSON header to string POST parameter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d98ecf2d6cdad7dae65868398440cfdc855e5263
Component: engine
2017-10-06 15:26:48 -07:00
35db73fa01 LCOW: API: Add platform to /images/create and /build
Signed-off-by: John Howard <jhoward@microsoft.com>

This PR has the API changes described in https://github.com/moby/moby/issues/34617.
Specifically, it adds an HTTP header "X-Requested-Platform" which is a JSON-encoded
OCI Image-spec `Platform` structure.

In addition, it renames (almost all) uses of a string variable platform (and associated)
methods/functions to os. This makes it much clearer to disambiguate with the swarm
"platform" which is really os/arch. This is a stepping stone to getting the daemon towards
fully multi-platform/arch-aware, and makes it clear when "operating system" is being
referred to rather than "platform" which is misleadingly used - sometimes in the swarm
meaning, but more often as just the operating system.
Upstream-commit: 0380fbff37922cadf294851b1546f4c212c7f364
Component: engine
2017-10-06 11:44:18 -07:00
b69e823a30 Merge pull request #35056 from tklauser/win-console-mode-consts
Use windows console mode constants from Azure/go-ansiterm
Upstream-commit: 1c4fad8135b52a8a6405aef897712c4ca7a6d168
Component: engine
2017-10-05 00:41:22 +02:00
d35ee25d03 pkg/locker: add benchmarks
Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Upstream-commit: 889cfd1b441e8039bb6b78e8c54276b8eb03cdef
Component: engine
2017-10-02 11:20:21 -07:00
46c885c3e3 Use all console mode constants from go-ansiterm
The missing console mode constants were added to go-ansiterm in
Azure/go-ansiterm#23. Use these constants instead of defining them
locally.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 9335683fa50c4863ada4bf00a30e7dfbfef3c783
Component: engine
2017-10-02 09:49:20 +02:00
82a0e7daf9 Increase Coverage of pkg/idtools
Signed-off-by: Danyal Khaliq <danyal.khaliq@tenpearls.com>
Upstream-commit: 00c0ee885c671942f9bc751c80cbc45b7f6404f3
Component: engine
2017-09-27 12:55:04 +05:00
48757849a4 Merge pull request #34946 from dnephin/fix-jsonlog
Move pkg/jsonlog to be a subpackage of the single consumer
Upstream-commit: 7d47823c22945bb24a609a7ef20c0559d78d96e4
Component: engine
2017-09-26 10:49:57 +02:00
f367f50630 Move jsonlog to a subpackage of jsonfilelog
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 035604cca6d6bd9a432268caf7515a35023908ed
Component: engine
2017-09-25 16:07:25 -04:00
7d644fb209 Fix benchmarks and remove more unnecessary code.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a06ad2792ab92d4f246e4b4cc4c3529eb060651e
Component: engine
2017-09-25 16:07:25 -04:00
4701b66889 Remove unused JSONLog marshaling
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 231c5cbd50e1870f31eb6a525b2df2ed7a716565
Component: engine
2017-09-25 16:07:25 -04:00
a001c9d5c7 Remove unused Format
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 638d4cc7e4390ab217be711913017b22ce2cd5c2
Component: engine
2017-09-25 16:07:25 -04:00
0c6f170345 Unexport FastTimeMarshalJSON
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7de92de636ef307d66b7b20b24f166a47f40f72b
Component: engine
2017-09-25 16:07:25 -04:00
101f740d40 Move RFC3339NanoFixed to a more appropriate package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 27cfa68af16721c978803c3b695bcc7181ccc721
Component: engine
2017-09-25 16:07:24 -04:00
08619d0c7c Fix TestMount under a selinux system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8bebd42df2d8eaa0ecdc9c78bc1e395a752eb5c9
Component: engine
2017-09-25 11:54:30 +02:00
6700f361c5 pkg/package: remove promise package
The promise package represents a simple enough concurrency pattern that
replicating it in place is sufficient. To end the propagation of this
package, it has been removed and the uses have been inlined.

While this code could likely be refactored to be simpler without the
package, the changes have been minimized to reduce the possibility of
defects. Someone else may want to do further refactoring to remove
closures and reduce the number of goroutines in use.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 0cd4ab3f9a3f242468484fc62b46e632fdba5e13
Component: engine
2017-09-21 17:56:45 -07:00
3a50fe644a Merge pull request #34861 from tklauser/fix-cstring-leaks
Fix CString memory leaks
Upstream-commit: 777d4a1bf45c85db6931205d4adbe38a17c583d7
Component: engine
2017-09-21 09:14:07 -07:00
95004c9da9 Merge pull request #31993 from dccurtis/issue-31816
Fixing ‘docker cp’ to allow new target file name in a host symlinked directory
Upstream-commit: 149f3aceb277ecccd33ee815e9c54d6aec782ab5
Component: engine
2017-09-19 10:54:53 -07:00
e3dc487328 devmapper: show dmesg if mount fails
If mount fails, the reason might be right there in the kernel log ring buffer.
Let's include it in the error message, it might be of great help.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 46833ee1c353c247e3ef817a08d5a35a2a43bdf3
Component: engine
2017-09-17 22:04:31 -07:00
322ee8f812 devmapper gd: disable for static build
Static build with devmapper is impossible now since libudev is required
and no static version of libudev is available (as static libraries are
not supported by systemd which udev is part of).

This should not hurt anyone as "[t]he primary user of static builds
is the Editions, and docker in docker via the containers, and none
of those use device mapper".

Also, since the need for static libdevmapper is gone, there is no need
to self-compile libdevmapper -- let's use the one from Debian Stretch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 84f1c054e66d3999aaf2751062cda8a77925b7ae
Component: engine
2017-09-17 22:04:31 -07:00
5086fdcfde Fix CString memory leaks
Make sure to call C.free on C string allocated using C.CString in every
exit path.

C.CString allocates memory in the C heap using malloc. It is the callers
responsibility to free them. See
https://golang.org/cmd/cgo/#hdr-Go_references_to_C for details.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 593dbfd1448e8dac08488786fde6fe7fb057bdac
Component: engine
2017-09-15 09:57:26 +02:00
a641c1b7f0 Add LCOW behind experimental,
might not be the cleanest way, but it's definitly the way with the
minimum code change.

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: ff686743c50dc34b57f5627ba6fee38502bdd3ec
Component: engine
2017-09-14 13:51:16 -07:00
cddfe04f6a LCOW: Implemented support for docker cp + build
This enables docker cp and ADD/COPY docker build support for LCOW.
Originally, the graphdriver.Get() interface returned a local path
to the container root filesystem. This does not work for LCOW, so
the Get() method now returns an interface that LCOW implements to
support copying to and from the container.

Signed-off-by: Akash Gupta <akagup@microsoft.com>
Upstream-commit: 7a7357dae1bcccb17e9b2d4c7c8f5c025fce56ca
Component: engine
2017-09-14 12:07:52 -07:00
18c29c5c5f Add gosimple linter
Update gometalinter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6
Component: engine
2017-09-12 12:09:59 -04:00
e388be9473 Fix typos in Locker example
Signed-off-by: Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
Upstream-commit: 6d3bc28289c265a65879a7f28264e6bacb95fbe1
Component: engine
2017-09-10 11:34:19 +02:00
fdd3e06a77 Add ineffassign linter
Also enable GC in linting to reduce memory usage.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09652bf8789142a5a5a1de2d41590300761b4954
Component: engine
2017-09-08 18:23:21 -04:00
d7504f67d1 Merge pull request #34738 from wgliang/optimization1
Optimize some wrong usage and spelling
Upstream-commit: 2dcb77b24c80dd95b52358c92436f68f2a33eb01
Component: engine
2017-09-07 09:45:14 -07:00
eec1d4ef54 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
Upstream-commit: 94cefa21459a0c620e5a9c2da04df6d3a43dae17
Component: engine
2017-09-07 09:44:08 +08:00
5063459b89 Merge pull request #34748 from dnephin/cleanup-client-deps
Cleanup client/ package dependencies
Upstream-commit: be97c66708c24727836a22247319ff2943d91a03
Component: engine
2017-09-06 16:14:29 -07:00
9f20b18453 Move tlsconfig to client package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6916c215b00ab4d7edf4be14848ab2e695697381
Component: engine
2017-09-06 16:39:55 -04:00
0bd644faaf re-enable some conversion for darwin-amd64 platform
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 7c9e64a2e1891bf1020d9312a18741c734fa1cd6
Component: engine
2017-09-06 12:22:41 +02:00
7ded486a94 Merge pull request #34700 from tklauser/pkg-term-winsize
pkg/term: use IoctlGetWinsize/IoctlSetWinsize from golang.org/x/sys/unix
Upstream-commit: a127269803b9053713cd51d20f4ae00dae19b6d1
Component: engine
2017-09-01 15:58:25 -04:00