function that repeatedly check if given port is open, used for determine
if machine is ready for ssh connection
Details
manual testing
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
LGTM, works on a simple rpmlint run on my local machine
libtaskotron/vm.py | ||
---|---|---|
110 | I'm OK with it being like it is for now. To a certain point, configurable is better but this might be a bit on the low-level side. If we find problems with the value or a reason to make it variable, we can make it configurable later. |
As nirik mentioned last week on IRC, unfortunately this might not solve issues with cloud-init. According to him, cloud-init does not block sshd service until it is configured, it often configures it after it has been started. So if this is intended to solve purely socket issue, it's fine, but we will have to have additional re-connection attempts also at the ssh level, until proper user certificate is installed (or maybe we can join both into a single place and retry the connection directly at the ssh level?).
libtaskotron/vm.py | ||
---|---|---|
116 | If would be nice to mention here (probably as DEBUG) what machine:port we're waiting for and for how long. | |
126 | I'd mention all of ipaddr, port and timeout in the error. |
Please add docstring