terraform/builtin/provisioners
Mitchell Hashimoto 4b1d9cfd7d
communicator/ssh: don't share rand object to guarantee unique values
Fixes #10463

I'm really surprised this flew under the radar for years...

By having unique PRNGs, the SSH communicator could and would
generate identical ScriptPaths and two provisioners running in parallel
could overwrite each other and execute the same script. This would
happen because they're both seeded by the current time which could
potentially be identical if done in parallel...

Instead, we share the rand now so that the sequence is guaranteed
unique. As an extra measure of robustness, we also multiple by the PID
so that we're also protected against two processes at the same time.
2016-12-06 00:21:49 -08:00
..
chef Add ability to skip chef registration 2016-10-01 00:49:39 +02:00
file provisioner/file: Clean up temporary files 2016-07-08 19:35:00 +01:00
local-exec provisioners/local-exec: output the output 2014-10-05 23:05:49 -07:00
remote-exec communicator/ssh: don't share rand object to guarantee unique values 2016-12-06 00:21:49 -08:00