Commit Graph

1915 Commits

Author SHA1 Message Date
16952d5c9b Merge pull request #16363 from coolljt0725/fix_net_none_test
Fix --net none test closes #16356
Upstream-commit: 7d5603e7cbc8799789b356adf354c1859e4974e7
Component: engine
2015-09-19 09:25:12 -04:00
fde5729def Fix --net none test closes #16356
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0b2091132a6db1a9887626e1e85ca644c50dcbb4
Component: engine
2015-09-18 20:49:36 -04:00
f242555aaa integration-cli: fix tests with memory limit
If you don't have cgroup swap memory support, `dockerCmd`'s output in
these tests will be polluted by a warning from the daemon and will fail
the tests.
No need to have memory swap support for these tests to run as it will
be reset to -1 and everything will continue correctly.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 0b8b8ed9e98a7355661f1aad93bfa0dd76362723
Component: engine
2015-09-19 00:07:40 +02:00
f1ab116cf0 Merge pull request #16403 from runcom/fix-containers-json-emtpy-response
Fix GET /containers/json emtpy response regression
Upstream-commit: 96f9efc0636be5d89fd242e7a5aa96485b80ad01
Component: engine
2015-09-18 11:47:42 -07:00
3afb789aff Fix GET /containers/json emtpy response regression
GET /containers/json route used to reply with and empty array `[]` when no
containers where available. Daemon containers list refactor introduced
this bug by declaring an empty slice istead of initializing it as well
and it was now replying with `null`.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 26bd5e3a2da3157f0bcb6654c30b6eccedf7f3f3
Component: engine
2015-09-18 18:44:46 +02:00
0cc2676e92 Correct wrong comment for TestRunWithoutMemoryswapLimit case.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: cf6a53642a0abdec9e2b2269d522a20e2a885f65
Component: engine
2015-09-18 08:28:36 +08:00
2a20dd0c76 Merge pull request #16377 from runcom/add-stats-tests
integration-cli: add cli/api stats tests when container not found
Upstream-commit: 52d7542195e301cb45be9b5ff210a39c975cde02
Component: engine
2015-09-17 13:43:02 -07:00
c5612022ae Merge pull request #16271 from runcom/deprecate-cli-opts
Deprecate -c cli short variant flag in docker run
Upstream-commit: 4702d45599bf69b525a58c804d175732b934591e
Component: engine
2015-09-17 11:52:59 -07:00
2d5e18cda2 Merge pull request #16355 from duglin/DaemonErrors
Convert some "daemon" static error strings to the new errocode package format
Upstream-commit: 828e4ac45a5b4954997949570b9b032c57137849
Component: engine
2015-09-17 11:48:37 -07:00
e0ab2a79d7 integration-cli: add cli/api stats tests when container not found
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 66be81b148a1c6693c44cf52d8172d512eedc233
Component: engine
2015-09-17 18:20:25 +02:00
d13159ba93 Merge pull request #16361 from MHBauer/stats-refactor
refactor stats to not use internal data structures
Upstream-commit: cafee2eb4544442cd1307c1484235261b5b2752a
Component: engine
2015-09-17 08:28:07 -07:00
0351ae3d97 Deprecate -c cli short variant flag in docker run
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: e5a26ec0814eebca59ecde38b1aaa5a7de4013fb
Component: engine
2015-09-17 15:48:48 +02:00
b23ea59e6d refactor stats to not use internal data structures
- refactor to make it easier to split the api in the future
 - addition to check the existing test case and make sure it contains
   some expected output

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 2d5d606fd368814ead4ff189eeae264f2af8691b
Component: engine
2015-09-16 17:28:52 -07:00
6295202aba Convert some "daemon" static error strings to the new errocode package format
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f7d4b4fe2b130a522dee847a657218806180fa52
Component: engine
2015-09-16 16:16:42 -07:00
af40a9a21d Merge pull request #16031 from thockin/14069-dns-options
Add support for DNS options
Upstream-commit: 5cbcbfc03cc11de8d58dd0977327bb6a8cfc9fa4
Component: engine
2015-09-16 23:59:19 +02:00
10a1fde8b9 Merge pull request #16261 from vdemeester/integration-dockercmd
Move dockerCmd to pkg/integration and add tests to it
Upstream-commit: 677a6eaf8f33360e87fb915e632a5d0e8e380dbd
Component: engine
2015-09-16 17:40:33 -04:00
655513db24 Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 3d4685e258a7729bd0f8cc411b5a73980a9faa20
Component: engine
2015-09-16 14:06:45 -07:00
72a3863e6b Merge pull request #16350 from cpuguy83/fix_error_on_dev-snd_test
Skip TestRunDeviceDirectory when no /dev/snd
Upstream-commit: fb01c2ea3cbc723d4f6950f8d004bbc064acd1f3
Component: engine
2015-09-16 13:56:11 -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
28003be63b Skip TestRunDeviceDirectory when no /dev/snd
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 88b895111b57e49b4cdb9c3965e87925ad8947fa
Component: engine
2015-09-16 14:43:30 -04:00
5e58ae50d3 Merge pull request #15786 from HuKeping/stats-network
Refactor the statistics of network in docker stats
Upstream-commit: 259a0fb16ceac921763172127183059dea7e3c46
Component: engine
2015-09-16 20:29:16 +02: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
ded3de600a Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 54240f8da9992880e20a1508e9a6f0e59f2adef1
Component: engine
2015-09-16 03:31:15 -07:00
fa3b248d8f Windows: Turn off TestBuildStopSignal
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6167c7bfb8431e5e83130fd44bd36d75da488b21
Component: engine
2015-09-15 11:56:54 -07:00
c71aa53e3d Refactor the statistics of network in docker stats
For now docker stats will sum the rxbytes, txbytes, etc. of all
the interfaces.

It is OK for the output of CLI `docker stats` but not good for
the API response, especially when the container is in sereval
subnets.

It's better to leave these origianl data to user.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: d3379946ec96fb6163cb8c4517d7d5a067045801
Component: engine
2015-09-15 15:40:34 +08:00
6e9e4c2cb7 Move dockerCmd… to pkg/integration…
… and add some tests on them.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7efa0f37b2a77a1e68cee5dc34aeb1c806de8900
Component: engine
2015-09-13 13:09:04 +02: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
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