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
Preserve ssh error #56460
Merged
Merged
Preserve ssh error #56460
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
ansibot
added
affects_2.9
This issue/PR affects Ansible v2.9
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
needs_triage
Needs a first human triage before being processed.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
May 15, 2019
Hi Brian! Thanks for looking at it! I tested your PR locally and it does not fix my personal issue, so I propose also changing: diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py
index 23a365f9db..36f76d57b7 100644
--- a/lib/ansible/plugins/connection/ssh.py
+++ b/lib/ansible/plugins/connection/ssh.py
@@ -1034,7 +1034,7 @@ class Connection(ConnectionBase):
raise AnsibleControlPersistBrokenPipeError('SSH Error: data could not be sent because of ControlPersist broken pipe.')
if p.returncode == 255 and in_data and checkrc:
- raise AnsibleConnectionFailure('SSH Error: data could not be sent to remote host "%s". Make sure this host can be reached over ssh' % self.host)
+ raise AnsibleConnectionFailure('Data could not be sent to remote host "%s". Make sure this host can be reached over ssh: %s' % (self.host, to_native(b_stderr)))
return (p.returncode, b_stdout, b_stderr)
without my change on your branch I'm getting:
with my change:
|
samdoran
removed
the
needs_triage
Needs a first human triage before being processed.
label
May 21, 2019
agaffney
reviewed
May 22, 2019
LGTM, I'm getting:
|
bcoca
added a commit
to bcoca/ansible
that referenced
this pull request
May 23, 2019
* Preserve ssh error * more details on fail * removed redundant caption to errors (cherry picked from commit 22b9525)
abadger
pushed a commit
that referenced
this pull request
May 24, 2019
* Preserve ssh error * more details on fail * removed redundant caption to errors (cherry picked from commit 22b9525)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.9
This issue/PR affects Ansible v2.9
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
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.
Allow original ssh error to be seen and traceback to be available on high verbosity
fixes #35313
ISSUE TYPE
COMPONENT NAME
connection/ssh