Commit graph

2593 commits

Author SHA1 Message Date
Anusha Ragunathan
d1dfc1a5ef Merge pull request #29599 from anusha-ragunathan/refcount
Enforce zero plugin refcount during disable, not remove.
2016-12-22 15:38:54 -08:00
Anusha Ragunathan
8cb2229cd1 Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-12-22 13:26:53 -08:00
Sebastiaan van Stijn
b9ee31ae02 Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
2016-12-22 15:21:05 +01:00
Vincent Demeester
dba271a42a
Move names to package api
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-21 22:42:47 +01:00
Brian Goff
b2e348f2a6 Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
2016-12-21 13:15:00 -05:00
Jie Luo
ea2dd4b5d0 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
2016-12-21 20:16:19 +08:00
allencloud
7c3657065c change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
allencloud
29d4a7f512 update response status code for cluster request
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-19 10:21:10 +08:00
Sebastiaan van Stijn
2121041944 Merge pull request #29423 from unclejack/api_cli_integ_return
return directly without ifs in remaining packages
2016-12-17 21:30:47 +01:00
Daniel Nephin
7685e80fc9 Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 11:51:13 -05:00
Akihiro Suda
edfbc3b876 api: allow creating a network of which name is the prefix of the ID of a swarm network
Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-15 15:09:06 +00:00
unclejack
2c187a24e0 return directly without ifs in remaining packages
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-14 23:28:27 +02:00
Vincent Demeester
1474a451b1 Merge pull request #29401 from bfirsh/add-swagger-display-name
Add display name for tags in swagger.yaml
2016-12-14 15:28:22 +01:00
Ben Firshman
27ca33e965
Add make command for previewing API docs
Much easier than the previous method of copying over to the docs
repository and generating the docs.

And, as @cpuguy83 pointed out, that actually didn't work
because the PR that adds Swagger docs isn't merged yet. Oopsy.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-12-14 12:27:32 +00:00
Ben Firshman
0caa6c218c
Add display name for tags in swagger.yaml
In #29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( https://github.com/Rebilly/ReDoc/pull/152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-12-14 12:00:04 +00:00
Vincent Demeester
1bc942597d Merge pull request #29216 from allencloud/add-status-code-403-for-services-create
add missing status code 403 for services/create in docs
2016-12-13 12:27:56 +01:00
Anusha Ragunathan
0a072e93df Merge pull request #26398 from tiborvass/plugin-fixes
plugins: container-rootfs-relative paths
2016-12-09 12:48:59 -08:00
Tibor Vass
c54b717caf plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-12-09 10:16:24 -08:00
allencloud
19654fd71e add missing status code 403 for services/create in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-10 01:54:51 +08:00
Akihiro Suda
d1515a5264 Merge pull request #29244 from yuexiao-wang/fix-typos-eg
Fix a bit typos
2016-12-09 16:03:35 +09:00
yuexiao-wang
11454e1c97 Fix a bit typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-09 03:05:11 +08:00
Sebastiaan van Stijn
e94a40cdda Merge pull request #29041 from aaronlehmann/hide-updatestatus
api: Hide UpdateStatus when it is not present
2016-12-08 13:55:13 +01:00
Tõnis Tiigi
dca76ed50a Merge pull request #29104 from duglin/Issue29084
Fix processing of unset build-args during build
2016-12-07 17:18:55 -08:00
Tõnis Tiigi
a039ca9aff Merge pull request #29139 from ehazlett/fix-api-cors-exec
Add headers when using exec
2016-12-07 17:10:31 -08:00
Tõnis Tiigi
51b422ce6a Merge pull request #29213 from yongtang/12072016-typo-swagger-yaml
Fix a couple of incorrect version strings in swagger.yaml
2016-12-07 16:47:49 -08:00
Vincent Demeester
9468d687ac Merge pull request #29062 from erxian/refine-api-swagger.yaml-towards-image-create-status-code
refine api swagger.yaml towards image create status code
2016-12-07 22:03:54 +01:00
Yong Tang
887c4188f4 Fix a couple of incorrect version string in swagger.yaml
This fix fixes a couple of incorrect version strings in swagger.yaml
`v1.25` should be `v1.26`. This applies to 1.14 version only.

