-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poll remote servers until live. #33
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nitpick, other than that this looks good.
camayoc/tests/remote/conftest.py
Outdated
ping. Keep trying until a connection is made for all servers or the timeout | ||
limit is reached. | ||
""" | ||
from camayoc import cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this import to the top of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually you can add a new item to line 5:
from camayoc import cli, config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops I missed these points on the previous review, can you please update?
camayoc/tests/remote/conftest.py
Outdated
unreached = [host for host in unreached if not is_live(client, host)] | ||
sleep(10) | ||
timeout -= 10 | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return is not needed
client = cli.Client(system) | ||
|
||
unreached = servers | ||
while unreached and timeout > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should happen when the timeout is over and still some unreached hosts?
It takes time between the power on signal is sent to the remote servers and they are available over ssh for rho. These changes make it so servers are polled until they respond or a timeout limit is reached. Closes #28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
Keep trying until a connection is made for all servers or the timeout | ||
limit is reached. | ||
|
||
If the timeout limit is reached, we exit even if there are unreached hosts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@elyezer thanks for the feedback! |
It takes time between the power on signal is sent to the remote servers
and they are available over ssh for rho. These changes make it so
servers are polled until they respond or a timeout limit is reached.
Closes #28