cloudconfig/sshinit: don't send commands to stdin #4349

Merged
merged 1 commit into from Feb 22, 2016

Conversation

Projects
None yet
3 participants
Member

axw commented Feb 9, 2016

Turns out that bash reads byte-at-a-time when reading
commands from stdin. This is likely so it can avoid
buffering more than a command's worth of input.

Anyway, we send huge scripts to bash at bootstrap
time, particularly when uploading tools. With this
change, we avoid sending the script to bash directly,
and instead write it to the remote disk and execute
it from there.

Fixes https://bugs.launchpad.net/juju-core/+bug/1543388

(Review request: http://reviews.vapour.ws/r/3793/)

cloudconfig/sshinit: don't send commands to stdin
Turns out that bash reads byte-at-a-time when reading
commands from stdin. This is likely so it can avoid
buffering more than a command's worth of input.

Anyway, we send huge scripts to bash at bootstrap
time, particularly when uploading tools. With this
change, we avoid sending the script to bash directly,
and instead write it to the remote disk and execute
it from there.

Fixes https://bugs.launchpad.net/juju-core/+bug/1543388
Member

axw commented Feb 15, 2016

$$merge$$

Contributor

jujubot commented Feb 15, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Feb 15, 2016

Build failed: Does not match ['fixes-1538241', 'fixes-1544796']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/6391

Owner

wallyworld commented Feb 21, 2016

$$JFDI$$

Contributor

jujubot commented Feb 21, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Feb 22, 2016

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/6478

Member

axw commented Feb 22, 2016

$$JFDI$$

Contributor

jujubot commented Feb 22, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Feb 22, 2016

Merge pull request #4349 from axw/sshinit-runconfigurescript-buffered
cloudconfig/sshinit: don't send commands to stdin

Turns out that bash reads byte-at-a-time when reading
commands from stdin. This is likely so it can avoid
buffering more than a command's worth of input.

Anyway, we send huge scripts to bash at bootstrap
time, particularly when uploading tools. With this
change, we avoid sending the script to bash directly,
and instead write it to the remote disk and execute
it from there.

Fixes https://bugs.launchpad.net/juju-core/+bug/1543388

(Review request: http://reviews.vapour.ws/r/3793/)

@jujubot jujubot merged commit bab6369 into juju:master Feb 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment