Commit Graph

945 Commits

Author SHA1 Message Date
f935cc47fb Merge pull request #16229 from icecrime/discovery
Add builtin nodes discovery
Upstream-commit: 9324b154d27643caed58c12e8c49630eeceb4fda
Component: engine
2015-09-27 18:06:27 -07:00
602b65fbb2 Vendoring in libnetwork with the fix for compilation error using GCCGo (X86 GCCGO CI)
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: ba4c132491b913d050c3fdf72f623b59f3dbb563
Component: engine
2015-09-26 01:37:56 +00:00
037faa21f6 Merge pull request #16531 from vbatts/vbatts-non-utf8-name-fix
vendor: update tar-split to v0.9.10
Upstream-commit: c32d22e6e4e50165f30c2937acdd5a246a6b1791
Component: engine
2015-09-25 17:55:11 -04:00
ff72d92410 Add builtin nodes discovery
Use `pkg/discovery` to provide nodes discovery between daemon instances.

The functionality is driven by two different command-line flags: the
experimental `--cluster-store` (previously `--kv-store`) and
`--cluster-advertise`. It can be used in two ways by interested
components:

1. Externally by calling the `/info` API and examining the cluster store
   field. The `pkg/discovery` package can then be used to hit the same
   endpoint and watch for appearing or disappearing nodes. That is the
   method that will for example be used by Swarm.
2. Internally by using the `Daemon.discoveryWatcher` instance. That is
   the method that will for example be used by libnetwork.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 7d193ef1f3b5fcd6aa55b7376116e2617be12e06
Component: engine
2015-09-25 14:52:09 -07:00
5b4d10360b Add pkg/discovery for nodes discovery
Absorb Swarm's discovery package in order to provide a common node
discovery mechanism to be used by both Swarm and networking code.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 166e082be33bcd20bdaa0c69bf934e56f15a8245
Component: engine
2015-09-25 13:33:23 -07:00
51abe1412d Merge pull request #16589 from mavenugo/ln_vin_ls
Vendoring libnetwork and libkv
Upstream-commit: 3c3d232e0af829ab6c98e21eb4de58cae3a289ff
Component: engine
2015-09-25 13:31:14 -07:00
23558fce68 vendor: update tar-split to v0.9.10
This addresses handling of non-utf8 file names, namely iso-8859-1.

https://github.com/docker/docker/issues/16516

Reported-by: @kwk
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: ecedb3d81d2453e8375dc8e95f42db64ddc1d605
Component: engine
2015-09-25 14:42:17 -04:00
f5a8f1a6e1 Merge pull request #15916 from mikedougherty/release-flexibility
Improve flexibility of release scripts
Upstream-commit: 80e31df3b6fdf6c1fbd6a5d0aceb0a148066508c
Component: engine
2015-09-25 11:26:18 -07:00
f7f326c894 Vendoring libnetwork and libkv
- Libnetwork brings in :
  * Default Gateway as a service for network drivers
  * Persistence for local scoped networks using libkv
  * BATS based Multi-host Integration-test infra and end-to-end tests
  * libnetwork fixes for zookeeper and etcd backend
- Libkv upgrade brings in :
  * boltdb support for local kv persistence
  * other general bug fixes

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 59a000ec7fc31ef4dedc526ef77e70af24f39585
Component: engine
2015-09-25 10:02:31 -07:00
c3cad905fa Add documentation files including the LICENSE and CHANGELOG.md to the RPM
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: 63e5891e4f9654bc02e113ed0787b6636de3da37
Component: engine
2015-09-25 17:44:11 +10:00
18dfcf4e5a Update libcontainer to aac9179bbadbf958054ce97ab36
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 189d2c79858d08a4cf3454bd7367989a005a4e3b
Component: engine
2015-09-24 15:00:31 -07:00
63decb3521 Bump libcontainer to 08b5415ffa3769ff7c1d2f673f613
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 6bd3e6357c77f38edd905491837f31f064c70d08
Component: engine
2015-09-24 15:00:30 -07:00
26c6a8d526 Merge pull request #16328 from jfrazelle/opensuse-rpms
add opensuse to rpm builder
Upstream-commit: b0dc11127ef4fc20261ccc0db03a16b17f7f91c4
Component: engine
2015-09-22 15:59:49 -07:00
7583ab4278 Vendoring libnetwork
Pull in version e5fea92a6c8a5968bdb8005bf959c6e23113b689

Fixes libnetwork regressions that stopped drivers that set routes from working.
Pulls in libnetwork PRs #546 #543

