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

communicator/{ssh,winrm}: seed random script paths #7413

Merged
merged 1 commit into from
Jun 29, 2016

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Jun 29, 2016

Without a seed, the "random" script path locations for the remote-exec
provisioner were actually deterministic!

Every rand.Int31() would return the same pseudorandom chain starting w/
the numbers: 1298498081, 2019727887, 1427131847, 939984059, ...

So here we properly seed the communicators so the script paths are
actually random, and multiple runs on a single remote host have much
less chance of clobbering each other.

Fixes #4186

Kudos to @DustinChaloupka for the correct hunch leading to this fix!

@phinze
Copy link
Contributor Author

phinze commented Jun 29, 2016

Oop, other tests do not use New() ... on it.

Without a seed, the "random" script path locations for the remote-exec
provisioner were actually deterministic!

Every rand.Int31() would return the same pseudorandom chain starting w/
the numbers: 1298498081, 2019727887, 1427131847, 939984059, ...

So here we properly seed the communicators so the script paths are
actually random, and multiple runs on a single remote host have much
less chance of clobbering each other.

Fixes #4186

Kudos to @DustinChaloupka for the correct hunch leading to this fix!
@phinze phinze force-pushed the b-communicator-rand-seed branch from 97f83ec to 96c20f0 Compare June 29, 2016 14:32
@phinze
Copy link
Contributor Author

phinze commented Jun 29, 2016

OK! /cc @jbardin for 👀

@jbardin
Copy link
Member

jbardin commented Jun 29, 2016

LGTM!

@phinze phinze merged commit 1f7f714 into master Jun 29, 2016
@phinze phinze deleted the b-communicator-rand-seed branch June 29, 2016 15:37
@ghost
Copy link

ghost commented Apr 24, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote-exec provisioner fails with "Error reading script: EOF"
2 participants