Commit Graph

152 Commits

Author SHA1 Message Date
1c1053a5c6 Fix libdevmapper deferred removal detection
When linking, position of `-l` flags is important since
they muse come _after_ any object files which uses symbols
from a specified library, that is due to --as-needed binutils
ld flag enabled by default

Signed-off-by: Maxim Ivanov <ivanov.maxim@gmail.com>
Upstream-commit: 24152a4231d56886928265339d15884e1cfe1038
Component: engine
2016-02-17 23:56:21 +00:00
cb9f693ca8 add validation for generating default secccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 9bc771af9d09026111916191394eb2896608eb59
Component: engine
2016-02-08 13:04:52 -08:00
7383a82de4 Merge pull request #19071 from icecrime/incremental_builds
Enable incremental builds
Upstream-commit: ae14e6cc0ab24b57e7a6873ece7263bb6cc6aa44
Component: engine
2016-01-27 11:21:01 -05:00
50846c5d05 Enable incremental builds
Remove the `-a` build flag and introduce `-i` in order to reuse
previously compiled dependencies.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 1445e4db32e648277470513213473021ca59010a
Component: engine
2016-01-26 21:24:44 -08:00
4edafc3bc1 *: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used
as a way for us to do configuration for LXC containers once the
container had started. LXC is no longer supported, and /.dockerinit has
been dead code for quite a while. This removes all code and references
in code to dockerinit.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: 4357ed4a7363a1032edf93cf03232953c805184f
Component: engine
2016-01-26 23:47:02 +11:00
285dba59c1 Windows CI: In container logic flaw
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5601fc8507d9edb4eb764b7337866ea04f44be54
Component: engine
2016-01-24 09:22:50 -08:00
bfaa6f239b Fixes #19614
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
Upstream-commit: 0c7201ee736f77e63cd1f191dfd6a3cf549b6def
Component: engine
2016-01-24 10:28:18 +01:00
4b43f56b91 Merge pull request #19488 from hypriot/enable-docker-trust-suite-on-arm
Enable DockerTrustSuite for ARM again
Upstream-commit: cba7ba25f4358c86aee4872186d9dfd2fc3dc0fd
Component: engine
2016-01-22 11:23:19 -05:00
a7b9f6d573 Merge pull request #19316 from Microsoft/jjh/incontainererror
Windows: In container build check
Upstream-commit: e287bef453f2b4419a26e9bfa94987f13aa8376f
Component: engine
2016-01-21 13:44:19 -08:00
fb1bb8a419 Windows: In container build check
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4dbd612d474317fdd7bd983f2d1a05654c2ceaad
Component: engine
2016-01-21 13:15:23 -08:00
c61a40877b Remove validate-vendor from default bundles
Because it's triggered another way :)
See https://github.com/docker/leeroy/pull/44

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e5bce745925384501422ed61cb69b968187bda0e
Component: engine
2016-01-20 18:29:28 +01:00
6c742b7427 Enable DockerTrustSuite for ARM again
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: acb42c5fabc154609bc2cb6b6b55477371945ac4
Component: engine
2016-01-20 14:58:09 +01:00
d154b3d30f Fix test requirement for ARM
Correctly passes the DOCKER_ENGINE_GOARCH env var
to the testing environment

