Commit Graph

1936 Commits

Author SHA1 Message Date
4429613429 Merge pull request #16289 from cpuguy83/11957_fix_stdin_block_after_container_exit
Ensure stdin does not block after container stop
Upstream-commit: c0c941627a2a516ce540aac2d9e3d579baa3efde
Component: engine
2015-09-23 15:29:48 -07:00
90fabf5056 Skip TestAppArmorDeniesChmodProc
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 04e1015aa06785210dc6a3e4d4ad66700a8d51b0
Component: engine
2015-09-23 13:23:15 -07:00
64940b5f4a Skip TestRunUnshareProc
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 03dce24137c82caa04c215d983eac06a3edc084c
Component: engine
2015-09-23 13:23:08 -07:00
aee0028193 Merge pull request #16312 from Microsoft/10662-startwindowscli
Windows: First part of CI tests (docker run)
Upstream-commit: 04d76d898addae4451db28999a230a0399f08b30
Component: engine
2015-09-22 15:37:33 -04:00
fca7da0a8e Merge pull request #16235 from HuKeping/oom-event
Events for OOM needs to be shift to an earlier time
Upstream-commit: 114612305c798735e7022274cc9db382f30aa174
Component: engine
2015-09-22 11:50:30 -07:00
5a36e78a10 Windows: First part of CI tests (docker run)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8a5ab83df8c029723d92a8b3a602b0d799753807
Component: engine
2015-09-22 10:24:03 -07:00
f5dba44987 Merge pull request #15864 from dmcgowan/notary-offline
Support content trust offline
Upstream-commit: a7e23cab8d10003914e39f1c954278c7be6bd759
Component: engine
2015-09-21 21:11:36 -07:00
511d6df253 Merge pull request #16457 from Microsoft/10662-blockarg
Windows: Nice error on ARG (builder)
Upstream-commit: 5c73f14c62127d136cfeec21a7f0f1c84dbf1f2c
Component: engine
2015-09-21 19:43:48 -04:00
295c5cdefd Windows: Nice error on ARG (builder)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b69c13b1a643911a541c251b22b4a440197e5f7d
Component: engine
2015-09-21 14:54:15 -07:00
f1430df5ab Merge pull request #16404 from duglin/FixRenameError
Fix 'rename' error msg and error checking
Upstream-commit: 0c71c192395e259d76a51e08c7c3bd73eb6f16e7
Component: engine
2015-09-21 15:51:02 -04:00
1598efd7a1 Merge pull request #16413 from sunyuan3/TestRunSwapMoreThanMemoryLimit
Add the TestRunSwapMoreThanMemoryLimit case.
Upstream-commit: 732676fad53bec21b332d1430d102502c4c4e737
Component: engine
2015-09-21 15:43:20 -04:00
7a04c92cc8 Merge pull request #16437 from runcom/invalid-logger-address
daemon: logger: error out on daemon start if invalid logger address
Upstream-commit: d572bab4a09eb7d60961867d2d2f9896595a3271
Component: engine
2015-09-21 14:53:47 -04:00
a3f8f51f2a Merge pull request #15029 from azurezk/add-version-info
Add docker version info in /info request
Upstream-commit: 40edb5f97c3ba95e450c8280b29d0ef027b51cfb
Component: engine
2015-09-21 11:44:11 -07:00
6c9902c2db Add the TestRunSwapLessThanMemoryLimit case.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: ab39a4c98110d9a16afd73ce2992ab3d4532201a
Component: engine
2015-09-21 22:12:19 +08:00
8e71940329 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 7cf343d1064e3d8211597c67574ff4ddff316fa1
Component: engine
2015-09-21 21:15:32 +08:00
99072d662d Events for OOM needs to be shift to an earlier time
It's worth to warn user as soon as possilbe when OOM happend.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f05bacbe509823e2ca65583f35188ca09d01db80
Component: engine
2015-09-21 10:18:08 +08:00
82a956ef62 integration-cli: check err on tmp dir creation
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: b616b8a17a9f61881c83c2324399856e466a0805
Component: engine
2015-09-21 00:00:55 +02:00
72ffa04366 daemon: logger: error out on daemon start if invalid logger address
If an invalid logger address is provided on daemon start it will
silently fail. As syslog driver is doing, this check should be done on
daemon start and prevent it from starting even in other drivers.
This patch also adds integration tests for this behavior.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: e3c472426ff1dccf083e41dbbfdf5935921bf330
Component: engine
2015-09-20 16:20:25 +02:00
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
3a09d2b95a Fix 'rename' error msg and error checking
`docker rename foo ''` would result in:
```
usage: docker rename OLD_NAME NEW_NAME
```
which is the old engine's way of return errors - yes that's in the
daemon code.  So I fixed that error msg to just be normal.

While doing that I noticed that using an empty string for the
source container name failed but didn't print any error message at all.
This is because we would generate a URL like: ../containers//rename/..
which would cause a 301 redirect to ../containers/rename/..
however the CLI code doesn't actually deal with 301's - it just ignores
them and returns back to the CLI code/caller.

Rather than changing the CLI to deal with 3xx error codes, which would
probably be a good thing to do in a follow-on PR, for this immediate
issue I just added a cli-side check for empty strings for both old and
new names. This way we catch it even before we hit the daemon.

API callers will get a 404, assuming they follow the 301, for the
case of the src being empty, and the new error msg when the destination
is empty - so we should be good now.

Add tests for both cases too.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 848792c42e61070adc4107a39d6a044e2ed615f7
Component: engine
2015-09-18 11:12:22 -07:00
3194323cdb Ensure stdin does not block after container stop
Fixes #11957
Fixes #12319

Also removes check for Darwin when the stdin reader is closed as it
doesn't appear to block any more.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3dbfb3d38c4dcfb602e12ed2828d22d155897518
Component: engine
2015-09-18 13:48:07 -04: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
0dc44a70e4 Ignore ping errors in notary repository setup
Notary is capable of acting in offline mode, making use of cache TUF data.
When ping is not successful, notary should still be attempted without error.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 5e11cd43aa21a9d0eb1f5f205f05dc7b14ee4d43
Component: engine
2015-09-14 11:08:25 -07: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