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
Allow add-machine to take a -n param #198
Conversation
…ultiple machines in a single command
I think you meant https://bugs.launchpad.net/juju-core/+bug/1214209 This needs some tweaking to take into account placement. I think if if the user specifies |
@axw ptal |
juju add-machine lxc (starts a new machine with an lxc container) | ||
juju add-machine lxc -n 2 (starts 2 new machines with an lxc container) |
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.
This won't work. "lxc" is a placement directive.
EDIT: ah, I see what you did now. Never mind.
I think we could do with better error reporting, but otherwise I'm happy with this. |
@axw thanks for the feedback, the output is much better now, ptal |
} | ||
} | ||
if len(errs) == 1 { | ||
return errs[0] |
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.
I'm +1 on returning the original error if there's only one failure, but I think we need to be consistent with the error output.
I think it might be better just to print out the "failed to create N machine(s)" regardless of how many there are, and then return cmd.ErrSilent. Also, I think you want to be printing to ctx.Stderr() for errors -- they shouldn't be hidden by -q
IMO.
Thanks. Nearly there, just would like the error output to be consistent between the single/multi error case. |
@axw thanks for the feedback, ptal
|
Thanks! LGTM |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
Allow add-machine to take a -n param Fix for https://bugs.launchpad.net/juju-core/+bug/1214209 Allow add-machine to take a -n param to add multiple machines
Fix for https://bugs.launchpad.net/juju-core/+bug/1214209
Allow add-machine to take a -n param to add multiple machines