[rancid] Trouble grabbing configs from a Foundry FesX
Jethro R Binks
jethro.binks at strath.ac.uk
Thu Jul 3 21:05:57 UTC 2014
On Thu, 3 Jul 2014, heasley wrote:
> Thu, Jul 03, 2014 at 08:29:25AM -0700, Scott Baker:
> > On 07/02/2014 06:03 PM, heasley wrote:
> > > Couldn't tell you - debug it. flogin -d ...., see where it's waiting and
> > > why. I do not know of a way to include timestamps in that debugging o/p,
> > > so you'd have to tell us where its waiting. or possibly good enough
> > >
> > > flogin -d ... 2>&1 | while read ln; do echo -n `date +%s`; echo " $ln"; done
> > >
> >
> > Good call, didn't think about doing that. I ended up using ts from
> > moreutils to get the same effect. Looks like flogin uses
> > "skip-page-display" and clogin uses "terminal length 0".
> > Skip-page-display takes 4 seconds to run. The majority of the slowness
> > in flogin appears to be the actual login process. Flogin is taking 20
> > seconds just to get to the enable prompt. Clogin is taking one second.
> > I haven't even started to look at why clogin/ssh works, but flogin/ssh
> > doesn't, which is how this whole thing started.
>
> I couldnt say :) historically, foundry cli and configuration has been
> *awful*. but, you see in your o/p that term length doesn't actually
> work, so it will be paging the o/p, which just makes a mess.
>
> so, complain to the mfg about the speed of the command. or look for PRs
> and subsequently s/w where it is fixed. also, that may not be it; 4s is
> much less than the 90s that francid uses for timeout.
All that may or may not be a valid view :), but doesn't have anything to
do with the problem, which is that the same hardware is faster using
clogin than flogin. The reason appears to be simply that flogin uses a
lot more "send -h" for human-ish speed tping than clogin (now?) does.
Historic reason?
Experimentally, I modified my local flogin (which is roughly similar to
that from v2.3.8) to remove all instances of -h, except where they match
with those in clogin (around "exit" and "quit" it seems). We'll see
tomorrow if that breaks any of my (varied antiquity Foundry/Brocade) kit,
but testing randomly seems OK.
Scott, maybe you'd like to try the same and see how you get on (remove the
"-h" and "-h --" parts where you find them in flogin).
Actually John, while we're at it, while looking at my flogin I found I'd
made this addition in run_comands, which perhaps you'd like to add:
...
send "skip-page-display\r"
expect -re "$prompt" {}
# If logging in as an unpriv user (i.e., level 5 read-only), then
# "skip-page-display" isn't available, unless you also configure:
# privilege exec level 5 skip-page-display
#
# On some platforms, like the MLX, you can work around that
# with this:
send "terminal length 0\r"
expect -re "$prompt" {}
set commands [split $command \;]
...
Jethro.
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
More information about the Rancid-discuss
mailing list