-
Notifications
You must be signed in to change notification settings - Fork 37
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
Input file with list of commands to run async on nodes #75
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
42a8ea6
Can now input file with list of commands that are run async on nodes.
dgrisham a5efdd6
Reworking implementation to be more generalizable.
dgrisham 6e521b4
Read from stdin instead of passing `--cmdFile`.
dgrisham f3171f1
Clean up terminator logic.
dgrisham 5d3b816
Abstract out `bufio.Reader` from the rest of the logic.
dgrisham 9c94eaa
Support # at beginning of line for commenting.
dgrisham 2e4a6e9
Use mattn/go-shellwords for parsing STDIN.
dgrisham 6a613e0
Gx'ify mattn/go-shellwords.
dgrisham 2a39bcc
Check STDIN for data or named pipe on `iptb run`. If both empty, exit.
dgrisham cf4a66f
Print `iptb run` usage when no command is input.
dgrisham 611c391
Check stdin in `Before` instead of `Action`.
dgrisham bfeda42
Resolve TODO.
dgrisham e2ba390
Fix goroutine iterator race condition.
dgrisham 01a61ca
Docs: Add comprehensive description to `iptb run` command.
dgrisham d4685c2
Fix: Small typo in error output.
dgrisham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 pretty sure we want to pass
list
andi
in as parameters. I'm pretty sure this is a race issue. On small workloads it probably won't show up, but when things actually start to get schedule the value of i or list may have changed.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.
Also something we need to make clear in our plugin documentation (none existed at the moment) is that they need to be thread safe, as now with this format the same node could be access at the same time.
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.
Ah, right, this is my first time using goroutines and I'm still getting used to stuff like this 👍
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.
And gotcha on the documentation, I can throw that in when I do this rest of the documentation as well.
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.
Oh, just realized you said that there isn't any plugin documentation at all. I'll at least make an issue to remind us.