Discussion:
[rancid] Trouble grabbing configs from a Foundry FesX
Scott Baker
2014-07-02 16:41:03 UTC
Permalink
I had Rancid configured and working fine to get the config from my
Foundry FesX for the past three months. We decided to change the login
process from telnet to SSH. Now rancid complains about timeouts when try
and grab the config. CLogin is able to login via SSH no problem. I can
also run a handful of commands just fine:

clogin -t 90 -c"show version;show run" foundry-needy.domain.com

It just complains when I run rancid-run:

starting: Wed Jul 2 09:12:54 PDT 2014



Trying to get all of the configs.
foundry-needy.domain.com: End of run not found 0 || 0
foundry-needy.domain.com flogin error: Error: TIMEOUT reached
foundry-needy.domain.com: missed cmd(s): show chassis,show module,show
flash,show version,show running-config,write term
foundry-needy.domain.com: End of run not found
!
=====================================
Getting missed routers: round 1.
Received signal - ending run (1).
cat: /var/rancid/canby/routers.single: No such file or directory
All routers sucessfully completed.

cat: /var/rancid/canby/routers.single: No such file or directory
Can't open /var/rancid/canby/routers.single: No such file or directory.

If CLogin works, why would rancid complain about a timeout?
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
Alan McKinnon
2014-07-02 18:52:18 UTC
Permalink
Post by Scott Baker
I had Rancid configured and working fine to get the config from my
Foundry FesX for the past three months. We decided to change the login
process from telnet to SSH. Now rancid complains about timeouts when try
and grab the config. CLogin is able to login via SSH no problem. I can
clogin -t 90 -c"show version;show run" foundry-needy.domain.com
starting: Wed Jul 2 09:12:54 PDT 2014
Trying to get all of the configs.
foundry-needy.domain.com: End of run not found 0 || 0
foundry-needy.domain.com flogin error: Error: TIMEOUT reached
foundry-needy.domain.com: missed cmd(s): show chassis,show module,show
flash,show version,show running-config,write term
foundry-needy.domain.com: End of run not found
!
=====================================
Getting missed routers: round 1.
Received signal - ending run (1).
cat: /var/rancid/canby/routers.single: No such file or directory
All routers sucessfully completed.
cat: /var/rancid/canby/routers.single: No such file or directory
Can't open /var/rancid/canby/routers.single: No such file or directory.
If CLogin works, why would rancid complain about a timeout?
you are testing with clogin
but your output clearly shows rancid-run is launching flogin.

It's set in the *rancid script itself (the one referenced in rancid-fe)

I don't have rancid code handy here, but it looks like you have 2 curses
of action:

- fix flogin to work properly with ssh
- edit the rancid parser to use clogin and not flogin
--
Alan McKinnon
***@gmail.com
Jethro R Binks
2014-07-02 20:38:09 UTC
Permalink
Post by Alan McKinnon
Post by Scott Baker
Trying to get all of the configs.
foundry-needy.domain.com: End of run not found 0 || 0
foundry-needy.domain.com flogin error: Error: TIMEOUT reached
foundry-needy.domain.com: missed cmd(s): show chassis,show module,show
flash,show version,show running-config,write term
foundry-needy.domain.com: End of run not found
!
=====================================
Getting missed routers: round 1.
Received signal - ending run (1).
cat: /var/rancid/canby/routers.single: No such file or directory
All routers sucessfully completed.
cat: /var/rancid/canby/routers.single: No such file or directory
Can't open /var/rancid/canby/routers.single: No such file or directory.
If CLogin works, why would rancid complain about a timeout?
you are testing with clogin
but your output clearly shows rancid-run is launching flogin.
It's set in the *rancid script itself (the one referenced in rancid-fe)
I don't have rancid code handy here, but it looks like you have 2 curses
- fix flogin to work properly with ssh
- edit the rancid parser to use clogin and not flogin
flogin is what you want. I have it working fine with ssh on similar
Foundry/Brocade models.

Run something like:

env NOPIPE=YES PATH=${PATH}:/usr/local/libexec/rancid francid -d devicename

(where /usr/local/libexec/rancid is the place your rancid scripts are
located) and see what the .raw logfile says.

The user rancid is logging in as will need to be suitable priviliged. If
it isn't admin privileged, you may need to permit it to run additional
commands at your user level. In my case, I have my rancid user privilege
5, and also then need to configure:

