Commit Graph

31631 Commits

Author SHA1 Message Date
9e849b264c Fix restartpolicy max-retry validation
the restart policy validation was moved from
the client to the daemon in 94e95e4711643640701bd614902e75a2d01f12c5

As part of that change, retry-counts < 1
were marked as "invalid".

However, the default is 0 (unlimited), causing

    docker run -d --restart=on-failure nginx

To fail.

This changes the validation to only invalidate
retry-counts < 0.

A test was added, and other tests renamed
to allow running just these tests :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9db5d649aea1c3d4728d0159bb5175a49f77748e
Component: engine
2016-12-02 02:39:16 +01:00
61372ea9bb pin go-swagger 0.7.4
This pins the version of go-swagger used, because
the results generated by different versions
can differ quite a bit (tested between 0.7.2 - 0.7.4),
and can cause CI / validation to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ba20c3e65e33ac6b29294a0eb43d713aa319ef7a
Component: engine
2016-12-02 01:36:46 +01:00
a68666e468 api: Hide UpdateStatus when it is not present
When UpdateStatus was not present, the empty values of the timestamps
would be present:

        "UpdateStatus": {
            "StartedAt": "0001-01-01T00:00:00Z",
            "CompletedAt": "0001-01-01T00:00:00Z"
        }

To fix this, make the timestamps pointers, so they can be set to nil
when they should not be shown.

Also make UpdateStatus itself a pointer, so an empty object does not
show up when there is no UpdateStatus.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0e70d96a6813704498a3ce9cc2786648c84daa3a
Component: engine
2016-12-01 15:08:41 -08:00
abe19725d9 Merge pull request #28996 from Microsoft/jjh/sqlite-remove-windows
Windows: Factor out sqlite
Upstream-commit: a756c1ac659468bb8d6ec9ee2e1182fc6cae4002
Component: engine
2016-12-01 13:56:11 -08:00
926963d7d4 Improve error reporting in mkimage/debootstrap
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Upstream-commit: ee75c3fca2581a47381f11ba495ecfb7313f9c33
Component: engine
2016-12-01 21:27:10 +01:00
de12023423 Merge pull request #28997 from cyli/fix-flakey-test
Update the `TestSwarmLockUnlockCluster` test to be less flakey.
Upstream-commit: 0020398c74e8a08dc6b37a946e025324a3c823be
Component: engine
2016-12-01 11:32:30 -08:00
2ac57c6dcf Allow docker plugin inspect to search based on ID or name
This fix tries to address the issue raised in discussion of
PR 28735 where it was not possible to manage plugin based on
plugin ID. Previously it was not possible to invoke
`docker plugin inspect` with a plugin ID (or ID prefix).

This fix updates the implementation of `docker plugin inspect`
so that it is possbile to search based on a plugin name, or a
plugin ID. A short format of plugin ID (prefix) is also possible,
as long as there is no ambiguity.

Previously the check of `docker plugin inspect` was mostly done
on the client side. This could potentially cause inconsistency
between API and CMD. This fix move all the checks to daemon side
so that API and CMD will be consistent.

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0ce6e070f7d1e4b1b478d52b4464f8480dbfd9b7
Component: engine
2016-12-01 10:44:17 -08:00
2e1e2b9b86 Add registry-specific credential helper support
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: 07c4b4124b46be30ea3ac7d114c44c4f911ca182
Component: engine
2016-12-01 10:29:00 -08:00
c3ca8eccc1 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3f6127b173949cb36557601a56bc15ae2c45a698
Component: engine
2016-12-01 09:38:08 -08:00
47bb456221 Merge pull request #29015 from coolljt0725/fix_restore_panic
Fix docker restart panic on machine ungracefully shutdown
Upstream-commit: 0a5cb187b4df6af2d121bd5a6a42c4309b6c709b
Component: engine
2016-12-01 08:38:02 -08:00
5bd827a0d2 Merge pull request #29026 from yuexiao-wang/fix-client-test
Optimize the log info for client test
Upstream-commit: 3879ded936ed8b0b68178ab7f80014b95721cfe5
Component: engine
2016-12-01 16:30:07 +01:00
00f205d0f0 Optimize the log info for client test
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 40b8ff62431d2005e5801b88dbe1685e89baafe5
Component: engine
2016-12-02 03:32:04 +08:00
a9b72b92ed Merge pull request #29027 from runcom/fix-jq
contrib: download-frozen-image-v2.sh requires jq
Upstream-commit: a227ea62e6f4bc316e0ee14188fc54a3e517c3bc
Component: engine
2016-12-01 06:26:59 -08:00
f1b91b00bc Merge pull request #29028 from yuexiao-wang/fix-func-name
Fix the inconsistent function name for client
Upstream-commit: 006e23c63af5b33ca242b942b6c1367c2fa34765
Component: engine
2016-12-01 06:26:28 -08:00
76b998fd2d Fix the inconsistent function name for client
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 16233eb055ef03c760f76c276b4491ee3246c0b4
Component: engine
2016-12-02 04:18:02 +08:00
0021707a39 contrib: download-frozen-image-v2.sh requires jq
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 887bc48319a650174e3820c677e337969e2d3aca
Component: engine
2016-12-01 12:40:58 +01:00
978ceda065 Merge pull request #29025 from lixiaobing10051267/masterManUrl2
rectify several wrong URLs in branch of man
Upstream-commit: c34efaeca0806e6fd92cc951b85420f0f300b74e
Component: engine
2016-12-01 12:33:35 +01:00
ca7deba474 rectify several wrong URLs in branch of man
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 576780369fa8c0b117dec6614db1b8d89cf2721b
Component: engine
2016-12-01 19:35:27 +08:00
a7205d3e8b Merge pull request #29019 from lixiaobing10051267/masterRunCOnfig
check testing code for runconfig and volume
Upstream-commit: 31d4d9e996904782f1ffc5444f1c666c31e18c4e
Component: engine
2016-12-01 03:00:43 -08:00
77750af0f0 Merge pull request #28922 from yuexiao-wang/fix-secret
Fix the inconsistency for secret ls and secrect rm
Upstream-commit: a3be176f139e8fd54b985c5876eb677250890805
Component: engine
2016-12-01 11:29:58 +01:00
b714f8cc17 Merge pull request #29009 from yuexiao-wang/fix-secret-create
Fix the usage for secret create
Upstream-commit: 782f0ed73d3c6f2f625f7904c0ce1c61847a75bf
Component: engine
2016-12-01 11:29:45 +01:00
54c33a1c13 Fix the use for secret create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5cef55ba9178604c67d99774526cf055c7d0aafe
Component: engine
2016-12-01 19:48:33 +08:00
35ebad64e3 check testing code for runconfig and volume
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: b3e5137856ffd07e179d977eec74ee0566f1bb26
Component: engine
2016-12-01 17:07:38 +08:00
dc6f3f84fc Fix docker restart panic on machine ungracefully shutdown
Machine ungracefully shutdown leaves a lot of container has a
Running=true state.

