Commit Graph

792 Commits

Author SHA1 Message Date
Vincent Demeester 278e4ccdc5 Merge pull request #30788 from ripcurld0/hide_win_opts
Hide command options that are related to Windows
2017-03-13 16:15:29 +01:00
Sebastiaan van Stijn be1855fac4 Merge pull request #30648 from allencloud/do-not-fail-fast-when-inspect
do not fail fast when executing inspect command
2017-03-13 16:04:04 +01:00
Boaz Shuster c7dd91faf5 Hide command options that are related to Windows
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-03-12 08:47:17 +02:00
Sebastiaan van Stijn 4c4af071c7 Merge pull request #31176 from adshmh/29662-stack-deploy-error-if-external-combined-with-other-volume-options
stack deploy exits with error if both 'external' and other options are specified for a volume
2017-03-11 01:59:43 +01:00
Tibor Vass 2881566c4a Merge pull request #30047 from duglin/distError
Add the mediaType to the error
2017-03-10 16:44:49 -08:00
Drew Erny 7ce96255fd Add tail and since to service logs
This change adds the ability to do --tail and --since on docker service
logs. It wires up the API endpoints to each other and fixes some older
bugs. It adds integration tests for these new features.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-03-10 14:59:00 -08:00
Vincent Demeester be3e4bbe77 Merge pull request #31582 from dnephin/misc-flag-cleanup
Cleanup some memory flags used in the CLI
2017-03-10 14:16:42 +01:00
Ian Campbell 54a5077ca5 Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-10 10:24:33 +00:00
allencloud 49570cf783 do not fail fast when executing inspect command
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-03-10 16:09:09 +08:00
Ying Li 63bb7d89ad Use either the system root pool or an empty cert pool with custom CA roots,
and not a joint system+custom CA roots pool, when connecting from a docker
client to a remote daemon.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-03-09 11:19:20 -08:00
Harald Albers 50a10e9bf4 Fix description of `docker run|create --stop-signal` in help message
Signed-off-by: Harald Albers <github@albersweb.de>
2017-03-09 09:32:16 +01:00
Drew Erny 3cda347b3d Fixed concerns, updated, and rebased PR.
Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-03-08 16:35:58 -08:00
Andrea Luzzardi 1d379b9691 service logs: Improve formatting
- Align output. Previously, output would end up unaligned because of
longer task names (e.g. web.1 vs web.10)
- Truncate task IDs and add a --no-trunc option
- Added a --no-ids option to remove IDs altogether
- Got rid of the generic ID Resolver as we need more customization.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2017-03-08 14:08:04 -08:00
Sebastiaan van Stijn 889f0259c2 Merge pull request #31443 from james-nesbitt/export-more-compose-methods
exported add. cli compose loader parsing methods
2017-03-08 15:12:42 +01:00
Brian Goff f6f52d0823 Merge pull request #31258 from dnephin/fix-override-default-stack-network
Support customizing the default network for a stack
2017-03-07 14:28:16 -05:00
Arash Deshmeh 789652c41a stack deploy exits with error if both 'external' and any other options are specified for volumes
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-03-07 14:21:45 -05:00
James Nesbitt b6f45eb18e exported cli compose loader parsing methods
Signed-off-by: James Nesbitt <james.nesbitt@wunderkraut.com>
2017-03-07 17:36:35 +02:00
Daniel Nephin e43a97cd38 Use opts.MemBytes for flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-07 10:32:49 -05:00
Daniel Nephin 2238492c51 Some things just need to be line wrapped.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 16:01:57 -05:00
Daniel Nephin 63c3221dd3 Convert new compose volume type to swarm mount type
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin 29f39ea244 Support expanded mounts in Compose loader
Add a test for loading expanded mount format.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin a442213b92 Parse a volume spec on the client, with support for windows drives
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin d2d48f3f69 Add expanded mount syntax to Compose schema and types.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Sebastiaan van Stijn 3b8ecc089b Merge pull request #31543 from chawlanikhil24/master
Replaced "err" with  "nil" & added a comment
2017-03-06 15:11:14 +01:00
Nikhil Chawla 80a8d7ca26 Fixed the typo in the code
Signed-off-by: Nikhil Chawla <chawlanikhil24@gmail.com>
2017-03-06 17:31:04 +05:30
Aaron Lehmann 78c204ef79 Implement server-side rollback, for daemon versions that support this
Server-side rollback can take advantage of the rollback-specific update
parameters, instead of being treated as a normal update that happens to
go back to a previous version of the spec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-03 16:33:34 -08:00
Aaron Lehmann 8de01fb7a8 Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-03 16:33:34 -08:00
Aaron Lehmann 5232868f46 Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-03 16:33:34 -08:00
Yong Tang e94294e902 Fix error caused by overlapping merge of 30733
This fix fixes build error caused by overlapping merge of 30733 and 28213.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-03-03 13:26:00 -08:00
Kenfe-Mickaël Laventure 9fb77af2e6 Merge pull request #30733 from yongtang/02022017-formatter-header
Allow `--format` to use different delim in `table` format
2017-03-03 11:25:19 -08:00
Sebastiaan van Stijn ff11b0523d Merge pull request #30725 from aaronlehmann/topology
Topology-aware scheduling
2017-03-03 15:01:12 +01:00
Brian Goff 1da02be7f5 Merge pull request #31409 from yuexiao-wang/fix-version
'docker daemon' deprecation message doesn't use the new version
2017-03-02 22:02:09 -05:00
yuexiao-wang 3f82787403 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-03-03 17:26:49 +08:00
Sebastiaan van Stijn decce9cad1 Merge pull request #30754 from yongtang/25696-stop-signal
Add `--stop-signal` for `service create` and `service update`
2017-03-01 18:10:57 +01:00
Sebastiaan van Stijn 04d124ff1b Merge pull request #31124 from vdemeester/volume-unit-tests
Add unit tests to cli/command/volume package
2017-03-01 14:13:47 +01:00
Doug Davis 05a3caff23 Add the mediaType to the error
Without this fix the error the client might see is:
	target is unknown