privilege exec level 5 skip-page-display

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.
Alan McKinnon
2014-07-02 20:40:57 UTC
Permalink
Post by Jethro R Binks
Post by Alan McKinnon
Post by Scott Baker
Trying to get all of the configs.
foundry-needy.domain.com: End of run not found 0 || 0
foundry-needy.domain.com flogin error: Error: TIMEOUT reached
foundry-needy.domain.com: missed cmd(s): show chassis,show module,show
flash,show version,show running-config,write term
foundry-needy.domain.com: End of run not found
!
=====================================
Getting missed routers: round 1.
Received signal - ending run (1).
cat: /var/rancid/canby/routers.single: No such file or directory
All routers sucessfully completed.
cat: /var/rancid/canby/routers.single: No such file or directory
Can't open /var/rancid/canby/routers.single: No such file or directory.
If CLogin works, why would rancid complain about a timeout?
you are testing with clogin
but your output clearly shows rancid-run is launching flogin.
It's set in the *rancid script itself (the one referenced in rancid-fe)
I don't have rancid code handy here, but it looks like you have 2 curses
- fix flogin to work properly with ssh
- edit the rancid parser to use clogin and not flogin
flogin is what you want. I have it working fine with ssh on similar
Foundry/Brocade models.
env NOPIPE=YES PATH=${PATH}:/usr/local/libexec/rancid francid -d devicename
(where /usr/local/libexec/rancid is the place your rancid scripts are
located) and see what the .raw logfile says.
The user rancid is logging in as will need to be suitable priviliged. If
it isn't admin privileged, you may need to permit it to run additional
commands at your user level. In my case, I have my rancid user privilege
privilege exec level 5 skip-page-display
I don't have any Foundry kit, but for the benefit of all, why would
clogin work for the OP but flogin not work?
--
Alan McKinnon
***@gmail.com
Scott Baker
2014-07-02 20:55:33 UTC
Permalink
Post by Alan McKinnon
I don't have any Foundry kit, but for the benefit of all, why would
clogin work for the OP but flogin not work?
flogin does work with telnet, but it's REALLY slow. It times out if I
try and use SSH. Just to login and get to an enable prompt seems to take
about 20 seconds.

# Clogin
time /usr/libexec/rancid/clogin -c "show chassis;" foundry-needy.domain.com
7.7 seconds

# flogin
time /usr/libexec/rancid/flogin -c "show chassis;" foundry-needy.domain.com
43.2 seconds!!!

Both using (what I think is) the same ~/.cloginrc
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
heasley
2014-07-03 01:03:28 UTC
Permalink
Post by Scott Baker
Post by Alan McKinnon
I don't have any Foundry kit, but for the benefit of all, why would
clogin work for the OP but flogin not work?
flogin does work with telnet, but it's REALLY slow. It times out if I
try and use SSH. Just to login and get to an enable prompt seems to take
about 20 seconds.
# Clogin
time /usr/libexec/rancid/clogin -c "show chassis;" foundry-needy.domain.com
7.7 seconds
# flogin
time /usr/libexec/rancid/flogin -c "show chassis;" foundry-needy.domain.com
43.2 seconds!!!
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
Post by Scott Baker
Both using (what I think is) the same ~/.cloginrc
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Scott Baker
2014-07-03 15:29:25 UTC
Permalink
Post by heasley
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.

***@green(~)
:time /usr/libexec/rancid/flogin -c "show run" foundry-needy.domain.com
2>&1 | ts
Jul 03 08:23:11 foundry-needy.domain.com
Jul 03 08:23:11 spawn telnet foundry-needy.domain.com
Jul 03 08:23:11 Trying 10.3.1.251...
Jul 03 08:23:11 Connected to foundry-needy.domain.com.
Jul 03 08:23:11 Escape character is '^]'.
Jul 03 08:23:11
Jul 03 08:23:11 User Access Verification
Jul 03 08:23:11
Jul 03 08:23:15 Please Enter Password:
Jul 03 08:23:15
Jul 03 08:23:15 User login successful.
Jul 03 08:23:15
Jul 03 08:23:22 BR-***@FESX-Needy>enable
Jul 03 08:23:31 Password:
Jul 03 08:23:31 BR-***@FESX-Needy#
Jul 03 08:23:43 BR-***@FESX-Needy#skip-page-display
Jul 03 08:23:43 Disable page display mode
Jul 03 08:23:47 BR-***@FESX-Needy#show run
Jul 03 08:23:47 Current configuration:
Jul 03 08:23:47 !

[Snipped]

Jul 03 08:23:47 !
Jul 03 08:23:47 end
Jul 03 08:23:47
Jul 03 08:23:49 BR-***@FESX-Needy#exit
Jul 03 08:23:53 BR-***@FESX-Needy>exit
Jul 03 08:23:53 Connection closed by foreign host.

