Commit Graph

62 Commits

Author SHA1 Message Date
e9836650c4 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
Upstream-commit: 0b35ab196546a4de068060f10418cc5416d5b62c
Component: engine
2017-04-13 10:08:11 -07:00
3d267a0dc8 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1d274e9acfe96b98be3ec956636ff4e5c70e98af
Component: engine
2017-04-10 13:41:16 -07:00
6633b439bb Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 985a9c7047616885454951e7c8282f3c94f6d6e9
Component: engine
2017-04-10 13:04:03 +03:00
e0362b90f0 Merge pull request #31022 from jmzwcn/issue30994
docker version output is not consistent when there are downgrades or incompatibilities #30994
Upstream-commit: 3dfce9fbb813511a0dbfea1fa3bc80a37e7072c4
Component: engine
2017-03-31 15:55:03 -07:00
61743ec730 Merge pull request #32124 from vdemeester/system-inspect-secret
Add support for `--type=secret` in `docker inspect`
Upstream-commit: ee61f28cc37d78cd40943c37c24716e5a0a635d9
Component: engine
2017-03-30 17:01:57 +02:00
2fba778d82 Docker version output is not consistent when there are downgrades or incompatibilities.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: 50aa1e5b2819ea739beaa58bfe7836c2c8b4b9ff
Component: engine
2017-03-29 21:53:19 +08:00
65370eec05 api: Omit Cluster, Nodes, and Managers from swarm info when unavailable
Currently these fields are included in the response JSON with zero
values. It's better not to include them if the information is
unavailable (for example, on a worker node).

This turns Cluster into a pointer so that it can be left out.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3894254dddc56bf283d7361dc88953a167a3be1f
Component: engine
2017-03-28 14:20:25 -07:00
3f0713bbb1 Add support for --type=secret in docker inspect
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71129f6be6c143b8210636f8bbb11a7c86b42cb6
Component: engine
2017-03-28 10:48:48 +02:00
7cc7eec39f Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7b7ea8ab810190018346cb7d84c161bb94f7ca60
Component: engine
2017-03-24 16:58:07 -04:00
ff11389227 Enhance network inspect to show all tasks, local & non-local, in swarm mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: 14f76a21db71c5a817cb4d1e27f9940cefd5c820
Component: engine
2017-03-13 17:52:08 -07:00
302e2c7325 Merge pull request #31409 from yuexiao-wang/fix-version
'docker daemon' deprecation message doesn't use the new version
Upstream-commit: 55b955d9ffc14571fa6b5a1a6369a8be8d053853
Component: engine
2017-03-02 22:02:09 -05:00
31865190c5 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5a9cee7bb57e7da7f2793fbb290498bba0531105
Component: engine
2017-03-03 17:26:49 +08:00
1798e7e8be 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>
Upstream-commit: 19215597982232f65dcbc873e54e632b99cddecc
Component: engine
2017-02-23 13:36:57 +01:00
b0c7dd934b return error when listNode fails
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 8e04e9902a9739a13e5e824339082cc3d361d097
Component: engine
2017-01-19 14:02:06 +08:00
0c3b3bfadc Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 58738cdee327f5de481dcf7d3d377374cbb5f13a
Component: engine
2017-01-04 14:16:42 -08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
4313743ab7 Merge pull request #29212 from yongtang/29185-docker-inspect
Fix `docker plugin inspect <unkown object>` issue on Windows
Upstream-commit: e91604c0d2d15cacd06e911cab360291a79e5f37
Component: engine
2016-12-21 15:47:17 -05:00
dd179255a2 Fix docker plugin inspect <unkown object> issue on Windows
This fix is a follow up for comment:
https://github.com/docker/docker/pull/29186/files#r91277345

While #29186 addresses the issue of `docker inspect <unknown object>`
on Windows, it actually makes `docker plugin inspect <unknown object>`
out `object not found` on Windows as well. This is actually misleading
as plugin is not supported on Windows.

This fix reverted the change in #29186 while at the same time,
checks `not supported` in `docker inspect <unknown object>` so that
- `docker plugin inspect <unknown object>` returns `not supported` on Windows
- `docker inspect <unknown object>` returns `not found` on Windows

This fix is related to #29186 and #29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0b3c10ac4ddfe3655bac080440a8553269f2307f
Component: engine
2016-12-20 21:05:10 -08:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
e85a4aaddc Ignore certificate expiry error for top-level inspect
The top-level `docker inspect` command could return
an error if the nodes Swarm certificates were expired.

In situations where the user did not explicitly
ask for an object-type (`--type=foo`), we should
ignore these errors, and consider them equal to
"node is not a swarm manager".

This change makes `docker inspect` ignore these
errors if no type was specified.

As a further optimization, the "swarm status"
result is now stored in a variable, so that
other swarm-specific API calls can be skipped.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 66cf4cc7f7942b049e0c99c21b84ab07aa80c777
Component: engine
2016-12-13 17:22:43 +01:00
57d5fc9bfa Move templates to pkg/templates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 04f7a03359ac009ad2cd548fa93124a66e880ae5
Component: engine
2016-12-12 09:34:03 +01:00
38517bb088 Move debug functions to cli/debug package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce375503477c82a76ce8530e73655fbbf5046834
Component: engine
2016-12-12 09:33:58 +01:00
8d0b8ac112 Support plugins in docker inspect
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

