clustershell
clustershell copied to clipboard
Type in the exact number of machines to proceed?
Hi.
I found idea in this blog post may be useful in clush: https://rachelbythebay.com/w/2020/10/26/num/
Would you be open to a pull request that adds a configurable confirmation like described in the post?
@thiell what do you think?
@alexbozhenko apologies for the delay. I would say, if you have the code ready, please submit the PR so we can have a look. If the patch is too big, we probably won't include it though, as we try to keep things as simple as possible, but in any case, it could be of interest to others. Thx!
For what is worth we've done it in Cumin (that uses ClusterShell underneath for the transport) and opted to avoid the thousands separator bit as it felt a bit too much. I think it would be a nice to have addition.
Additionally to what Stéphane said. I think you should be able to have a small patch for that, I would recommend:
- Use a configuration option to enable this behavior. Should that be a node count limit? If the number of target is greater than this value, trigger the confirmation. Keeping this value unset disable the check. ClusterShell has code that helps creating config option that could be also use on command line easily.
- Implement this in Clush code, after
nodeset_base
has been fully computed. That should be enough to do what you want. That should be completed with: - Doc update for the new config options
- Tests
For what is worth we've done it in Cumin (that uses ClusterShell underneath for the transport) and opted to avoid the thousands separator bit as it felt a bit too much. I think it would be a nice to have addition.
Oh, I see. https://github.com/wikimedia/cumin/commit/5c18e5c17cd3dd6a19b6a6a39764ca4d5e70f000 Thanks for the reference!