real 0m42.563s
user 0m0.048s
sys 0m0.031s

----------------------------------------------------------------------

***@green(~)
:time /usr/libexec/rancid/clogin -c "show run" foundry-needy.domain.com
2>&1 | ts
Jul 03 08:24:37 foundry-needy.domain.com
Jul 03 08:24:37 spawn telnet foundry-needy.domain.com
Jul 03 08:24:37 Trying 10.3.1.251...
Jul 03 08:24:37 Connected to foundry-needy.domain.com.
Jul 03 08:24:37 Escape character is '^]'.
Jul 03 08:24:37
Jul 03 08:24:37 User Access Verification
Jul 03 08:24:37
Jul 03 08:24:38 Please Enter Password:
Jul 03 08:24:38
Jul 03 08:24:38 User login successful.
Jul 03 08:24:38
Jul 03 08:24:38 BR-***@FESX-Needy>enable
Jul 03 08:24:38 Password:
Jul 03 08:24:38 BR-***@FESX-Needy#
Jul 03 08:24:38 BR-***@FESX-Needy#terminal length 0
Jul 03 08:24:38 Invalid input -> length 0
Jul 03 08:24:38 Type ? for a list
Jul 03 08:24:38 BR-***@FESX-Needy#show run
Jul 03 08:24:39 Current configuration:

[Snipped]

Jul 03 08:24:39 end
Jul 03 08:24:39
Jul 03 08:24:40 BR-***@FESX-Needy#exit
Jul 03 08:24:42 BR-***@FESX-Needy>exit
Jul 03 08:24:42 Connection closed by foreign host.

real 0m5.713s
user 0m0.061s
sys 0m0.023s
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
heasley
2014-07-03 16:02:45 UTC
Permalink
Post by Scott Baker
Post by heasley
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.

on to the ssh problem, use -t 180 to debug and see where it is failing. the
full collection commands are (francid -C):

flogin -t 180 -c 'show version;show chassis;show module;show flash;write term;show running-config' hostname
Scott Baker
2014-07-03 16:09:21 UTC
Permalink
Post by heasley
flogin -t 180 -c 'show version;show chassis;show module;show flash;write term;show running-config' hostname
Looks like it times out waiting for the prompt? Maybe the regexp doesn't
match it?

***@green(~)
:time /usr/libexec/rancid/flogin -t 30 -c "show version;show
chassis;show module;show flash;write term;show running-config"
foundry-needy.domain.com 2>&1 | ts
Jul 03 09:05:55 foundry-needy.domain.com
Jul 03 09:05:55 spawn ssh -c 3des -x -l root foundry-needy.domain.com
Jul 03 09:06:02 ***@foundry-needy.domain.com's password:
Jul 03 09:06:32 BR-***@FESX-Needy#
Jul 03 09:06:32 Error: TIMEOUT reached

I noticed the telnet prompt and the ssh prompt are different?

BR-***@FESX-Needy#

vs

BR-***@FESX-Needy#

But that seems pretty minor.
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
heasley
2014-07-03 16:17:31 UTC
Permalink
it should be fine; is it auto-enabling but you dont have autoenable set in
cloginrc? or try flogin with -autoenable. else show me flogin -d host o/p.
Aha that was it... if I pass flogin -autoenable it works fine. I've
never had to specify this for my other hosts. Other hosts are Cisco, so
maybe that's the difference?
clogin has morphed to try to be more accomodating to the enable/autoenable
thing. we'd like to eventually remove that altogether, eventually.
How do I specify that in my .cloginrc?
see cloginrc(5) manpage
Jethro R Binks
2014-07-03 21:05:57 UTC
Permalink
Post by heasley
Post by Scott Baker
Post by heasley
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.
heasley
2014-07-03 21:22:28 UTC
Permalink
Post by Jethro R Binks
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.
you may have missed that clogin actually doesnt work for him per-se. term
length 0 on the box he has does not work, so it skips that altogether and
the pager will appear in the longer command output. but ...
Post by Jethro R Binks
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?
you may be onto something there, but i doubt it'd amount to much. it
just affects sends, which is limited and the timeout is on reads. his
box may just be slow.

