I'm having exactly this problem today. The script already takes 2 minutes 
to run so I am loathe to add more time to a wait, and at some point that 
will be insufficient again.

It would be nice to have a wait that specifically checks to make sure a ssh 
connection works instead of depending on a port check only.

-scott

On Wednesday, April 9, 2014 11:44:30 AM UTC-4, anatoly techtonik wrote:
>
> Port is open, but SSH agent is not ready to receive traffic. 
>
> pause: seconds=5 command already was there, doesn't help. 
> increasing to 30 sometimes helps and sometimes not - depending 
> on the load on virtual machine. I hoped that there is a way to set 
> flexible wait time from 30 seconds up to 15 minutes. Setting pause 
> to 15 minutes will annoy humans and to 30 seconds will likely to 
> break automation at some point. 
>
> On Wed, Apr 9, 2014 at 5:12 PM, Michael DeHaan 
> <[email protected]<javascript:>> 
> wrote: 
> > Sounds like the port was open but the SSH agent wasn't ready to receive 
> > traffic yet. 
> > 
> > I'd suggest inserting a small call to "pause: seconds=5" after the 
> wait_for 
> > and see if that resolves the issue. 
> > 
> > It usually does. 
> > 
> > 
> > 
> > 
> > On Tue, Apr 8, 2014 at 11:49 PM, anatoly techtonik 
> > <[email protected]<javascript:>> 
>
> > wrote: 
> >> 
> >> I also tried this one - doesn't work. 
> >> 
> >>   - name: waiting for machine to come back 
> >>     local_action: wait_for host={{ ansible_ssh_host }} port={{ 
> >> ansible_ssh_port }} delay=30 timeout=180 
> >> 
> >>   #- pause: seconds=5 
> >> 
> >>   - command: echo "X" 
> >>     register: status 
> >>     ignore_errors: True 
> >>     until: status != "X" 
> >>     retries: 5 
> >>     delay: 10 
> >> 
> >> Same  {'msg': 'FAILED: Error reading SSH protocol banner', 'failed': 
> True} 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "Ansible Project" group. 
> >> To unsubscribe from this group and stop receiving emails from it, send 
> an 
> >> email to [email protected] <javascript:>. 
> >> To post to this group, send email to 
> >> [email protected]<javascript:>. 
>
> >> To view this discussion on the web visit 
> >> 
> https://groups.google.com/d/msgid/ansible-project/211f6dc8-d158-4b49-8c39-2da969404319%40googlegroups.com.
>  
>
> >> 
> >> For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "Ansible Project" group. 
> > To unsubscribe from this topic, visit 
> > 
> https://groups.google.com/d/topic/ansible-project/z9uaC4F_L0Y/unsubscribe. 
>
> > To unsubscribe from this group and all its topics, send an email to 
> > [email protected] <javascript:>. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/CAEVJ8QN_LjqZB_J6Kesko5kcpD7c3tenksg3fV8hXTCoLNDkQQ%40mail.gmail.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> anatoly t. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/93f7b4c1-0fd1-4152-a0ea-7c03a784da2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to