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
Add Swarm management CLI commands #23363
Conversation
if !ok { | ||
return fmt.Errorf("Failed to parse %v as a rational number", value) | ||
} | ||
*c = nanoCPUs(cpu.Mul(cpu, big.NewRat(1e9, 1)).Num().Int64()) |
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.
Before calling Int64()
, you have to check IsInt()
or return an error. This is to make sure there's no loss (user input is not below nanos).
e631699
to
c32e879
Compare
Ok, those issues should be fixed. |
41e877c
to
74371fb
Compare
|
||
cmd := &cobra.Command{ | ||
Use: "promote NODE [NODE...]", | ||
Short: "Promote a node as manager in the swarm", |
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.
Probably, "Promote a node to manager in the swarm"?
win2lin error is weird :
|
@vdemeester it's because that CI is still on Go 1.5.4 |
Just let you know, I did a rebase on master with a small conflict at: Other than that it's just fine. |
As described in our ROADMAP.md, introduce new Swarm management commands to call to the corresponding API endpoints. This PR is fully backward compatible (joining a Swarm is an optional feature of the Engine, and existing commands are not impacted). Signed-off-by: Daniel Nephin <dnephin@docker.com> Signed-off-by: Victor Vieux <vieux@docker.com> Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Rename `--port` to `--publish` for consistency between `docker service` and `docker run`. Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Rename `--restart-policy-*` flags to `--restart-*` (e.g., `--restart-policy-delay` becomes `--restart-delay`). Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Rename `--updateconfig-*` to `--update-*` and improve help messages. Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
- Set secret when using default policy - Always initialize policy for all roles Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
74371fb
to
a7d0b2c
Compare
LGTM 💯 |
LGTM 💯 |
LGTM |
CLI reference and docs will be completed in a followup 👍 |
🎉 🎉 I love the new |
🐝 🐝 🎉 |
@thaJeztah This PR added reference pages for the |
@thaJeztah cool, thanks. I already dropped a note there. |
As described in our ROADMAP.md, introduce new Swarm management commands to call to the corresponding API endpoints.
This PR is fully backward compatible (joining a Swarm is an optional feature of the Engine, and existing commands are not impacted)