I do not recall why -h was used more heavily in flogin.
Post by Jethro R Binks
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).
do not remove the --'s, that has nothing to do with -h.
Post by Jethro R Binks
Actually John, while we're at it, while looking at my flogin I found I'd
...
send "skip-page-display\r"
expect -re "$prompt" {}
would you rework that to only send term length 0 if skip-page fails?
Post by Jethro R Binks
# If logging in as an unpriv user (i.e., level 5 read-only), then
# privilege exec level 5 skip-page-display
#
# On some platforms, like the MLX, you can work around that
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.
Scott Baker
2014-07-03 21:30:32 UTC
Permalink
Post by heasley
you may have missed that clogin actually doesnt work for him per-se. term
length 0 on the box he has does not work, so it skips that altogether and
the pager will appear in the longer command output. but ...
terminal length 0

DOES work on Foundry boxes. The ones I have at least.
--
Scott Baker - Canby Telcom
Senior System Administrator - RHCE
heasley
2014-07-03 21:34:16 UTC
Permalink
Post by Scott Baker
Post by heasley
you may have missed that clogin actually doesnt work for him per-se. term
length 0 on the box he has does not work, so it skips that altogether and
the pager will appear in the longer command output. but ...
terminal length 0
DOES work on Foundry boxes. The ones I have at least.
it didnt in the transcript that you sent. so your box must also have it
or not based on privilege level.
Jethro R Binks
2014-07-03 21:48:07 UTC
Permalink
Post by heasley
Post by Jethro R Binks
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.
you may have missed that clogin actually doesnt work for him per-se.
term length 0 on the box he has does not work, so it skips that
altogether and the pager will appear in the longer command output. but
...
I was looking specifically at the timings of the sending of password and
skip-page-display, regardless of whatever happens after that:

Jul 03 08:23:11
Jul 03 08:23:15 Please Enter Password:
Jul 03 08:23:15
Jul 03 08:23:15 User login successful.
Jul 03 08:23:15
Jul 03 08:23:22 BR-***@FESX-Needy>enable
Jul 03 08:23:31 Password:
Jul 03 08:23:31 BR-***@FESX-Needy#
Jul 03 08:23:43 BR-***@FESX-Needy#skip-page-display
Jul 03 08:23:43 Disable page display mode
Jul 03 08:23:47 BR-***@FESX-Needy#show run
Jul 03 08:23:47 Current configuration:

Not familiar with ts from moreutils, but my reading of the above is that
line:

Jul 03 08:23:22 BR-***@FESX-Needy>enable

is issued after "enable" has been (slowly) sent and the whole line echoed
once complete for timestamping. Same for:

Jul 03 08:23:43 BR-***@FESX-Needy#skip-page-display

which is 12 seconds after the previous line: echoed after all those
characters have been slowly sent.
Post by heasley
Post by Jethro R Binks
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?
you may be onto something there, but i doubt it'd amount to much. it
just affects sends, which is limited and the timeout is on reads. his
box may just be slow.
I see you are rewinding back to the original report about timeouts with
clogin after changing to ssh from telnet; using flogin was slow. If we
can get rid of the flogin slow but, whatever goes wrong when using clogin
is irrelevant.

Well anyway, I do know that throwing the -h away makes flogin about as
fast as clogin for me. So if that solves Scott's problem and doesn't
introduce another then that's good enough for me :).

Scott:

Jul 03 08:24:38 BR-***@FESX-Needy#terminal length 0
Jul 03 08:24:38 Invalid input -> length 0

suggests "terminal length 0" doesn't work for you here. I don't see it
working on various of my older boxes; does on MLX though.
Post by heasley
I do not recall why -h was used more heavily in flogin.
Post by Jethro R Binks
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).
do not remove the --'s, that has nothing to do with -h.
Why does clogin not need them in the places that flogin apparently does
(with "-h")?
Post by heasley
Post by Jethro R Binks
Actually John, while we're at it, while looking at my flogin I found I'd
...
send "skip-page-display\r"
expect -re "$prompt" {}
would you rework that to only send term length 0 if skip-page fails?
That would be sensible. I obviously just hacked this in at some point!

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.
heasley
2014-07-03 22:03:34 UTC
Permalink
Post by Jethro R Binks
Post by heasley
I do not recall why -h was used more heavily in flogin.
Post by Jethro R Binks
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).
do not remove the --'s, that has nothing to do with -h.
Why does clogin not need them in the places that flogin apparently does
(with "-h")?
they were added to clogin because some boxes were echo'g strangely and in
some cases would drop chars at the end of a line. slowing it down, made
it behave more often than not. but, what i mean there is the actual --
part, not the -h.

as for its heavier use in flogin, i do not recall and its not in the commit
log, so I do not know. so, it could be removed, worth experimentation, but
might break collection of some boxes.

the values of send_human can be adjusted too,
current: {.4 .4 .7 .3 5}

