Commit Graph

1888 Commits

Author SHA1 Message Date
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
d81a719c8c Merge pull request #15955 from aaronlehmann/parallel-pull-race-2
Fix race condition when waiting for a concurrent layer pull
Upstream-commit: c044dadadea5b13bb0216321c79f51c4f8d44c09
Component: engine
2015-09-11 12:45:25 -07: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
e7b8d5068c Fix race condition when waiting for a concurrent layer pull
Before, this only waited for the download to complete. There was no
guarantee that the layer had been registered in the graph and was ready
use. This is especially problematic with v2 pulls, which wait for all
downloads before extracting layers.

Change Broadcaster to allow an error value to be propagated from Close
to the waiters.

Make the wait stop when the extraction is finished, rather than just the
download.

This also fixes v2 layer downloads to prefix the pool key with "layer:"
instead of "img:". "img:" is the wrong prefix, because this is what v1
uses for entire images. A v1 pull waiting for one of these operations to
finish would only wait for that particular layer, not all its
dependencies.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 23e68679f080fee7ceb25cf791832f523a3a024a
Component: engine
2015-09-11 10:52:34 -07:00
128f497a4a Merge pull request #16026 from vdemeester/integration-cli-utils-tests
Add unit tests for integration cli utils.go functions
Upstream-commit: 335689118bfb0451885221a9706d01c7d3c2bda6
Component: engine
2015-09-11 10:21:09 -07:00
1e38e54eff Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3781cde61ff10b1d9114ae5b4c5c1d1b2c20a1ee
Component: engine
2015-09-10 19:56:05 -04:00
d563cc164c Signal to stop a container.
Allow to set the signal to stop a container in `docker run`:
- Use `--stop-signal` with docker-run to set the default signal the container will use to exit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0e50d946a25beb134bce2aaf4a209b5cfcbacf8f
Component: engine
2015-09-10 19:56:05 -04:00
9f56a7069d Added tags list to /images/:id/json api.
It closes #10139.

Signed-off-by: Rozhnov Alexandr <nox73@ya.ru>
Upstream-commit: e9e68fa2d29a5e3053fb876b19b5ac5bc6d1c222
Component: engine
2015-09-10 11:55:01 +03:00
5e00b6c763 Merge pull request #14626 from kunalkushwaha/add-network-cli-help
"docker network" missing from docker --help
Upstream-commit: a796ac53185c2827017843fec21e02aba88f6ace
Component: engine
2015-09-09 13:36:43 -07:00
3d19f9af55 Add unit tests for integration cli utils function
- utils_test.go and docker_utils_test.go
- Moved docker related function to docker_utils.go
- add a test for integration-cli/checker

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5109071706cab06257b21172627ce51e5fa3a88c
Component: engine
2015-09-09 15:36:44 +02:00
154c412ece Merge pull request #15798 from calavera/volume_driver_host_config
Move VolumeDriver to HostConfig to make containers portable.
Upstream-commit: 9ca4aa479788867cd2dce161efa1e43ea5dfc14f
Component: engine
2015-09-08 22:05:40 -04:00
5f33863cc9 Merge pull request #16157 from runcom/add-missing-err-check-integration-cli-run
integration-cli: add missing err check
Upstream-commit: a58aa9d8899c55d328fbfcdd8f61dd72b738fa52
Component: engine
2015-09-08 17:26:10 -07:00
ebd47f0636 Merge pull request #16158 from duglin/Issue16146
Add --help to "docker volume inspect --help" output
Upstream-commit: 4b4597ae17d4fd8843aa9367fd1aa790cc74f7f6
Component: engine
2015-09-08 19:50:22 -04: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
d879adf33b Add --help to "docker volume inspect --help" output
Closes #16146

While in there, modified the testing infrastructure for the help text
so that we can get commands with nested commands - like "volume".

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 87255b6721f4dc02ae34696f2013537fdc967a99
Component: engine
2015-09-08 14:24:00 -07:00
4bdf1be246 integration-cli: add missing err check in TestRunNetworkNotInitializedNoneMode
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: d5a705b60036b1a914486bf700546e26e75e9e9d
Component: engine
2015-09-08 23:05:54 +02: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
1e6922e84b Fix docker volume dangling filter
The docker volume ls -f dangling=true filter was
inverted; the filtered results actually returned all
non-dangling volumes.

This fixes the filter and adds some integration tests
to test the correct behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1cbf9047b3be1bee39a72e96808581ff3c312a6c
Component: engine
2015-09-06 20:17:56 +02:00
2b2fcd8cea Remove dead code
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: c957d9c768a3c2e56b31db09399b49b8dc66c3c1
Component: engine
2015-09-06 19:52:39 +08:00
c03ccb6893 Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9a3558a9d75ed6a2f9f1b2d80800226afaa74a5
Component: engine
2015-09-04 12:32:40 -07:00
cd76a76b2f Temp: Turn off dockerhubpullsuite on Win2Linux CI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0b18b1b3095ec8a937e76e02b9f0805972cff734
Component: engine
2015-09-04 11:53:40 -07:00
4792ea30e7 Merge pull request #16065 from Microsoft/10662-fix2panics
Fixes 2 panics initialising tests
Upstream-commit: 6b14d9a64576197901c9a498caef3cc6f7f3bc43
Component: engine
2015-09-04 11:07:17 -07:00
4ec4a9a12d Merge pull request #16039 from icecrime/update_pull_tests
Update pull tests
Upstream-commit: 5b46d8f0fa2a687f748d65697bc094e69d039455
Component: engine
2015-09-04 09:52:41 -07:00
6aeaa4026b Merge pull request #15999 from cpuguy83/15994_ext_volume_bind
Set bind driver after volume is created
Upstream-commit: 7c667f9d6e506fb502426f2d98db8c0c124fe03b
Component: engine
2015-09-04 09:47:10 -07:00
350911ed1c Move VolumeDriver to HostConfig to make containers portable.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6549d6517bf9a7c79d21a86cbf36af10fcdbfbe0
Component: engine
2015-09-04 12:42:44 -04:00
b8b3d17b1b "docker network" missing from docker --help
Fixed issues related to network subcommand tests
- "network" in exempted list of short help check
- Condition for exact test modified to meet experimental commands
- Sorting of commands done in flags_experimental

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Upstream-commit: 44da5c3de2c763c4bc42a74051ad7a37adf1f553
Component: engine
2015-09-04 15:34:17 +09:00
1f9dd04dfa Merge pull request #15877 from Microsoft/10662-trigger
Fix trigger count and output
Upstream-commit: 0009852cb0ceadc398c9d30c7f5494848004c20f
Component: engine
2015-09-03 20:04:05 -07:00
1c8b6d6152 Fixes 2 panics initialising tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 69bf17ffbd67fdfbbfbdb09bf7e183ffcfc7811e
Component: engine
2015-09-03 18:26:38 -07:00
e579f48cbf Merge pull request #15845 from calavera/refactor_daemon_list
Refactor daemon container list.
Upstream-commit: c8c1c472b21fbe7079f5fccbbda8d9652c7c00d3
Component: engine
2015-09-03 20:48:54 -04:00
bbd3497cdd Fix trigger count and output
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 662010292619c33db7f144890abfdd9a99b423e0
Component: engine
2015-09-03 17:39:19 -07:00
0249cbd7d9 Update image pull tests
Update and migrate existing tests to the `DockerHubPullSuite`. Most
tests were preserved, but refactored and made more exhaustive. One test
was deliberately removed (`TestPullVerified`) as it is unreliable and
that the feature was obsoleted by content trust.

Move all trust related tests to `docker_cli_pull_trusted_test.go`.

Move tests depending on a local registry to `docker_cli_pull_local_test.go`.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f324f4851f28edfd8dab82cd624a4ec1f01cd207
Component: engine
2015-09-03 15:57:41 -07:00
595af68c98 Add integration-cli/checker package
Add a `checker` package that adds some utility Checker implementation,
the first one being `checker.Contains`, as well as brining all go-check
provided Checker implementations in scope as a commodity.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: c87cbd3862336fb01addff5d753ff7c8e0d50879
Component: engine
2015-09-03 15:57:41 -07:00
2f2b355be9 Merge pull request #16038 from aboch/sbx
Vendor libnetwork dc52820147f40fe424c8959987af3b396f842639
Upstream-commit: 288275ab60c049fa644f1ce5d36c0c005e8dd02c
Component: engine
2015-09-03 11:48:02 -07:00
813cd9d35e Add test suite for push/pull code
Introduce the `DockerHubPullSuite` that interacts with its own dedicated
daemon, thus allowing to start from a clean environment and finely test
against the impact of isolated push and pull operations.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 9e4addde76f4aea4613f09215084812b6a357521
Component: engine
2015-09-02 22:06:24 -07:00
357660a251 Docker changes for libnetwork Sandbox
- Ground-work for integrating with user namespace support

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 56fdb05258d1ab2153fec268ed22cf9d1227c356
Component: engine
2015-09-02 17:24:56 -07:00
ee5c0b914e Set bind driver after volume is created
When using a named volume without --volume-driver, the driver was
hardcoded to "local".
Even when the volume was already created by some other driver (and
visible in `docker volume ls`), the container would store in it's own
config that it was the `local` driver.
The external driver would work perfecly fine until the daemon is
restarted, at which point the `local` driver was assumed because that is
as it was set in the container config.

Set the bind driver to the driver returned by createVolume.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 39be36658d559d0fe28c902ad0f45287868c7ebb
Component: engine
2015-09-02 20:13:20 -04:00
9980495b3c Remove TestPushInterrupt
This test relies on a race condition, and has been failing often in CI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6cc38775bbff9b9304e551b26593af9c867c61bb
Component: engine
2015-09-02 15:30:55 -07:00
49cb61bb67 Merge pull request #15921 from srust/volume_driver_register_retry
Retry registering a volume driver
Upstream-commit: 1ed3cb2b6c47d7e3d83882181346f0b9708f3e2c
Component: engine
2015-09-02 11:24:52 +02:00
3ce116129d Retry registering a volume driver
Signed-off-by: Stephen Rust <srust@blockbridge.com>
Upstream-commit: 45fdce8a0d36d9b0825a6dfb6634a81f9af258af
Component: engine
2015-09-01 14:56:29 -04:00
6bbc3d3c6c Merge pull request #15983 from Microsoft/unix-run-test
Move run tests out of unix files
Upstream-commit: 70f0d6d84c77a3c425d2d6e790730b5abe2abcca
Component: engine
2015-09-01 10:49:01 -07:00
e3bcc2a340 Move run tests out of unix files
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d7eb85bb1f0076ccffbec7c9291cc27d2cc4cc03
Component: engine
2015-09-01 09:42:19 -07:00
4dabd24bfd Moved unix links tests to non-platform
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4fccf8adfa50855afa0ffaed1ea5c22ddaa7b2e4
Component: engine
2015-09-01 09:10:24 -07:00
c770771c57 Merge pull request #15976 from duglin/MissingDefer
Add missing defer to delete temp dir
Upstream-commit: 26fb160610dc5195ef8d84f972a3fc215541a1b3
Component: engine
2015-09-01 17:13:37 +02:00
9783af1dd1 Add missing defer to delete temp dir
Minor thing I just noticed

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 51e721ab072441ba6ae14b84613cf2b3acd6316b
Component: engine
2015-09-01 07:19:38 -07:00
81b8a83415 Merge pull request #15900 from Microsoft/10662-testinfra
Test infrastructure for cross platform
Upstream-commit: 567687fd98d471a3b4a04ba0aa3a595c931799ef
Component: engine
2015-09-01 09:18:29 -04:00
b060726a85 Merge pull request #15963 from Microsoft/fix-unixtestport
Move TestPort out of _unix
Upstream-commit: 84bc41a3fb8a0150448caca8f5f4d7f1a00e23b3
Component: engine
2015-08-31 17:09:59 -07:00
8216c91a01 Fix typo in test title
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3c2b128582bc8ea786b5486578c43d97167805fe
Component: engine
2015-08-31 15:28:40 -07:00
dece7c3355 Move TestPort out of _unix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 68c7d24a12ca54d052cdc033c06f27c19ee5bab0
Component: engine
2015-08-31 14:40:36 -07:00
cd128eab1d Merge pull request #15606 from jlhawn/img_delete
[daemon] Refactor image_delete.go
Upstream-commit: 96974170f8ca82dedffbfe54e84b6b1b2f5661d2
Component: engine
2015-08-31 18:22:48 +02:00
e382bc454d Test infrastructure for cross platform
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: cd18e7bb739b7681507aca48fec36db9104a5e89
Component: engine
2015-08-31 09:10:18 -07:00