Signed-off-by: Tom Denham <tom@tomdee.co.uk>
Upstream-commit: 499ade011685732728c9fd1ee2d7d5fe4a9a6a76
Component: engine
2015-09-21 11:13:14 -07:00
e6ff3f627c Preserve /etc/sysconfig/docker across rpm update
Otherwise we have to reconfigure every time docker rpm got update.

Signed-off-by: WANG Chao <wcwxyz@gmail.com>
Upstream-commit: b51918fba18999d415cdc555616cc3076db01842
Component: engine
2015-09-17 12:12:28 +08:00
1f509b7064 Merge pull request #16358 from mrjana/mh
Vendoring libnetwork
Upstream-commit: 9ab8c2d92eae410ca765ddda4da4dab236f23153
Component: engine
2015-09-16 15:47:47 -07:00
3cfc4f37fa Merge pull request #16294 from jfrazelle/cleanup-vendor
cleanup vendoring of test deps
Upstream-commit: 0ac28f5e4858ae47a4f452959c722375e587e12f
Component: engine
2015-09-16 15:45:36 -07:00
dbdbf2ae59 Vendoring libnetwork
To fix an issue with experimental multihost networking.
git hash: 00a92f066e628e4c6d50979c070df377575aad18

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: a803148bbac87aec183be38502991bb779196560
Component: engine
2015-09-16 14:48:42 -07:00
e7573766cd Merge pull request #16351 from mavenugo/vin_ln_kv
Vendoring in libnetwork and libkv
Upstream-commit: 4a2c3733bd904919c17fbf007361093d87609686
Component: engine
2015-09-16 14:10:49 -07:00
767330f121 Merge pull request #15861 from brahmaroutu/gccgo_x86
Enable building Docker with gcc-go on x86
Upstream-commit: 74a8f2f668380d800c3ecce30fe509d997f9b106
Component: engine
2015-09-16 13:29:02 -07:00
6ad0539e3d adding a Dockerfile.gccgo to use gccgo compiler instead of go compiler.
temporarily disabling registry builds as crypto package is broken with gccgo.

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 2c53643b33fbba5851afcc7067117a7b75cc5dbb
Component: engine
2015-09-16 18:56:01 +00:00
7ff16017f2 Vendoring in libnetwork and libkv
* libkv upgrade is required for the docker discovery PR
* vendor-in libnetwork contains an update to network plugin api
  (Thanks @WeiZhang555 : https://github.com/docker/libnetwork/pull/516)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 814c19591d875a747433f87ae84dffbf58c4d21a
Component: engine
2015-09-16 11:54:28 -07:00
fd675380c0 Revert "Make daemon to start with no userlandproxy by default"
This reverts commit bf2b8ec8165468d7454f6bd86f4a78e7e8b58d8e.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 50d7fba7758e8890d49f492c284262ec9aa22190
Component: engine
2015-09-16 09:56:38 -07:00
0b5d2a0494 add opensuse to rpm builder
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: b0d4e9d1ba0dec9c43ae212ce10b509da9a05919
Component: engine
2015-09-15 16:18:19 -07:00
c4c2af06ea cleanup vendoring of test deps
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 8ef7aaf885e593fdd847693a3ffe8ff276216d1d
Component: engine
2015-09-14 17:38:50 -07:00
7c0ce8d93c Vendor-in 2baa2ddc78b42f011f55633282ac63a72e1b09c1 for userns support
Changes include :
* libnetwork support for userns
* driver api change to have 1 interface per endpoint

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: d0e0c13b603efaff14c0269d19ac7e3710307fab
Component: engine
2015-09-14 11:04:12 -07:00
357f37d8f7 Merge pull request #16244 from calavera/libcontainer_0_0_4
Vendor libcontainer v0.0.4
Upstream-commit: dac92a8afbe0900641afa00e33e84e180d432239
Component: engine
2015-09-13 22:24:44 -04:00
862065b3b2 Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
Upstream-commit: e611a189cb3147cd79ccabfe8ba61ae3e3e28459
Component: engine
2015-09-11 16:50:03 -04:00
b62f71beed Merge pull request #16231 from jfrazelle/vendor-test-deps
allow vendoring of test packages
Upstream-commit: 6f15546f6be017225f5cf428a61b9a0fd7014e6a
Component: engine
2015-09-11 13:47:03 -07:00
fdfd5340a4 Vendor libcontainer v0.0.4
Noteworthy changes:

- Add Prestart/Poststop hook support
- Fix bug finding cgroup mount directory
- Add OomScoreAdj as a container configuration option
- Ensure the cleanup jobs in the deferrer are executed on error
- Don't make modifications to /dev when it is bind mounted

Other changes in runc:

https://github.com/opencontainers/runc/compare/v0.0.3...v0.0.4

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 55a601e3f135b0a3915b7f245142ed4e90d81005
Component: engine
2015-09-11 16:17:59 -04:00
68a732e052 Make daemon to start with no userlandproxy by default
This PR makes a user visible behavior change with userland
proxy disabled by default and rely on hairpin NAT to be enabled
by default. This may not work in older (unsupported) kernels
where the user will be forced to enable userlandproxy if needed.

      - Updated the Docs
      - Changed the integration-cli to start with userlandproxy
	desiabled by default.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: bf2b8ec8165468d7454f6bd86f4a78e7e8b58d8e
Component: engine
2015-09-11 11:58:35 -07:00
fe3f11e9c6 allow vendoring of test packages
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 1ca88b2ca6c736cba8a30b2f64a347d7f9fa7d69
Component: engine
2015-09-10 19:21:46 -07:00
80380437cf do not allow the release of a dirty binary
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: b18d664692f4a2c15e4e62697547f9238193a493
Component: engine
2015-09-10 12:28:09 -07:00
b09dc49663 Merge pull request #15495 from samuelkarp/awslogs-logging-driver
Add awslogs driver for Amazon CloudWatch Logs
Upstream-commit: 9f517fc5bb95758d66a0c9d48ae9ece202352948
Component: engine
2015-09-09 17:19:39 -07:00
dbaa3ef518 Merge pull request #16192 from anusha-ragunathan/dev
Updated rpm spec to perform cleaner installs
Upstream-commit: 72f355e466447f1bee4f9cc8bcab98f8b1560396
Component: engine
2015-09-09 15:26:36 -07:00
f022abdae0 Updated rpm spec to perform cleaner installs
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 1caa9a7d162be26e2560481b917d1592f724316c
Component: engine
2015-09-09 17:13:57 -04:00
84efd65be4 Vendor AWS Go SDK
Signed-off-by: Samuel Karp <skarp@amazon.com>
Upstream-commit: 85433365cc4e16a50e29aacb8de5872c64496d4f
Component: engine
2015-09-09 13:51:14 -07:00
e36e8005d6 Merge pull request #16171 from vdemeester/lint-only-on-diff
Golint only on changed files
Upstream-commit: 00728964453d893dd739bd17d7954324d42b5073
Component: engine
2015-09-09 10:19:16 -07:00
dbc44ea4a3 Merge pull request #16149 from LK4D4/remove_link_libs
Remove -lpthread and -ldl from ldflags
Upstream-commit: 3d8aae13083458d87cc42882fa7c7ce681d620d2
Component: engine
2015-09-09 10:13:36 -07:00
61d8a97de5 Golint only on changed files
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1cca5ee98c3a2e2a2bf7e4e79d9f0a95fef7d169
Component: engine
2015-09-09 09:37:47 +02:00
48de342ac9 Remove -lpthread and -ldl from ldflags
There is no need in those flags now when we use amalgamated sqlite3 from
mattn/go-sqlite3.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 8845eb434596ea709a7ef066d191141331dd1098
Component: engine
2015-09-08 17:01:14 -07:00
22903b10c1 Merge pull request #16096 from vdemeester/14756-final-golints
Final bits of enabling golint on the code base 🐹
Upstream-commit: 634a848b8e3bdd8aed834559f3b2e0dfc7f5ae3a
Component: engine
2015-09-08 15:25:55 -07:00
fcbe186c1d Update validate-lint to find go files by itself
… and fixes the last bits that were missing :3.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0c70eb83813af6d5266769bc908593f9660b13f1
Component: engine
2015-09-08 22:07:42 +02:00
67980cf0b7 Merge pull request #16088 from jfrazelle/better-canonical-json-package
replace canonical json package 
Upstream-commit: 479fcbb1d042a02cfc9b2d30ba844c3fdbb01d73
Component: engine
2015-09-08 11:58:24 -07:00
6d655f6a79 Merge pull request #16130 from aboch/vnd
Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
Upstream-commit: eb5c81e79980dd7fad211724adb27e42a3295a6c
Component: engine
2015-09-08 11:29:34 -07:00
51f6d2a64b Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
+ Fix a couple of bugs introduced by previous vendoring:
  - in bitseq which prevents to use experimental overlay networking
  - in docker service ls cli o/p
+ Add missing http subrouter for newly introduced sandboxes
+ Fix fragmentation issue on vxlan header addition for overlay network driver
+ Remove libnetwork test code utilities from vendoring

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 4d648f924af93b6429d566120a65cb441fee692a
Component: engine
2015-09-08 07:36:35 -07:00
95ec865100 replace weird canonical json package with one that is rebased on the standard encoding/json package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: c045af833218b326621131762e4873095550035f
Component: engine
2015-09-07 18:51:33 -07:00
d9ff9abe1f update sqlite3 vendor with fix for static builds
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 46df9e4ec3453dd6f46261e0eeb276965af20880
Component: engine
2015-09-07 18:50:56 -07:00
71729da61a make binary: do not ignore unresolved symbols
TL;DR: stop building static binary that may fail

Linker flag --unresolved-symbols=ignore-in-shared-libs was added
in commit 06d0843 two years ago for the static build case, presumably
to avoid dealing with problem of missing libraries.

For the record, this is what ld(1) man page says:

> --unresolved-symbols=method
>    Determine how to handle unresolved symbols.  There are four
>    possible values for method:
> .........
>    ignore-in-shared-libs
>        Report unresolved symbols that come from regular object files,
>        but ignore them if they come from shared libraries.  This can
>        be useful when creating a dynamic binary and it is known that
>        all the shared libraries that it should be referencing are
>        included on the linker's command line.

Here, the flag is not used for its purpose ("creating a dynamic binary")
and does more harm than good. Instead of complaining about missing symbols
as it should do if some libraries are missing from LIBS/LDFLAGS, it lets
ld create a binary with unresolved symbols, ike this:

 $ readelf -s bundles/1.7.1/binary/docker-1.7.1 | grep -w UND
 ........
 21029: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND dlopen
 .........

Such binary is working just fine -- until code calls one of those
functions, then it crashes (for apparently no reason, i.e. it is
impossible to tell why from the diagnistics printed).

In other words, adding this flag allows to build a static binary
with missing libraries, hiding the problem from both a developer
(who forgot to add a library to #cgo: LDFLAGS -- I was one such
developer a few days ago when I was working on ploop graphdriver)
and from a user (who expects the binary to work without crashing,
and it does that until the code calls a function in one of those
libraries).

Removing the flag immediately unveils the problem (as it should):

	/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libsqlite3.a(sqlite3.o):
	In function `unixDlError':
	(.text+0x20971): undefined reference to `dlerror'
	/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libsqlite3.a(sqlite3.o):
	In function `unixDlClose':
	(.text+0x8814): undefined reference to `dlclose'

The problem is, gosqlite package says:

	#cgo LDFLAGS: -lsqlite3

which is enough for dynamic linking, as indirect dependencies (i.e.
libraries required by libsqlite3.so) are listed in .so file and will be
resolved dynamically by ldd upon executing the binary.

For static linking though, one has to list all the required libraries,
both direct and indirect. For libraries with pkgconfig support the
list of required libraries can be obtained with pkg-config:

	$ pkg-config --libs sqlite3 # dynamic linking case
	-lsqlite3
	$ pkg-config --libs --static sqlite3 # static case
	-lsqlite3 -ldl -lpthread

It seems that all one has to do is to fix gosqlite this way:

	-#cgo LDFLAGS: -lsqlite3
	+#cgo pkg-config: sqlite3

Unfortunately, cmd/go doesn't know that it needs to pass --static
flag to pkg-config in case of static linking
(see https://github.com/golang/go/issues/12058).

So, for one, one has to do one of these things:

1. Patch sqlite.go like this:

	-#cgo LDFLAGS: -lsqlite3
	+#cgo pkg-config: --static sqlite3

(this is exactly what I do in goploop, see
https://github.com/kolyshkin/goploop/commit/e9aa072f51)

2. Patch sqlite.go like this:
	-#cgo LDFLAGS: -lsqlite3
	+#cgo LDFLAGS: -lsqlite3 -ldl -lpthread

(I would submit this patch to gosqlite but it seems that
https://code.google.com/p/gosqlite/ is deserted and not maintained,
and patching it here is not right as it is "vendored")

3. Explicitly add -ldl for the static link case.
This is what this patch does.

4. Fork sqlite to github and maintain it there. Personally I am not
ready for that, as I'm neither a Go expert nor gosqlite user.

Now, #3 doesn't look like a clear solution, but nevertheless it makes
the build much better than it was before.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Upstream-commit: 15aad5d3e6d97627345586e5ee92a896667bb33a
Component: engine
2015-09-04 13:15:25 -07:00
35638190ef Merge pull request #16054 from jfrazelle/update-sqlite3-dep
code.google.com is shutting down so update the dep
Upstream-commit: 38ecc7fc32ba2acdb95559292d4a7aed5b1cbabe
Component: engine
2015-09-03 19:20:57 -07:00