An additional integration test has been added to cover the changes.

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 90bb2cdb9f15a9b1b9a4e2ea4242882665daac4e
Component: engine
2016-12-02 11:33:29 -08:00
52fcb6e953 Align output of docker version again
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dfeaf7a959cf619f5460c88e7bc1fe5ce40d50a7
Component: engine
2016-11-28 11:38:58 -08:00
36b43dcc24 api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 514ca09426e5d023753101ffa6ac3a21b0e0efb5
Component: engine
2016-11-19 13:21:16 +01:00
2e39dde1e5 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: bf95472105e5dad55314cfff599abea5b81b134a
Component: engine
2016-11-17 10:54:10 -08:00
16cd9213ef Add information for Manager Addresses in the output of docker info
As is specified in 28018, it would be useful to know the manager's addresses
even in a worker node. This is especially useful when there are many
worker nodes in a big cluster.

The information is available in `info.Swarm.RemoteManagers`.

This fix add the information of `Manager Addresses` to the output
of `docker info`, to explicitly show it.

A test has been added for this fix.

This fix fixes 28018.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 828bd441eb828072044175f3e6867c7218e434c5
Component: engine
2016-11-11 07:35:32 -08:00
4d7a48f6ec Merge pull request #27955 from mlaventure/runc-docker-info
Add external binaries version to docker info
Upstream-commit: 0427afa409f1a2034537b4659bf7a3a1454fa617
Component: engine
2016-11-10 21:27:14 -08:00
2874df7efa Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b4a667c8c4f536445d35e8914a58e8c749f16ea6
Component: engine
2016-11-09 16:09:00 -08:00
515ebb7b5c Add expected 3rd party binaries commit ids to info
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 2790ac68b32b399c872de88388bdccc359ed7a88
Component: engine
2016-11-09 07:42:44 -08:00
7198214971 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
Upstream-commit: 29a38a4fe8caebbad9ea72ca0d4b4fc80118df3c
Component: engine
2016-11-09 10:19:45 +01:00
f7b4103706 cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 842d11f44cede2d7e9488e54f8ac8de89d8f4cd4
Component: engine
2016-11-08 13:14:01 -08:00
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
df125f380f Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
Upstream-commit: 2d4203222574623b10d94817b9959a08698f516b
Component: engine
2016-11-08 15:49:33 -08:00
e349632310 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d29995bb8481a18fd00b10fe49f2960ee8136619
Component: engine
2016-11-07 21:20:00 -08:00
9ce11130e0 cli/info: fix seccomp warning
also reword seccomp warning around default seccomp profile

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: c68e75e51d58167b5b21e77bbc7b701fe0888096
Component: engine
2016-11-04 19:25:51 +01:00
71fb2940a4 Merge pull request #26276 from runcom/seccomp-conf
daemon: add a flag to override the default seccomp profile
Upstream-commit: efa5e85cf7c6d91fbc8003770fee14bd716a2fdd
Component: engine
2016-11-04 15:45:30 +00:00
b3ef6232b4 cli: shorten description of "inspect" subcommand
The short description should be kept short. Spanning on several lines is
a bit ugly. A user can still get more information in the manual or we
can expand the long description instead if we want (there is currently
none).

This reverts a bit of #26683.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 3443668e044476869227295a0aabb65c50fdd3ef
Component: engine
2016-11-03 20:46:28 +01:00
250cd5b7d2 daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b237189e6c8a4f97be59f08c63cdcb1f2f4680a8
Component: engine
2016-11-02 21:41:29 +01:00
63adf4cb5d Merge pull request #26683 from yuexiao-wang/update-inspect
Modify short and flags for docker inspect
Upstream-commit: a13fc3fd367437a779d3562093bbc9f499816733
Component: engine
2016-10-31 13:39:59 -07:00
613dd5861e Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: cc03984e17f77ce1ad3f41e815a616405b6ffc76
Component: engine
2016-10-31 18:11:25 +08:00
4fb550ce0f add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 7e24c16086a9a4f38e241e51837f2be4877c04a6
Component: engine
2016-10-25 06:43:54 +00:00
cf0e8d8d85 Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
Upstream-commit: 411e7b4416fbac0601db1fa28b5152c23fcaf7bb
Component: engine
2016-10-24 18:12:28 -07:00
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
b898bdd8c2 Remove duplicate keys in labels of docker info
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

An additional integration test has been added to cover the
changes in this fix.

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e4c9079d091a2eeac8a74a0356e3f348db873b87
Component: engine
2016-10-18 07:45:27 -07:00
77c700603f Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 7dad9d5ce45f25750f339642d3b84a81cc2ba98e
Component: engine
2016-10-18 19:40:16 +08:00
5f64850ff1 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: fd62b6c9505451670b926216648ab7f6a3f9f586
Component: engine
2016-10-11 00:42:21 +08:00
216da195bc Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6396c62fdc5355ff097da6a131cb176a5f521470
Component: engine
2016-10-11 00:13:33 +08:00
27aa54380b Add new df subcomand to the system command
This command display the state of the data usage of the docker daemon.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: b650a7bd27dcdbb4cddbfdc2cf62f41b5a8e8652
Component: engine
2016-09-30 14:35:23 -07:00
5cfd36294b Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 280c8723667af385e0807a090ddc5cc57c46807e
Component: engine
2016-09-29 07:42:53 -07:00