validate service parameter in client side to avoid api call in `docker service scale`
Upstream-commit: 4fabc92cfc0670851851ebfb0f12d037059e6be1
Component: engine
`m.Set("type=volume,target=/foo,volume-nocopy")` is valid even though it lacks "source"
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 4e01e7924da92c94faf675cbf35b01985c3cd999
Component: engine
This fix tries to address the issue raised in 24958 where previously
`docker swarm init` will automatically fill in all the default value
(instead of letting swarmkit to handle the default).
This fix update the `swarm init` so that initial value are passed only
when a flag change has been detected.
This fix fixes 24958.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: eb19c2f080f624d8b0186f8037cdc1f7d8ada402
Component: engine
This fix tries to address the issue related to 24108 and 24790, and
also the case from 24620#issuecomment-233715656
The reason for the failure case in the above mentioned issues is that
currently Task names are actually indexed by Service Name
(`e.ServiceAnnotations.Name`)
To fix it, a pull request in swarmkit (swarmkit/pull/1193) has been
opened separately.
This fix adds the integration tests for the above mentioned issues.
Swarmkit revendoring is needed to completely fix the issues.
This fix fixes 24108.
This fix fixes 24790.
This fix is related to 24620.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f676fc93c3791f72938a6be9c7517ac620c02d1c
Component: engine
Currently, if the service mode is not "global", this code assumes that
Replicated is non-nil. This assumption may not be true in the future.
Instead of making the assumption, explicitly check that Replicated is
non-nil before using it.
Similarly, for limits and reservations, enclose methods that read from
Limits and Reservations within checks that those fields are non-nil.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 02cc464e1ab0a8fcebfd10db95bcde654d901391
Component: engine
Based on work by KJ Tsanaktsidis
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
Upstream-commit: 690882c2e79c3f3742c709cf158584e61594ba00
Component: engine
Allows the user to use `pretty` as the format string.
This enables users to put custom format options into their CLI config
just like is supported for `docker ps` and `docker images`
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 54ba82beab8ef8b71f5a6a2f7082ed7759b40df3
Component: engine
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a7c8bcac2ba60d6dd25a1157085d9245bed556ce
Component: engine
And move it back to the top-level command.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dda198761b9638ff1a0f5a4522751267d2faca8a
Component: engine
Hide some top level commands
Add docker container and image inspect commands.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b993609d5ad4590da72e217bb43786b74aabc183
Component: engine
This fix tries to address the issue raised in 26453 where bad syntax
on dockerfile is not checked before building, thus user has to wait
before seeing error in dockerfile.
This fix fixes the issue by evaluating all the instructions and check
syntax before dockerfile is invoked actually.
All existing tests pass.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8dc2b156a079ce03db8f579094b9643632661a8
Component: engine
and broken integration tests based of nil pointers
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e16e9775d48b6cd0cc7b4a66114d1b9680aa2f31
Component: engine
When `docker inspect` is invoked, it is possible to pass a flag of
`-s` for container types to display size information. If `-s` is used
for non-container types then a warning `WARNING: --size ignored for volume`
will show up.
However, currently `WARNING: --size ignored for volume` will show up even
when `-s` is not passed to `docker inspect` for non-container types.
This fix fixes this issue by checking if `-s` has been passed or not (`getSize`).
Also, since image inspect does not support `-s`, `IsSizeSupported` has been changed
to false for images.
This fix is tested manually.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 54976b718feac328609a0323d60f02a28c988f94
Component: engine