Commit Graph

49 Commits

Author SHA1 Message Date
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
4ab44ced86 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
Upstream-commit: b881148385685f3c538a3a085207bfdf30ae9213
Component: engine
2016-09-27 18:46:51 +02:00
562ec15f92 Let swarmkit handle cluster defaults in swarm init if not specified
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
2016-09-27 04:19:38 -07:00
a034d841ce Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c4e169727474f24cb0eddea15b94aaa2bfbb3281
Component: engine
2016-09-23 12:13:29 -07:00
7acfbc2634 Refactor to new events api
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: d6bd79c18f5ab5dbdaa472ccd921ad2858117507
Component: engine
2016-09-22 14:42:06 -04:00
1e564455f7 Create a system subcommand for events and info.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 89ea589d2c9660c3eeaebe031dcfdd4b264a695b
Component: engine
2016-09-19 16:29:17 -04:00
14f9dd10a3 Merge pull request #26268 from AkihiroSuda/eventsjsonl
add `docker events --format`
Upstream-commit: bb6fe56e8847112e55429309bf3ac004753ae3a8
Component: engine
2016-09-19 17:30:27 +02:00
93e3695b69 Merge pull request #26387 from Microsoft/jjh/securityopts
Only output security options if there are any
Upstream-commit: 94bc2b1bc07843087c0096d06fdb56d70aa45a02
Component: engine
2016-09-16 23:05:30 +02:00
39533df3e9 Only output security options if there are any
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dd3d223a7ea3fc35eeeb255fc97a7bc46936cae5
Component: engine
2016-09-16 10:05:21 -07:00
e6635a948e add docker events --format
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 5af5a1be6209bde3f05b5f9ed4e0db0037dfe0ff
Component: engine
2016-09-15 09:55:29 +00:00
71b78a5b8d Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a07be9be38a96f43a0a7bac48caf35f9370bb543
Component: engine
2016-09-13 16:20:10 -04:00
26569691e1 Fix issue of WARNING: --size ignored for volume for docker inspect
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
2016-09-12 23:08:19 -07:00
d8acc366ce Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0640a14b4fcba3715f7cc3bc9444f3c7f4827edd
Component: engine
2016-09-08 15:46:29 -04:00