[rancid] mtlogin error: Error TIMEOUT reached (2.3.8 deb)

heasley heas at shrubbery.net
Thu Mar 26 15:36:21 UTC 2015


Thu, Mar 26, 2015 at 03:13:22PM +0000, Lukasz Sokol:
> > rancid at george:~$ time ~/bin/mtlogin -c "export" myrouter > /dev/null
> > 
> > real	0m48.548s
> > user	0m0.060s
> > sys	0m0.024s
> > 
> > and in test with a stopwatch,
> > 
> > (doing ssh -i my_ident myuser at myrouter, then issuing export by hand)
> > 
> > give or take 36s lag has been encountered
> > after first 8s of running. Give or take because there were a few of them
> > and not exactly sure how to catch...

Does that mean that the actualy run-time for the command was 8s when done
manually?  if so, please try mtlogin from rancid 3.2.

> Looking at run_commands,
> 
> it strikes me, that sending the command, it is allowed to timeout, just like that - 
> 
> but unfortunately :
> 
> - trying to catch the timeout at first and making it go exp_continue instead, doesn't work
> - trying to insert another expect clause in front of the main one, just to catch the timeout, doesn't work
> 
> Looks like this calls for a 'for' loop and checking whether the cause of expect breakout was timeout...

I do not understand.  If you think confident in the issue you are trying to
explain, please try to explain it in a different manner.

I do not have a mikrotik and the code was a contribution, but mtlogin looks
reasonable, though this match is odd:
            -re "^\[^\n\r ]*>>.*$reprompt"      { exp_continue }



More information about the Rancid-discuss mailing list