Commit Graph

2301 Commits

Author SHA1 Message Date
dbaf00790d Merge pull request #31669 from tonistiigi/files-filter
Fix inefficient file paths filter
Upstream-commit: 2422d5ad35345e0ab24d3f22b96c1271f7c1e07d
Component: engine
2017-03-20 17:43:47 +01:00
600635fabb Add Johannes Kepler and Mary Jackson to name generator
Signed-off-by: cooltoast <mpatel678@gmail.com>
Upstream-commit: 234b2203e576fa40236d388f79b5ccefd3558147
Component: engine
2017-03-17 20:36:12 -07:00
cf2a5afb08 pkg/archive/diff.go: avoid redundant options init
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 5957dc489958384c6fc8c997590967922ab9aefa
Component: engine
2017-03-15 18:03:33 +02:00
5e15ee9c6f Fix default socket group regression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c7c2cd4e8e9c0fe03e8e9f343867c2fb5568ca1d
Component: engine
2017-03-14 16:09:08 -07:00
97318c100a Fix stringer in Result (pkg\testutil\cmd)
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: f577131d3bc49860f615c458e44fc035b3708415
Component: engine
2017-03-13 08:40:31 -07:00
ce7091af99 pkg/system: Set appropriate CFLAGS on Solaris
The cgo in `meminfo_solaris.go` initializes variables in for loops, and
therefore requires a `-std=c99` `CFLAG` in order to compile (at least on
modern SmartOS).

Signed-off-by: James Nugent <james@jen20.com>
Upstream-commit: 4683f588ce893f3156ecfa63bfd16ebda1d09157
Component: engine
2017-03-09 13:40:05 -05:00
aec1003d24 Fix inefficient file paths filter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: adeb3e36840c6d9d1912dd78f5300ae74d11c068
Component: engine
2017-03-08 18:59:25 -08:00
8d9c7cbbe3 Merge pull request #30733 from yongtang/02022017-formatter-header
Allow `--format` to use different delim in `table` format
Upstream-commit: 9369acc776be47eb4163ee97153aefa0a4e647a0
Component: engine
2017-03-03 11:25:19 -08:00
56417c3da5 Merge pull request #30729 from dmcgowan/update-go-connections
Update go-connections package
Upstream-commit: d8b0d2b9e9e3d4b2537a2ebbbb8f6187ea755286
Component: engine
2017-03-01 18:24:32 -08:00
b785b21a18 Improve coverage of pkg/ioutils/buffer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 392ece22398e7757d2bfdce57ef645ab5e92aa20
Component: engine
2017-02-28 14:11:15 +01:00
4dd2c604b6 Update copyright dates
Signed-off-by: phineas <phin@phineas.io>
Upstream-commit: da8cf590eb56343f70d545c298a59d28f90eaf0f
Component: engine
2017-02-24 19:41:59 +00:00
7cb213f3ce Merge pull request #30416 from stevenh/linux-mount-fixes
Fix linux mount calls not applying propagation type changes
Upstream-commit: d52350d6623aa01bb846fc17ddbc209feafe1c14
Component: engine
2017-02-15 14:10:54 -08:00
e7f7c8cfe0 Fix linux mount calls not applying propagation type changes
Propagation type changes must be done as a separate call, in the
same way as read only bind mounts.

To fix this:
1. Ensure propagation type change flags aren't included in other calls.
2. Apply propagation type change in a separate call.

Also:
* Make it clear which parameters are ignored by passing them as empty.
* Add tests to ensure Mount options are applied correctly.

Fixes #30415