which wasn't helpful to me when I saw this today. With this fix I
now see:
	MediaType is unknown: 'text/html'
which helped me track down the issue to the registry I was talking to.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-02-28 11:36:32 -08:00
Vincent Demeester 59f2b071df Merge pull request #31290 from thaJeztah/print-d_type_warning
add d_type warning to docker info, and optimize output
2017-02-28 16:35:00 +01:00
Aaron Lehmann 21d5d1fa9d Topology-aware scheduling
This adds support for placement preferences in Swarm services.

- Convert PlacementPreferences between GRPC API and HTTP API
- Add --placement-pref, --placement-pref-add and --placement-pref-rm to CLI
- Add support for placement preferences in service inspect --pretty
- Add integration test

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-02-27 13:29:54 -08:00
Vincent Demeester 407d65df9d Add unit tests to cli/command/volume package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-27 18:39:35 +01:00
Sebastiaan van Stijn 7665cb52dc Merge pull request #30383 from TDAbboud/30096-add-host-docker-build
Add --add-host for docker build
2017-02-27 12:42:18 +01:00
Akihiro Suda 76b6faa13d Merge pull request #31212 from fate-grand-order/fixed
use t.Fatal() to output the err message and fix typo
2017-02-27 12:26:35 +09:00
Genki Takiuchi 5a53ae5170 Fixed typo.
Signed-off-by: Genki Takiuchi <genki@s21g.com>
2017-02-26 12:59:18 +09:00
Daniel Nephin 5de7378cbe Support customizing the default network for a stack.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-24 17:32:23 -05:00
Arash Deshmeh 3581bec442 docker compose interpolation format error now includes a hint on escaping $ characters.
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-02-24 11:37:40 -05:00
Sebastiaan van Stijn b09aa604c8 add d_type warning to docker info, and optimize output
The overlay(2) drivers were moved up in the list of storage drivers,
and are known to have problems if the backing filesystem does not
support d_type.

Commit 2e20e63da2a8a0ffbbb3f2146f87559e17f43046 added a warning,
which is logged in the daemon logs, however, many users do not
check those logs, and may overlook this warning.

This patch adds the same warning to the output of `docker info`
so that the warning is more easily found.

In addition, the output of warnings printed by `docker info` is
optimized, by;

- moving all warnings to the _end_ of the output, instead of
  mixing them with the regular output
- wrapping the storage-driver warnings, so that they are more
  easily readable

Example output with this patch applied
============================================

devicemapper using loopback devices:

    ...
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false

    WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
             Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled

overlay2 on xfs without d_type support;

    ...
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false

    WARNING: overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
             Reformat the filesystem with ftype=1 to enable d_type support.
             Running without d_type support will not be supported in future releases.
    WARNING: bridge-nf-call-iptables is disabled

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-23 13:36:57 +01:00
yupengzte 5b67f20a91 Delete dots to align with other commands description
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-02-23 16:46:08 +08:00
fate-grand-order 98c222239e use t.Fatal() to output the err message where the values used for formatting
text does not appear to contain a placeholder

Signed-off-by: Helen Xie <chenjg@harmonycloud.cn>
2017-02-23 10:16:22 +08:00
Yong Tang 9037f77d31 Add `--stop-signal` for `service create` and `service update`
This fix tries to address the issue raised in 25696 where
it was not possible to specify `--stop-signal` for `docker service create`
and `docker service update`, in order to use special signal to stop
the container.

This fix adds `--stop-signal` and update the `StopSignal` in `Config`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 25696.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-21 15:19:45 -08:00
Victor Vieux adcf82c65a Merge pull request #31206 from xuzhenglun/master
fix wrong print format
2017-02-21 14:13:32 -08:00
Krasi Georgiev 1d0e556669 ignore registry url from user when it is the default namespace
Signed-off-by: Krasi Georgiev <krasi@vip-consult.solutions>
2017-02-21 22:04:54 +02:00