This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
fix(SSHChannelReader): Read output completely before checking command exit. #260
Merged
bcwaldon
merged 1 commit into
coreos:master
from
calavera:fix_command_channel_reader_race
Apr 2, 2014
Merged
fix(SSHChannelReader): Read output completely before checking command exit. #260
bcwaldon
merged 1 commit into
coreos:master
from
calavera:fix_command_channel_reader_race
Apr 2, 2014
Conversation
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
readSSHChannelOutput(channel.Stderr) | ||
|
||
exitStatus := -1 | ||
switch exitError := exitErr.(type) { |
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.
FWIW, this switch
will disappear in the future if this patch is accepted:
oh, I didn't see that. I don't think that's necessary. Let me run some tests. |
I think it's working as expected now. This is the output in the server:
and this is the output of fleetctl:
|
Definitely not blocking this issue, but I think we should put all the logic to run commands together somewhere. Right now there are three places where it's duplicated:
|
@calavera Yes, this patch is not functioning properly. I'm going to merge it and try to refactor the code to your point above ^. I'll add functional testing around these features, too. |
bcwaldon
added a commit
that referenced
this pull request
Apr 2, 2014
fix(SSHChannelReader): Read output completely before checking command exit.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #259