ChameleonCloud / python-chi

Python client for the Chameleon testbed
Apache License 2.0
4 stars 4 forks source link

Fix wait_for_tcp so it eventually unblocks. #29

Closed Mark-Powers closed 2 years ago

Mark-Powers commented 2 years ago

The previous wait time was very short, and I believe it was being detected as port scanning. This increases that time and makes it a kwarg so it is configurable in the event a user needs a short wait time.

I tested this, and it seems to work, OK. It blocked until TCP was available on my node, where before I found this function would stay blocked.

Looking at the code and testing more, I'm not sure why this fixes anything. create_connection has its own timeout, like ~60 seconds, and then the sleep kicks in. Perhaps the firewall was upset that connection was being reopened so soon?