Also fixes logic for skipping a test if on ARM.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: d12f4babdd08acd3cf64c2ee4a9550c81d534816
Component: engine
2016-01-19 15:23:46 -05:00
d22cc489e9 Skip failing tests on ARM to get red/green feedback from Jenkins
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: 4f339570cbd3cc57f5410c4ca08c7d7e03e6e56f
Component: engine
2016-01-18 17:00:15 +01:00
898ac34e33 Move userns support out of experimental into master
Adds the `--userns-remap` flag to the master build

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 557c7cb888ad8e2f1f378c9cf34e5fba14551904
Component: engine
2016-01-08 15:06:22 -05:00
40d1466ce7 Add a validate-vendor script
Makes sure that if ./hack/vendor.sh has been updated, it has been used
to update the vendor folder.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4c22c566e25ff2bc6fa80cd9627c59512a1f768d
Component: engine
2016-01-07 19:57:50 +01:00
29a743c21a Rename -dirty to -unsupported
Nightly and unofficial builds of Docker bear the suffix `-dirty` in the
version string. Change this suffix to `-unsupported` to make it explicit
that no support will be provided on such versions, and that it is for
example unnecessary to file an issue for it.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 3e298c5928d0a2cbf5e1b374783ce59de2076637
Component: engine
2015-12-24 09:11:49 -08:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
33cb231c55 Fix broken Windows CI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c10311bc9a981f1fdea88ba5f488225eaeea2b69
Component: engine
2015-12-03 10:12:11 -08:00
c529eb3ce9 Consolidate time format for API
Consolidate all the API to same time format: RFC3339, and it will be
client's responsibility to present it in more user friendly way.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 9daca1222adabf3aeae97a2c4e5f4ed1bb8c15e1
Component: engine
2015-12-02 22:40:18 +08:00
5c2015e2d5 Merge pull request #17714 from mikedougherty/cs-release-fixes
Fixes for release scripts
Upstream-commit: ae1fadeb96c8f64f1eebe2b729c07048398de013
Component: engine
2015-11-23 19:47:10 -08:00
a265b48c9a Fixes for release scripts:
Add a flag to allow keeping bundles around (helps with CI)

Fix several problems in repo make targets

* quote DOCKER_EXPERIMENTAL variable
* pass-through arguments for gpg  provided to dpkg-sig are now quoted
  properly, so passphrases with shell-interpolated symbols can be used
* when determining deb suites, don't rely on 'origin' to be
  github.com/docker/docker

Fix some issues with deb repository creation from scratch

* Don't add empty components to the repository configuration as they
  will cause failure when generating.