perhaps: {.2 .3 5 .2 3}
Roman Hochuli
2014-07-09 09:01:43 UTC
Permalink
This post might be inappropriate. Click to display it.
Jethro R Binks
2014-07-09 10:50:12 UTC
Permalink
That all sounds very plausible.

So, -h may be required at least for some Brocade hardware, but at the cost
of making the whole flogin session take longer (in comparison with
clogin).

Thanks for the additional info,

Jethro.
Post by Roman Hochuli
Hello All
Post by heasley
they were added to clogin because some boxes were echo'g strangely and in
some cases would drop chars at the end of a line. slowing it down, made
it behave more often than not. but, what i mean there is the actual --
part, not the -h.
We've got quite a bunch of those boxes. It is well known to us that for
example copy-pasting config snippets is not handled nicely under certain
circumstances on the FESX. The keyboard-buffer of the telnet-session
seems to be extremly limited.
Depending on config-mode and preceding command it may be completely
disabled, sometimes even ignoring or blocking input at all. Those
behaviours are bascially undocumented, but seem to be by-design.
The keyboard buffer issue is even worse with ssh. My rough guess for the
root of that problem is, that the management-cpu is simply overloaded
with calculating the encryption of the ssh-session. There were high-cpu
situation where we were unable to access the device over ssh at all
while telnet still worked (reasonably slow).
To be fair: the FESX6-series devices seem to behave a lot better than
the original FESX4-series devices. Newer firmware is also helping to
solve the keyboard-buffer issue at certain points.
So bottom-line: there are certainly reasons for slowing down command
input on that platform. :)
--
Best regards,
Roman Hochuli
Operations Manager
nexellent ag
Saegereistrasse 33
CH-8152 Glattbrugg
Phone: +41 44 872 20 00
Fax: +41 44 872 20 01
URL: www.nexellent.ch
X-NCC-RegID: ch.nexellent
Imagination is the one weapon in the war
against reality.
-- Jules de Gaultier
. . . . . . . . . . . . . . . . . . . . . . . . .
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.
heasley
2014-07-09 14:32:33 UTC
Permalink
Post by Jethro R Binks
That all sounds very plausible.
So, -h may be required at least for some Brocade hardware, but at the cost
of making the whole flogin session take longer (in comparison with
clogin).
try it with the send_human values that i suggested in the previous emails.
I have no manner of testing brocade/foundry; one reason that we stopped
buying them was because of their cli, and when we asked them to fix the
bugs, they told us that users were accustomed to the bugs.
Post by Jethro R Binks
the values of send_human can be adjusted too,
current: {.4 .4 .7 .3 5}
perhaps: {.2 .3 5 .2 3}
Jethro R Binks
2014-07-02 20:56:27 UTC
Permalink
Post by Alan McKinnon
I don't have any Foundry kit, but for the benefit of all, why would
clogin work for the OP but flogin not work?
Because the login process is similar enough to match the regexps?

Actually, for most of my F kit, the login prompt is:

Please Enter Login Name:

and that doesn't match with the clogin I have. However, I have one device
that happens to be just protected with a password rather than a
username/pass:

/usr/local/libexec/rancid/clogin ip.ad.re.ss
spawn telnet ip.ad.re.ss
Trying ip.ad.re.ss...
Won't send login name and/or authentication information.
Connected to ip.ad.re.ss
Escape character is '^]'.

User Access Verification

Please Enter Password:

User login successful.


so in at least that circumstance, they are similar enough. Of course it
all breaks if rancid starts sending cisco-esque commands rather than
foundry-esque ones.

clogin itself works with quite a lot of stuff that roughly looks
cisco-ish, as they all tend to have a Username/Password prompt that
matches the fairly generous clogin regexp, and tend to have a CLI prompt
that ends with '>'. It all goes wrong afterwards ...

(I do think it a source of confusion for the newcomer that 'rancid' the
project now supports many types of device, but while in v2 the Cisco login
script is clogin, the Cisco command script is not crancid, but just plain
rancid - all the rest have a matching prefix for the *login and *rancid
scripts afaicr).

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.
Alan McKinnon
2014-07-02 21:27:14 UTC
Permalink
Post by Jethro R Binks
(I do think it a source of confusion for the newcomer that 'rancid' the
project now supports many types of device, but while in v2 the Cisco login
script is clogin, the Cisco command script is not crancid, but just plain
rancid - all the rest have a matching prefix for the *login and *rancid
scripts afaicr).
Agreed. I've lost count of the number of times I've explained to folks
how the odd naming convention came about over time :-)
--
Alan McKinnon
***@gmail.com
Loading...