You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction 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 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.
The text was updated successfully, but these errors were encountered:
Please transfer to https://github.com/hashicorp/packer-plugin-sdk.
There, this could be resolved by extending the following comment:
// The number of handshakes to attempt with SSH once it can connect.// This defaults to `10`, unless a `ssh_timeout` is set, with a 2 second interval.SSHHandshakeAttemptsint`mapstructure:"ssh_handshake_attempts"`
That looks like an SDK issue indeed, as pointed out, adding the default wait-time between two attempts is a solution for this.
Alternatively I imagine we could make the time between two attempts configurable.
Come to think of it, it looks like the ssh_handshake_attempts has precedence over the other, and looking at the docs, it's not clear which is.
I'll transfer this issue and revisit the code ASAP, thanks for bumping this @tenthirtyam!
Community Note
Please vote on this issue by adding a 👍 reaction 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 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.The text was updated successfully, but these errors were encountered: