hashicorp / hashicorp/packer-plugin-sdk
Document wait time between attempts in `ssh_handshake_attempts`
- Dominant language
- Go
- Stars
- 42
- Forks
- 62
- Avg merge
- 29m
- Merged PRs (30d)
- 2
Description
#### Community Note
Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
#### Description
$subj or make it configurable.
Had to look into [packer-plugin-sdk sources](https://github.com/hashicorp/packer-plugin-sdk/blob/main/communicator/step_connect_ssh.go#L234) to check what is wait time. (2 seconds at the moment I'm writing this)
#### Use Case(s)
To better understand what to set in `ssh_handshake_attempts`, e.g. `expected_wait_time_in_seconds/2`.
Sometimes if cloud-init adds a public key it may take some time, e.g. when it's datasources have to wait for some external metadata. So first minute after sshd daemon is up, no one will be able to authorize since public key is not added to `.ssh/authorized_keys` yet. In such condition packer may fail since 10 attempts will happen in just 20 seconds.
Contributor guide
Assessment
This issue has not been assessed yet.