Граф коммитов

927 Коммитов

Автор SHA1 Сообщение Дата
David Calavera 9ab8c2d92e Merge pull request #16358 from mrjana/mh
Vendoring libnetwork
2015-09-16 15:47:47 -07:00
Arnaud Porterie 0ac28f5e48 Merge pull request #16294 from jfrazelle/cleanup-vendor
cleanup vendoring of test deps
2015-09-16 15:45:36 -07:00
Jana Radhakrishnan a803148bba Vendoring libnetwork
To fix an issue with experimental multihost networking.
git hash: 00a92f066e628e4c6d50979c070df377575aad18

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-16 14:48:42 -07:00
David Calavera 4a2c3733bd Merge pull request #16351 from mavenugo/vin_ln_kv
Vendoring in libnetwork and libkv
2015-09-16 14:10:49 -07:00
Jess Frazelle 74a8f2f668 Merge pull request #15861 from brahmaroutu/gccgo_x86
Enable building Docker with gcc-go on x86
2015-09-16 13:29:02 -07:00
Srini Brahmaroutu 2c53643b33 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>
2015-09-16 18:56:01 +00:00
Madhu Venugopal 814c19591d 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>
2015-09-16 11:54:28 -07:00
Jessica Frazelle 50d7fba775
Revert "Make daemon to start with no userlandproxy by default"
This reverts commit bf2b8ec816.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-16 09:56:38 -07:00
Jessica Frazelle 8ef7aaf885
cleanup vendoring of test deps
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-14 17:38:50 -07:00
Madhu Venugopal d0e0c13b60 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>
2015-09-14 11:04:12 -07:00
Phil Estes dac92a8afb Merge pull request #16244 from calavera/libcontainer_0_0_4
Vendor libcontainer v0.0.4
2015-09-13 22:24:44 -04:00
Nalin Dahyabhai e611a189cb 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)
2015-09-11 16:50:03 -04:00
David Calavera 6f15546f6b Merge pull request #16231 from jfrazelle/vendor-test-deps
allow vendoring of test packages
2015-09-11 13:47:03 -07:00
David Calavera 55a601e3f1 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>
2015-09-11 16:17:59 -04:00
Jana Radhakrishnan bf2b8ec816 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>
2015-09-11 11:58:35 -07:00
Jessica Frazelle 1ca88b2ca6 allow vendoring of test packages
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-10 19:21:46 -07:00
Jessica Frazelle b18d664692 do not allow the release of a dirty binary
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-10 12:28:09 -07:00
David Calavera 9f517fc5bb Merge pull request #15495 from samuelkarp/awslogs-logging-driver
Add awslogs driver for Amazon CloudWatch Logs
2015-09-09 17:19:39 -07:00
David Calavera 72f355e466 Merge pull request #16192 from anusha-ragunathan/dev
Updated rpm spec to perform cleaner installs
2015-09-09 15:26:36 -07:00
Anusha Ragunathan 1caa9a7d16 Updated rpm spec to perform cleaner installs
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2015-09-09 17:13:57 -04:00
Samuel Karp 85433365cc Vendor AWS Go SDK
Signed-off-by: Samuel Karp <skarp@amazon.com>
2015-09-09 13:51:14 -07:00
Jess Frazelle 0072896445 Merge pull request #16171 from vdemeester/lint-only-on-diff
Golint only on changed files
2015-09-09 10:19:16 -07:00
Jess Frazelle 3d8aae1308 Merge pull request #16149 from LK4D4/remove_link_libs
Remove -lpthread and -ldl from ldflags
2015-09-09 10:13:36 -07:00
Vincent Demeester 1cca5ee98c Golint only on changed files
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-09 09:37:47 +02:00
Alexander Morozov 8845eb4345 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>
2015-09-08 17:01:14 -07:00
Jess Frazelle 634a848b8e Merge pull request #16096 from vdemeester/14756-final-golints
Final bits of enabling golint on the code base 🐹
2015-09-08 15:25:55 -07:00
Vincent Demeester 0c70eb8381 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>
2015-09-08 22:07:42 +02:00
David Calavera 479fcbb1d0 Merge pull request #16088 from jfrazelle/better-canonical-json-package
replace canonical json package
2015-09-08 11:58:24 -07:00
Madhu Venugopal eb5c81e799 Merge pull request #16130 from aboch/vnd
Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
2015-09-08 11:29:34 -07:00
Alessandro Boch 4d648f924a 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>
2015-09-08 07:36:35 -07:00
Jessica Frazelle c045af8332 replace weird canonical json package with one that is rebased on the standard encoding/json package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-07 18:51:33 -07:00
Jessica Frazelle 46df9e4ec3 update sqlite3 vendor with fix for static builds
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-07 18:50:56 -07:00
Kir Kolyshkin 15aad5d3e6 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>
2015-09-04 13:15:25 -07:00
Jessie Frazelle 38ecc7fc32 Merge pull request #16054 from jfrazelle/update-sqlite3-dep
code.google.com is shutting down so update the dep
2015-09-03 19:20:57 -07:00
Jessie Frazelle 90477e8e94 Merge pull request #16066 from jfrazelle/remove-reprepro
remove reprepro
2015-09-03 18:20:01 -07:00
Jessie Frazelle 1fa560e6eb Merge pull request #15706 from clnperez/vendor-helper-use-branch
Allow branch name in vendor-helper script
2015-09-03 18:02:06 -07:00
Tianon Gravi b019229996 Merge pull request #16052 from jfrazelle/fix-release-selinux
make docker-engine-selinux findable
2015-09-03 17:52:39 -07:00
Jessica Frazelle 4a864a7552 code.google.com is shutting down so update the dep
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-03 17:39:29 -07:00
Jessica Frazelle e7cf75c103 remove reprepro
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-03 17:31:49 -07:00
Tibor Vass 07d2eae6d5 Merge pull request #16060 from vdemeester/14756-lint-pkg-term-windows
Lint pkg/term/windows package
2015-09-03 19:54:20 -04:00
Vincent Demeester 3409de971c Lint pkg/term/windows package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-03 22:25:52 +02:00
Michael Crosby 288275ab60 Merge pull request #16038 from aboch/sbx
Vendor libnetwork dc52820147f40fe424c8959987af3b396f842639
2015-09-03 11:48:02 -07:00
Jessica Frazelle c7b3e7e770 make docker-engine-selinux findable
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-03 08:58:33 -07:00
Alessandro Boch 414dfbf681 Vendor libnetwork dc52820147f40fe424c8959987af3b396f842639
Main changes in this vendoring are to allow user name space integration in docker.
And it includes major fix for network namespace handling

Signed-off-by: Alessandro Boch <aboch@docker.com>

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-02 16:57:43 -07:00
Jessica Frazelle 12a71c8954 use apt-ftparchive and reprepro to enable apt-pinning;
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-02 09:32:24 -07:00
Jessica Frazelle 80c32162b5 we dont need the tty in the install script
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-08-31 08:12:01 -07:00
David Calavera 998699316c Merge pull request #15901 from Microsoft/10662-revendorhcs
Windows: Revendor HCSShim with godoc
2015-08-31 10:03:18 +02:00
David Calavera 9703c3a90e Merge pull request #15914 from dmcgowan/fix-upload-sanitize
Fix sanitize URL bug on layer upload
2015-08-31 09:35:28 +02:00
Jessica Frazelle 8fe675d799 add selinux-policy and docker-engine-selinux rpm
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-08-28 17:54:04 -07:00
Jessica Frazelle df6d928370 update spec file to require docker-engine-selinux policy
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-08-28 17:43:30 -07:00