Also checked 1.13rc and it is fine.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-07 08:11:12 -08:00
Doug Davis
cdb8ea90b0 Fix processing of unset build-args during build
This reverts 26103.  26103 was trying to make it so that if someone did:
  docker build --build-arg FOO .
and FOO wasn't set as an env var then it would pick-up FOO from the
Dockerfile's ARG cmd.  However, it went too far and removed the ability
to specify a build arg w/o any value. Meaning it required the --build-arg
param to always be in the form "name=value", and not just "name".

This PR does the right fix - it allows just "name" and it'll grab the value
from the env vars if set. If "name" isn't set in the env then it still needs
to send "name" to the server so that a warning can be printed about an
unused --build-arg. And this is why buildArgs in the options is now a
*string instead of just a string - 'nil' == mentioned but no value.

Closes #29084

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-12-07 07:41:55 -08:00
erxian
15be050fb3 refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-12-07 10:27:40 +08:00
Evan Hazlett
f86db80b5f add headers when using exec
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

ensure headers are properly sanitized

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-12-06 14:27:34 -05:00
Sebastiaan van Stijn
f687eb576f Merge pull request #29166 from allencloud/add-403-for-network-create-endpoint
add 403 for endpoint network create
2016-12-06 11:47:28 +01:00
Vincent Demeester
745795ef2e Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
2016-12-06 11:03:45 +01:00
allencloud
0d21e24b9f add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-06 14:36:50 +08:00
Brian Goff
1f09d68a6e Merge pull request #29123 from vdemeester/29116-compose-to-swarm-logging
Handle logging in compose to swarm
2016-12-05 20:39:08 -05:00
Tibor Vass
1c96879f1e Merge pull request #28963 from vieux/refactor_plugin_install
refactor plugin install
2016-12-05 12:00:29 -08:00
unclejack
c1ce63b17b api/types/container,client: gofmt
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-05 17:00:36 +02:00
Vincent Demeester
806cc1e0f8
Handle logging in compose to swarm
Logging configuration was completely ignore when deploy a compose file
to swarm. This fixes it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-05 15:18:36 +01:00
Yong Tang
a6be56b54e Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 20:08:49 -08:00
Brian Goff
3cb310c210 Merge pull request #28988 from vdemeester/28985-dont-validate-hostname
Remove hostname validation as it seems to break users
2016-12-02 21:16:56 -05:00
Sebastiaan van Stijn
535db46be5 Merge pull request #28349 from allencloud/add-missing-code-in-api-docs
add missing status code of swarm cluster in api 1.24
2016-12-03 02:04:05 +01:00
Victor Vieux
30db51c169 update docs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 15:24:11 -08:00
Victor Vieux
fa3b61a28f refactor plugin install
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 15:23:08 -08:00
Ben Firshman
30a9249e15
Use singular tag names in swagger.yaml
This is required to make the type generation put things in the
correct directory, but unfortunately makes the names in the
documentation menu look a bit crap.

I think the best solution would be to add a `x-display-name`
extension to tags to determine how the tags show up in the menu,
rather than it depend on the name of the tag. I shall do this in
a follow-up PR - for now, let's fix the breakage.

Fixes #29045

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-12-02 14:14:36 +00:00
allencloud
9a1f7b6b0b add missing status code in api docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-02 11:24:45 +08:00
Aaron Lehmann
0e70d96a68 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>
2016-12-01 15:08:41 -08:00
Sebastiaan van Stijn
457d562af1 Merge pull request #28917 from erxian/correct-secret-remove-http-return-code
correct the http return code of secret remove
2016-11-30 22:47:28 +01:00
Vincent Demeester
ef39256dfb
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>
2016-11-30 19:22:07 +01:00
Sebastiaan van Stijn
643b1c0175 Merge pull request #28840 from bfirsh/2016-11-25-api-docs
Updates to swagger.yaml and API documentation
2016-11-30 15:49:25 +01:00
erxian
21768933fb correct the http return code of secret remove
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-11-30 19:45:45 +08:00
Dong Chen
abcb699ad1 Fix network attachable option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-11-28 16:54:56 -08:00