```
$ cat config.v2.json | jq .

    "Running": true,
    "Paused": false,
    "Restarting": false,

```

And the next docker start will fail with panic.

```

time="2016-12-01T01:54:45.086446715-05:00" level=warning msg="libcontainerd: client is out of sync, restore was called on a fully synced container (49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a)."
time="2016-12-01T01:54:45.087046004-05:00" level=warning msg="libcontainerd: failed to retrieve container 49f41ad5ca0be860622d9190673b5816d012022fb2c1794560ec4851e7cfec6a state: rpc error: code = 2 desc = containerd: container not found"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5db7f3]

goroutine 57 [running]:
panic(0x16a8e60, 0xc420010130)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/docker/docker/libcontainerd.(*client).Restore(0xc4202e1a40, 0xc420415000, 0x40, 0xc42015a0b0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/docker/docker/libcontainerd/client_linux.go:457 +0x553
github.com/docker/docker/daemon.(*Daemon).restore.func1(0xc4201c46f0, 0xc4202581e0, 0xc4201c46e8, 0xc42047bfb0, 0xc42047bf80, 0xc42047bf50, 0xc42024ba10, 0xc420512c00)
        /go/src/github.com/docker/docker/daemon/daemon.go:205 +0x198
created by github.com/docker/docker/daemon.(*Daemon).restore
        /go/src/github.com/docker/docker/daemon/daemon.go:260 +0x7bb

```

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 267422e4d08244e701ce049ab55ca0ad9879ba78
Component: engine
2016-12-01 02:25:24 -05:00
bcb5d5d669 Switch cluster locking strategy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b7ea1bdb0227a789a15e23821b8db4d5ddceb26e
Component: engine
2016-11-30 14:59:12 -08:00
c2f7699391 Merge pull request #28917 from erxian/correct-secret-remove-http-return-code
correct the http return code of secret remove
Upstream-commit: 457d562af128a765b48389681399903ca0e679cf
Component: engine
2016-11-30 22:47:28 +01:00
c7b13ddf55 Merge pull request #28944 from albers/completion-inspect-more-types
Add more types to bash completion of `docker inspect`
Upstream-commit: 849f659fd90c27b61b72ef9b0eba45edfe6bf85e
Component: engine
2016-11-30 22:28:13 +01:00
bb58024492 Merge pull request #28797 from miaoyq/fix-a-err-of-logger
Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
Upstream-commit: 6151ad19ad2a5cd2ec2c3afc08ed07f64623ae36
Component: engine
2016-11-30 13:27:40 -08:00
5ed6825cff Merge pull request #28782 from mlaventure/fix-race-in-restore
Fix race with containerd events stream on restore
Upstream-commit: e0681ad0fed93876382dad3877bae0171bd43829
Component: engine
2016-11-30 13:26:27 -08:00
4d98d91ec5 zfs: expose mountpoint/dataset on inspection
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
Upstream-commit: 4addda3f07e7ec4a898c8555857a227fbbbb33f5
Component: engine
2016-11-30 23:20:42 +02:00
afd7b14845 Update the swarm cluster lock/unlock tests to be less flakey.
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 6a5b8a640a81aa27acda64221f95f02032a43ce5
Component: engine
2016-11-30 13:00:36 -08:00
6b021be636 Merge pull request #28980 from lixiaobing10051267/masterReference
checkt t.Fatalf information for reference path
Upstream-commit: 9d4792798409cb8a1ba00b10296b97da6f7262b8
Component: engine
2016-11-30 21:49:26 +01:00
6c399e963a Merge pull request #28978 from lixiaobing10051267/masterMan
modify some urls related to reference path
Upstream-commit: 4b3740d0094868bd24f81b7be4cab19bad5d93c2
Component: engine
2016-11-30 12:04:00 -08:00
cefbd9b7e9 Merge pull request #28885 from vdemeester/revert-service-ps-all
Revert "Add -a option to service/node ps"
Upstream-commit: 53d69aeb74962709464e0888f4a5c755be2c8e4d
Component: engine
2016-11-30 12:02:34 -08:00
a66f1eed5f Merge pull request #28838 from AkihiroSuda/remove-run-mount
[Revert #26825] cli: remove `--mount` from `docker run`
Upstream-commit: caaa52c124539acb396c0b711ab95bc7ed459540
Component: engine
2016-11-30 11:56:42 -08:00
ff300e8ad3 Merge pull request #28864 from sdurrheimer/zsh-completion-stack
Add zsh completion for 'docker stack' subcommand
Upstream-commit: 466dd8585d468ec9842526ddd5348b4b83127596
Component: engine
2016-11-30 11:56:03 -08:00
c3350bbdd4 Merge pull request #28746 from albers/completion-stack
Add bash completion for `docker stack`
Upstream-commit: d9bd5aa1864e97b04f0f1723a275af87f4bcd19c
Component: engine
2016-11-30 11:53:46 -08:00
ed1107ee39 Merge pull request #28784 from thaJeztah/add-some-adjectives
Add some adjectives to the namesgenerator
Upstream-commit: 0bf4510a53f09bc55942e5d894f8a1b78b6ac055
Component: engine
2016-11-30 11:46:56 -08:00
746036e7d7 Merge pull request #28975 from mavenugo/ln113
Vendoring libnetwork to address some concurrency issues
Upstream-commit: 33b75969023d95592e82db1c2b3f457b627a3694
Component: engine
2016-11-30 11:40:12 -08:00
bbaccfa1ea Merge pull request #28926 from coolljt0725/fix_save
Fix docker save with empty timestamp of layer created time
Upstream-commit: dd20fa60b4cda5132fea68c585a5b4bf0fbc8d51
Component: engine
2016-11-30 11:23:19 -08:00
ba962e129a Merge pull request #28487 from cpuguy83/stack_dumps
Move stack dump dir to exec root
Upstream-commit: 6367c67ab71916d677d3498f0bb536da9ae63597
Component: engine
2016-11-30 20:01:29 +01:00
c46ac53d0a Remove hostname validation as it seems to break users
Validation is still done by swarmkit on the service side.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ef39256dfb711f8382a5c021b85d6c7d613282b0
Component: engine
2016-11-30 19:22:07 +01:00
1dd32f1888 Merge pull request #28965 from cpuguy83/move_plugin_shutdown
Move plugin shutdown after layerstore shtudown
Upstream-commit: 9c2f1669a0b556115f543a0f02bf1ea5576b7f71
Component: engine
2016-11-30 10:15:49 -08:00
eb1bfafb6a Fix race with containerd events stream on restore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 9fff9bb761b3ceb1ef09ab2d6dbdbaa4463a063c
Component: engine
2016-11-30 10:15:39 -08:00
3077005306 Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ff42a2eb41a86217a440a1c4b2afd3c4cd1d48ac
Component: engine
2016-11-30 10:11:42 -08:00
f823abf46f Vendoring libnetwork to address some concurrency issues
Addresses #28697, #28845, #28712, #26111

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 8f082e418ba662eb700a3a9343371fa6d9c28d5a
Component: engine
2016-11-30 09:31:19 -08:00
45d64c96a6 Fix out-of-band vol delete+create for same driver
Fix issue where out-of-band deletions and then a `docker volume create`
on the same driver caused volume to not be re-created in the driver but
return as created since it was stored in the cache.

Previous fix only worked if the driver names did not match.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d8ce4a6e108f4f870228912f105eed8218e087e4
Component: engine
2016-11-30 12:19:03 -05:00
2b617fb9ed Merge pull request #28966 from aaronlehmann/push-panic
distribution: Fix panic on push
Upstream-commit: 523ad6ac716e53960a3185c744e5fd7ad30f20d5
Component: engine
2016-11-30 07:26:58 -08:00
0a639f6e9e Merge pull request #28840 from bfirsh/2016-11-25-api-docs
Updates to swagger.yaml and API documentation
Upstream-commit: 643b1c0175206291d8850a87608912d906009a71
Component: engine
2016-11-30 15:49:25 +01:00
443598f3ee Merge pull request #28972 from Microsoft/jjh/commentcorrection
Fix incorrect comment
Upstream-commit: 3676bad0411fafa823165d4510b8091198528288
Component: engine
2016-11-30 08:34:15 -05:00