[ 
https://issues.apache.org/jira/browse/LIBCLOUD-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278998#comment-13278998
 ] 

Jay Doane commented on LIBCLOUD-197:
------------------------------------

I was seeing the pegged CPU behavior when I accidentally was trying to connect 
using ssh keys when I should have been using password.  I admit that it was not 
a normal use case, but potential tight loops without sleep seem like a bad 
idea, IMO.
                
> Add time.sleep(wait_period) to _ssh_client_connect()
> ----------------------------------------------------
>
>                 Key: LIBCLOUD-197
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-197
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Compute
>            Reporter: Jay Doane
>            Priority: Minor
>         Attachments: ssh-client-connect-wait-period.diff
>
>
> In the event that the client cannot connect, it will run in a tight loop, 
> needlessly using CPU cycles until it finally connects or times out.
> This patch puts a wait period in the loop, similar to what is done in 
> _wait_until_running(). It also exposes a wait_period parameter in the 
> function arguments.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to