Skip to content
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

Ensure that the become password is written on py3 in the ssh connection plugin #35049

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

sivel
Copy link
Member

@sivel sivel commented Jan 18, 2018

SUMMARY

Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727

In python3, when subprocess.Popen is called, stdin is returned as a io.BufferedWriter.

Per the python docs for io.BufferedWriter:

The buffer will be written out to the underlying RawIOBase object under various conditions, including:

  • when the buffer gets too small for all pending data;
  • when flush() is called;
  • when a seek() is requested (for BufferedRandom objects);
  • when the BufferedWriter object is closed or destroyed.

As such we have no guarantee that the write ever happens, short of calling flush. This is specifically noticeable with pipelining enabled.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/plugins/connection/ssh.py

ANSIBLE VERSION
2.3
2.4
2.5
ADDITIONAL INFORMATION

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Jan 18, 2018
@sivel sivel requested a review from abadger January 18, 2018 16:10
@abadger
Copy link
Contributor

abadger commented Jan 18, 2018

+1 to merge and backport.

@abadger abadger merged commit 29c1d5c into ansible:devel Jan 18, 2018
@abadger
Copy link
Contributor

abadger commented Jan 18, 2018

merged to devel and cherrypicked for 2.4.3rc3 and to the stable-2.3 tree (no new releases of 2.3.x are planned at this time but the change will be in there if we do make a new 2.3.x release in the future.)

@abadger abadger added this to Nice to have in 2.4.x Blocker List Jan 19, 2018
@abadger
Copy link
Contributor

abadger commented Jan 19, 2018

After some discussion, the bug that was prompting an rc3 release has proven to change behaviour in undesirable ways so it has been reverted. Since there's (at present) no bug that's blocking 2.4.3, there may not be an rc3 and this may not make it into a release until 2.4.4.

@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Jan 19, 2018
@abadger
Copy link
Contributor

abadger commented Jan 19, 2018

Decided that we are going to treat the recursion bug as a blocker so there will be an rc3 on Wednesday next week. Cherrypicked this to stable-2.4 for the 2.4-rc3 release.

@abadger abadger moved this from Nice to have to Done in 2.4.3 in 2.4.x Blocker List Jan 19, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
No open projects
2.4.x Blocker List
Done in 2.4.3
Development

Successfully merging this pull request may close these issues.

pipelining doesn't work with python3.6 on Mac
4 participants