Description
The documentation says the following:
ssh_timeout (duration string | ex: "1h5m2s") - The time to wait for SSH to become available. Packer uses this to determine when the machine has booted so this is usually quite long. Example value: 10m. This defaults to 5m, unless ssh_handshake_attempts is set.
[…]
ssh_handshake_attempts (int) - The number of handshakes to attempt with SSH once it can connect. This defaults to 10, unless a ssh_timeout is set.
This leaves me wondering:
- Are the
ssh_timeout and ssh_handshake_attempts fields mutually exclusive? It kind of sounds like that, but it's not clear.
- What is the value of
ssh_timeout if ssh_handshake_attempts is set (and vice versa)? (if they are not mutually exclusive, of course).
This should be clarified in the documentation.
I think that the root cause for my confusion is that the default values are explained with so many conditions. If I have understood things correctly, these are the possible states for the default values:
ssh_timeout is set |
ssh_handshake_attempts is set |
ssh_timeout default value |
ssh_handshake_attempts default value |
| True |
True |
- |
- |
| False |
True |
5 min |
- |
| True |
False |
- |
10 |
| False |
False |
5 min |
10 |
Does this table correctly represent all possible states? If so, I see no reason for all the conditionals in explaining the fields' default values. If my table is correct, we can simply say that "the default value for ssh_timeout is 5 min and the default value for ssh_handshake_attempts is 10".
Use Case(s)
The documentation should be clear on how things works.
Potential References
Originally posted as vmware/packer-plugin-vsphere#289
Description
The documentation says the following:
This leaves me wondering:
ssh_timeoutandssh_handshake_attemptsfields mutually exclusive? It kind of sounds like that, but it's not clear.ssh_timeoutifssh_handshake_attemptsis set (and vice versa)? (if they are not mutually exclusive, of course).This should be clarified in the documentation.
I think that the root cause for my confusion is that the default values are explained with so many conditions. If I have understood things correctly, these are the possible states for the default values:
ssh_timeoutis setssh_handshake_attemptsis setssh_timeoutdefault valuessh_handshake_attemptsdefault valueDoes this table correctly represent all possible states? If so, I see no reason for all the conditionals in explaining the fields' default values. If my table is correct, we can simply say that "the default value for
ssh_timeoutis 5 min and the default value forssh_handshake_attemptsis 10".Use Case(s)
The documentation should be clear on how things works.
Potential References
Originally posted as vmware/packer-plugin-vsphere#289