Signed-off-by: Steven Hartland <steven.hartland@multiplay.co.uk>
Upstream-commit: b3b14b97b1087bfbce6a4de7039e17847fe491a2
Component: engine
2017-02-15 14:15:09 +00:00
f9c823322f fix docker logs error handling
Previously, `docker logs` (and by extension, `docker service logs`) had
an error in the way they returned errors that occurred after a stream
had already been started. Specifically, the errors were added verbatim
to the HTTP response, which caused StdCopy to fail with an esoteric
error. This change updates StdCopy to accept errors from the source
stream and then return those errors when copying to the destination
stream.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: f19b0d72d1234c2bf4d85f7c1a4916b7b85b97b0
Component: engine
2017-02-14 14:38:42 -08:00
b2b138d38f Ignore some functions in the Go template when header is rendered
This fix ignore some functions in the Go template when header is
redendered, so that `--format "{{truncate .ID 1}}"` will still
be able to redener the header correctly.

Additional test cases have been added to the unit test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8b165cad1aa8ce00ecc293ac0be82dd01392e548
Component: engine
2017-02-10 19:34:50 -08:00
acf51a7fb9 Do group lookup in listeners package
This used to be handled by go-connections, but now it only takes a group
ID (int).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bdf4cad1d1af6c6493440074d4007dcca7e7b8ae
Component: engine
2017-02-09 16:38:52 -05:00
3f7b7dd1ae Convert socket group to int
Sockets interface has been updated to take in a the group
id as an integer rather than a string.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e5d77c64a2030fe4c5c1413b69b45f40a2347358
Component: engine
2017-02-09 16:10:38 -05:00
e1911d98d5 Bump go-units
To include  https://github.com/docker/go-units/pull/23
Fixes a unit test that fails because of it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cb89d658dc6dca5f0efa21cac168ae82fea821d1
Component: engine
2017-02-07 21:58:56 +01:00
4b01aa3662 Merge pull request #30430 from Thynix/30374-remove-kickass
Replace "kickass" in name generator with "vigorous"
Upstream-commit: f907205f5d57c3576265b9cfab839b6eb3cbe3f0
Component: engine
2017-02-01 10:33:07 -05:00
930514543b Replace "kickass" in name generator with "vigorous"
Having curse words in container names can get awkward.

Closes #30374.

Signed-off-by: Steve Dougherty <steve@asksteved.com>
Upstream-commit: 2b30a79d9e33806242de68ff3f1e2d02ec0ed4ed
Component: engine
2017-01-31 21:33:23 -05:00
181d0eab7a Add truncate function for Go templates
This fix is part of the discussion in 28199 about using
`truncate` to replace `--no-trunc`.

As part of the fix, a new function `truncate` has been
added for Go templates so that it is possible to use
```
docker stack services --format "{{truncate .ID 5}}: {{.Mode}} {{.Replicas}}"
```
to show truncated ID.

A unit test has been added.

This fix is related to 28199.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7fa8d5e064bad6d65348a69b623ebb2ecffdf248
Component: engine
2017-01-30 13:33:16 -08:00
c2b8506e34 Merge pull request #27713 from resouer/return-err
return when error happens on listener close
Upstream-commit: 40c51569e2a557e6656ea4314c824fb1eabb2c4e
Component: engine
2017-01-27 12:29:08 -08:00
1257e4f01b Merge pull request #30006 from mueller-ma/add-names-to-generator
Add names to namesgenerator
Upstream-commit: 023f7f51007705783beeb0d64f49f7cf27996a58
Component: engine
2017-01-27 11:19:19 -08:00
a8d9877163 Merge pull request #28304 from ijc25/jsonmessage-use-terminfo
use terminfo in pkg/jsonmessage
Upstream-commit: 2c948ac3e6b3b1440c5583cfa9d2c581e96280eb
Component: engine
2017-01-27 09:29:18 -08:00
3920d4e123 Merge pull request #30227 from thaJeztah/fix-ineffectual-assignments
fix some ineffectual assignments (and minor fixes)
Upstream-commit: 9b2dabbf1845d6730cf9d9b12c63fb4e94e0f886
Component: engine
2017-01-25 02:49:57 +01:00
4defdd0e1e Fix deadlock on v1 plugin with activate error
When a plugin has an activation error, it was not being checked in the
`waitActive` loop. This means it will just wait forever for a manifest
to be populated even though it may never come.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f2d384fca6fa08da13fdc01c7991e8e35b081198
Component: engine
2017-01-24 11:08:13 -05:00
406aff91c7 fix some ineffectual assignments
to make goreportcard a bit happier
https://goreportcard.com/report/github.com/docker/docker

also found that `TestCpToErrDstParentNotExists()` was
partially broken, because a `runDockerCp()` was inadvertently
removed in f26a31e80cfcc77daba0872ddb14bf03f4398311

`TestDaemonRestartSaveContainerExitCode()` didn't verify
the actual _Error_ message, so added that to the test,
and updated the test to take into account that the
"experimental" CI enables `--init` on containers.

`TestVolumeCLICreateOptionConflict()` only checked
for an error to occur, but didn't validate if the
error was due to conflicting options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ba0afd70e89562aa3c668c87fb9191ed9edb7260
Component: engine
2017-01-24 11:16:19 +01:00
471ffa89e7 Merge pull request #30139 from Microsoft/jjh/sequential
Windows: Use sequential file access
Upstream-commit: 062f2a3eae418c07a9a18661492a1c8beaaed60a
Component: engine
2017-01-23 12:46:06 -08:00
f61d5bb251 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c98e77c77c5b43bf50e8ae5296b02ce0b47ea188
Component: engine
2017-01-23 10:25:36 -08:00
d24367c4ff Merge pull request #30165 from xulike666/fix-typo-6/36
[combined] fix typo 
Upstream-commit: de0328560b818e86fd3eadc973f90341e5c33498
Component: engine
2017-01-19 17:21:22 +01:00
2db1bd6f28 fix typo
fix typo I found AMAP in integration-cli/*

fix typo mentioned by Allencloud

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 40af5691648c5b9d07b1231e3ed3be29fd66521a
Component: engine
2017-01-19 15:52:28 +08:00
ae5b65a856 Merge pull request #30208 from justincormack/no-sqlite
Remove sqlite dependency
Upstream-commit: 0e8c7d72771847227df295471ac73180cbb3caa9
Component: engine
2017-01-18 13:15:38 -05:00
140c56ac38 Merge pull request #28925 from daehyeok/ineffassign
Refactoring ineffectual assignments
Upstream-commit: 5eda0c59477a7364878351c3d311cd3a4c6dd28d
Component: engine
2017-01-18 15:01:57 +01:00
9bc1ef59e1 Merge pull request #30230 from stupendous-man/fix-typos
Fixed a typo within pkg/authorization/api.go
Upstream-commit: 30ca9e3b0cfedddfe259c2d84a658b1eedc2cce1
Component: engine
2017-01-18 14:23:03 +09:00
b1d58a6a62 Fixed a typo within pkg/authorization/api.go
Signed-off-by: Diego Romero <idiegoromero@gmail.com>
Upstream-commit: 48b8f54876ff3269db46443eb91adeab2ea8b74b
Component: engine
2017-01-17 21:51:16 -05:00
905b5b1fe9 Fix escaped go vet error
Find one escaped go vet error:

```
$ cd pkg/httputils/
$ go vet .
httputils_test.go:28: arg response for printf verb %q of wrong type:
*net/http.Response
```

You can also find it with

```
$ go vet github.com/docker/docker/pkg/httputils/
```

or

```
$ go vet ./...
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3551893f46316388add55ab7421e9614d85dc52e
Component: engine
2017-01-18 00:13:09 +08:00
051c1a4e96 daemon: remove graphdb usage
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: b0f9958d932b52b94014eaf4148e6d103573cbfe
Component: engine
2017-01-17 13:52:48 +00:00
78fba4fced Added four names to namesgenerator
Signed-off-by: Ma Müller <mueller-ma@users.noreply.github.com>
Upstream-commit: b05c70d29737eb96cf44bfbcbc68d932d01c9924
Component: engine
2017-01-14 22:31:32 +01:00
964854de91 Fix pluginv1 Windows volumes
c54b717 caused a regression for pluginv1 on Windows, where extraneous
backslashes were added to BasePath of the plugin. For pluginv1 on windows,
BasePath() should return an empty string, since the plugin is fully aware
of the mount path. Also, unlike Linux where all paths are relative to "/",
Windows paths are dependent on system drives and mapped drives.

Fixes #30148

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 0ef21eb0e30d2ea036730a7c5502f888c6b763d1
Component: engine
2017-01-13 17:01:48 -08:00
287ee51be3 Refactoring ineffectual assignments
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 6306019d0bad9c4e60ee437e93f2450dfb0b68c0
Component: engine
2017-01-13 00:27:01 -07:00
95646d90c7 Merge pull request #29206 from ripcurld0/doc_api_update
Specify content type in the build request
Upstream-commit: 24e9ac15759cc23caf90383b5ea6de79af4363a0
Component: engine
2017-01-11 08:41:39 +01:00
6a39de5e4f Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
[test-integration] clean some runCommandWithOutput
Upstream-commit: e5058ff15cac51836f426175df8a7840a670f046
Component: engine
2017-01-10 15:56:42 +01:00
b3e47ec408 Merge pull request #29564 from aaronlehmann/getter-types
plugingetter: Avoid all caps for constant declarations
Upstream-commit: 9c96768eae4b3a65147b47a55c850c103ab8972d
Component: engine
2017-01-10 09:35:19 +01:00
8f27f74ad0 Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: b1996728aaeaa147c2045c8be79373d59ce7117a
Component: engine
2017-01-10 06:40:06 +02:00
ddcbfb5519 Merge pull request #29143 from vdemeester/node-cli-unit-tests
Add some unit tests to the node and swarm cli code
Upstream-commit: 38f766ae0e4b80d452a3825c42a7ac9fee965790
Component: engine
2017-01-09 20:52:23 +01:00
4184bed437 Merge pull request #29953 from williammartin/truncindex-iterate-lock
Fix non thread-safe Iteration around go-patricia
Upstream-commit: fe9f5610c49b1a6ca2ebbb68c1478fc7f106eaa8
Component: engine
2017-01-09 20:23:35 +01:00
f6ad06ceb6 Add some unit tests to the node and swarm cli code
Start work on adding unit tests to our cli code in order to have to
write less costly integration test.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f151c297eb268e22dc1eb36ded0e356885f40739
Component: engine
2017-01-09 18:30:15 +01:00
782c3f08db Fix non thread-safe Iteration around go-patricia
* Unlike other methods in truncindex, Iterate was not locking before
using the Trie, making it potentially race e.g. Delete could result in
setting a child to nil, while Iterate dereferenced that node
while walking the Trie.

Signed-off-by: Petar Petrov <pppepito86@gmail.com>
Upstream-commit: 57dada53382106952d287dd1f16773e08213ae8d
Component: engine
2017-01-09 17:06:50 +00:00
78d1ff88be Update trustedCmd to be compatible with testutil/cmd
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 303b1d200af65ebb165602d0137f8b24b7c54d66
Component: engine
2017-01-09 11:07:05 +01:00
bd5280d393 Fix race accessing plugin storage map
`plugins.GetAll()` was not locking the plugin map when checking if a
plugin exists, this can cause a race and potentially a panic if another
goroutine is trying to load a plugin into the map at the same time.

Also fixes a race during activation where a plugin inserts itself into
the plugin map but does not check if something else is already there.
This is already checked before trying to activate the plugin, however
the map lock is not held for this entire period, so other plugins may be
loaded during this time.
To fix, before inserting the plugin into the map, check if one with the
same name already exists and use that instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 21fcbb39b73310e69d6403a1cfa8b26799cc1355
Component: engine
2017-01-05 22:40:45 -05:00