New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: docker service|node|stack ps
instead of tasks
#24816
Conversation
Design LGTM fwiw, I always found the use of |
I don't see this as an improvement. Users need to understand the difference between a container and a task. See #24241 (comment) for an example of why. Using It's better that a user has to learn what about tasks and understand the difference than be confused about why containers in swarm mode seem to be hidden for some commands and not others. I also think
|
This is what I've been saying from the start but it really needs to a be top-level concept for this to make sense. We use |
From what I learn now that So I would suggest the following command like
|
@cmingxu The problem with We will probably introduce a top-level |
Can we move this forward? I believe My vote goes to An alternative approach I propose (but don't necessarily back) is behaving like e.g.
/cc @icecrime |
I don't think it's unnecessary. It's necessary to explain this (re-post from #24241 (comment)):
User:
|
@dnephin Much of these problems are from the early UX decision to avoid having a top-level tasks command to provide this functionality. We'll need to introduce this at some point, but now is too late for 1.12. Also, note that these will have different functions. In general, most of the demonstrated problems come from confusing aspects of the swarmkit integration. For example, placing the inspection of tasks on We are going to need to fill in these gaps with solid documentation and clarify that:
|
/cc @sfsmithcha for your notes 😄 #24816 (comment) |
I agree
I disagree. I don't think renaming it makes it any easier or harder to introduce
That would be very confusing. Why would
I agree
True, that part of the example is no longer relevant after the other issue was closed. |
@dnephin We want to be able to schedule things other than containers as part of tasks. |
This is true for every
That is true no matter what
Local vs Cluster |
f72c1fc
to
33acba7
Compare
Looks like experimental build failures
|
33acba7
to
aa8b23b
Compare
Fixed. |
Design LGTM |
i'll review after the tests complete |
That's exactly the problem. |
LGTM
|
LGTM |
@@ -1,18 +1,18 @@ | |||
<!--[metadata]> | |||
+++ | |||
title = "node tasks" | |||
description = "The node tasks command description and usage" | |||
title = "node ps" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add
aliases = ["/engine/reference/commandline/node_tasks/"]
to the metadata here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean this?
aliases = ["/engine/reference/commandline/node_ps/"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, first example should be good; although it's not released yet, by now links can exist to the old location; the aliases
adds a redirect-page for the old URL
This also needs updates to the completion scripts; |
thanks @stevvooe, comments above, also if you need help with the completion scripts (the |
43c4e92
to
c4d8658
Compare
bash-3.2$ docker serbash: _get_comp_words_by_ref: command not found
bash: [: 1: unary operator expected
bash: [: 1: unary operator expected
bash: [: -eq: unary operator expected
~/g/s/g/d/docker ❯❯❯ docker service service-ps-over-tasks ✭ ◼
-- docker service command --
create -- Create a new service
inspect -- Display detailed information on one or more services
ls -- List services
ps -- List the tasks of a service
rm -- Remove a service
scale -- Scale one or multiple services
update -- Update a service
~/g/s/g/d/docker ❯❯❯ docker service ps service-ps-over-tasks ✭ ◼
-- service --
stoic_swanson a6yjg74nab76 -- redis |
Looks like the problem with bash completion is #18140. I'm missing some bash completion helper. Confirmed working after installing completion package: bash-3.2$ docker service
create inspect list ls ps remove rm scale update
bash-3.2$ docker service ps
dreamy_leavitt stoic_swanson |
LGTM ping @sfsmithcha ptal |
docs LGTM |
@stevvooe arf, all green 💚, but needs a rebase |
c4d8658
to
cefb5dc
Compare
Rather than conflict with the unexposed task model, change the names of the object-oriented task display to `docker <object> ps`. The command works identically to `docker service tasks`. This change is superficial. This provides a more sensical docker experience while not trampling on the task model that may be introduced as a top-level command at a later date. The following is an example of the display using `docker service ps` with a service named `condescending_cori`: ``` $ docker service ps condescending_cori ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE e2cd9vqb62qjk38lw65uoffd2 condescending_cori.1 condescending_cori alpine Running 13 minutes ago Running 6c6d232a5d0e ``` The following shows the output for the node on which the command is running: ```console $ docker node ps self ID NAME SERVICE IMAGE LAST STATE DESIRED STATE NODE b1tpbi43k1ibevg2e94bmqo0s mad_kalam.1 mad_kalam apline Accepted 2 seconds ago Accepted 6c6d232a5d0e e2cd9vqb62qjk38lw65uoffd2 condescending_cori.1 condescending_cori alpine Running 12 minutes ago Running 6c6d232a5d0e 4x609m5o0qyn0kgpzvf0ad8x5 furious_davinci.1 furious_davinci redis Running 32 minutes ago Running 6c6d232a5d0e ``` Signed-off-by: Stephen J Day <stephen.day@docker.com>
cefb5dc
to
0aa4e1e
Compare
docs failures can be ignored |
@thaJeztah Looks like those are from master. Are there fixes we need in this branch? Let's get this merged. |
I discussed with @stevvooe; Windows CI is having issues (Jenkins), and the rebase only was due to documentation changes. Given that it was green before those, I'll merge |
@tiborvass @thaJeztah should this move to milestone 1.12.1 ? mmm, confusing - so this is a merge from the 1.12.0 bump branch in #25140 I'm going to mark this as |
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to
docker <object> ps
. The commandworks identically to
docker service tasks
. This change is superficial.This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.
The following is an example of the display using
docker service ps
with a service named
condescending_cori
:The following shows the output for the node on which the command is
running:
cc @aluzzardi
Closes #24152
Signed-off-by: Stephen J Day stephen.day@docker.com