fifthecho / knife-cloudstack-fog

Knife plugin for the Cloudstack cloud
Apache License 2.0
11 stars 7 forks source link

ssh connection / timeout #5

Closed agoddard closed 12 years ago

agoddard commented 12 years ago

When provisioning CS 3.0.1 servers, CS builds the instance and advertises the IP address, but the instance is not yet listening on the IP when the gem tries to do the ssh test, so the client throws a "Network is unreachable - connect(2) (Errno::ENETUNREACH)" during "tcp_socket = TCPSocket.new(hostname, 22)".

I tested by adding a 120 second sleep to tcp_test before the attempt to establish the socket, which worked. Catching the ENETUNREACH and retrying every x seconds might also work

fifthecho commented 12 years ago

I believe I have added better handing of this in 0.2.12. Please let me know if this works better for you.

Thanks.

agoddard commented 12 years ago

Awesome, works great now, thanks!