Add old docker-engine-cs name to package conflicts

Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
Upstream-commit: a15b67b1affb2eac5365614e55703f43b6f73e9b
Component: engine
2015-11-23 17:15:54 -08:00
e1191bf537 Merge pull request #17459 from brahmaroutu/Power_Z_CI
Build and test Docker on IBM Power and Z using gccgo. Enable CI on Po…
Upstream-commit: 249b3a9479048bcec8da0666c2e224dddcfc3de8
Component: engine
2015-11-19 15:50:07 -08:00
acf57d6a06 Prevent the creation of "a.out" at the repo root
Our clever "gcc" invocations were creating a spurious "a.out" file at the root of the repo (which just happened to be in ".gitignore" so we didn't notice it sooner).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 7f608c391dc62a712cf0d641698ed1cdc38a4e6c
Component: engine
2015-11-17 09:44:36 -08:00
19bcd2fd89 Remove "-linkmode external"
We're having to override it in so many places that it no longer seems worthwhile to bother.  On top of that, the reason we did it in the first place was for being able to compile devicemapper statically, which still works after this change (either due to other changes in the way we build, or improvements in Go itself).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 927e1e98b7d37bf0593651d4b639e19277e775ca
Component: engine
2015-11-15 14:47:48 -08:00
42d5166bfc Merge pull request #17758 from rhatdan/dynbinary
Since default is dynbinary we should test with dynbinary
Upstream-commit: fb77b822ad2bb5d097ebd19a6ad4825b967a52ab
Component: engine
2015-11-14 10:54:03 -08:00
dd78f03b3f Since default is dynbinary we should test with dynbinary
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 0d47b74a7f3f42640d0714b651417415461b1b8c
Component: engine
2015-11-14 06:01:55 -05:00
cf05bcf15c Build and test Docker on IBM Power and Z using gccgo. Enable CI on Power and Z.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: b1cc78b8f5d0c85c80c04a15fa791025ae7d22e6
Component: engine
2015-11-14 03:16:45 +00:00
c3491d2f3b add buildtag pkcs11 to experimental
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 141369457ffaeee79154f4b649525f5c8b3d5f2e
Component: engine
2015-11-13 13:20:49 -08:00
d41faf6fe1 Merge pull request #17699 from jfrazelle/update-release-script-to-new-process
update release script and release process
Upstream-commit: 8b9856dbd7a1981aaa76fcf0fc10b37d1141c9af
Component: engine
2015-11-12 09:51:36 -08:00
7fb35a1e4a hack: make.sh: remove not used function
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: dc41fff56eb85552c38716533b2cd982d6e02f40
Component: engine
2015-11-11 10:19:03 +01:00
2f262fa249 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
Upstream-commit: 58b270c338e831ac6668a29788c72d202f9fc251
Component: engine
2015-11-09 13:15:50 -08:00
48001c30bb dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8054a303870b81eebe05e38261c1b68197b68558
Component: engine
2015-11-09 19:32:46 +01:00
e5d27b4461 Remove DOCKER_EXECDRIVER env
Since --exec-driver flag has been removed, we don't need environment
DOCKER_EXECDRIVER in integration-cli and Makefile any more.

Signed-off-by: Lei Jitang <leijiang@huawei.com>
Upstream-commit: 3c4dab51d33f6e90c45de83c01474bc60aee3766
Component: engine
2015-11-09 09:17:32 +08:00
ef88e7ace2 Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3b5fac462d21ca164b3778647420016315289034
Component: engine
2015-11-05 17:09:57 -05:00
5805b4b796 update release script and release process
Signed-off-by: Jessica Frazelle <princess@docker.com>
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: d0a4b216a68d0ea27b4604330ed779fa5ed96c35
Component: engine
2015-11-04 16:20:04 -08:00
cc55863497 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b78ca243d9fc25d81c1b50008ee69f3e71e940f6
Component: engine
2015-10-27 21:23:53 -04:00
4d261096ec dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d5cd032a86617249eadd7142227c5355ba9164b4
Component: engine
2015-10-27 20:36:07 +01:00
9b28670308 fix logic because jess is the worst
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 930b27a86bf02969600259ce3a5d3fcff10edcb5
Component: engine
2015-10-09 22:21:24 -04:00
29fa44dc8c add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ea3afdad612448fc6eefcc4bdd63563be8f16946
Component: engine
2015-10-09 20:50:27 -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
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
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
9416fd6ce9 Windows: Workaround for CI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ac120567e8015a6a98f0aa7ac71f3ce2d5f36031
Component: engine
2015-08-05 11:20:30 -07:00
c56f8c4097 Enable validate-lint as part of CI
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: bc8b8e03b48bf1ef6ce6b67271948e4a20c2ed31
Component: engine
2015-07-22 15:23:34 -07:00
14e7c996e2 Increase timeout to run tests on slow platforms
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: b98edced9e16e73b84a1a7fc670d4c3f6d57f3e8
Component: engine
2015-07-13 21:13:17 +00:00
888e384d70 Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 87eae0d659d6e4bb75942455f3f73a74f54ed3b9
Component: engine
2015-06-22 13:00:27 -07:00
6fba235ed8 Add new "validate-pkg" bundlescript
This helps ensure that `github.com/docker/docker/pkg/...` is actually safe to use in isolation (ie, doesn't import anything from `github.com/docker/docker` except other things from `pkg` or vendored dependencies).

Adding `github.com/docker/docker/utils` to the imports of `pkg/version/version.go`:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
These files import internal code: (either directly or indirectly)
 - pkg/version/version.go imports github.com/docker/docker/autogen/dockerversion
 - pkg/version/version.go imports github.com/docker/docker/utils
```

And then removing it again:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
Congratulations! "./pkg/..." is safely isolated from internal code.
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 9465272c281c602c758e51ed99f344c0686a899a
Component: engine
2015-06-12 12:28:23 -07:00
2345f52566 Merge pull request #12992 from aidanhs/aphs-easy-debug-build
Allow passing DOCKER_DEBUG= to `make`
Upstream-commit: 75f63499a05ecd6511b468b666973ed9d38037ae
Component: engine
2015-06-08 15:15:49 -07:00