Discussion:
[rancid] Extreme Issue
Peder
2009-10-29 16:48:11 UTC
Permalink
I am having an issue getting RANCID to pull down my Extreme configs from
Summit 200's. I've seen several posts where others have had the same issue,
but I haven't really seen a solution. I am using local accounts on the
Extreme (I tried my username and admin and they both have the same issue).
I can ping and telnet to the extreme from the RANCID box, but it will just
not grab the configs. The logs just show "missed commands" and the devices
show in the "up" file. I am trying to pull configs from two switches and
they both have the same issue. I've tried this:

./clogin -c "show configuration detail" 192.168.1.2

It logs in, grabs the config and then just sits there. It never closes the
connection. If I do the same thing from a Cisco switch that I have, it goes
all the way thru and closes the connection just fine.


If I do ./clogin -d 192.168.1.2, I get this (I cut off some of the beginning
debugs as I don't think it is relevant because you can see that it actually
does get logged in and then just sits there):

expect: set expect_out(0,string) "#"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " \r\n\r\n\r\nExtremeware\r\nCopyright (C)
1996-2004 Extreme Networks. All rights
reserved.\r\n===============================================================
\r\n\r\nPress the <tab> key at any time for completions.\r\nRemember to save
your configuration changes.\r\nS200-B:1 #"
send: sending "\r" to { exp4 }

expect: does " " (spawn_id exp4) match regular expression "[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? no
"^.+(#| \(enable\))"? no

S200-B:1 #
expect: does " \r\nS200-B:1 # " (spawn_id exp4) match regular expression
"[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " \r\n"
expect: continuing expect

expect: does "S200-B:1 # " (spawn_id exp4) match regular expression
"[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? yes
expect: set expect_out(0,string) "S200-B:1 #"
expect: set expect_out(1,string) "S200-B:"
expect: set expect_out(2,string) "#"
expect: set expect_out(3,string) "#"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "S200-B:1 #"
tty_raw_noecho: was raw = 0 echo = 1



Any ideas?

Peder
john heasley
2009-11-02 21:24:39 UTC
Permalink
Post by Peder
I am having an issue getting RANCID to pull down my Extreme configs from
Summit 200's. I've seen several posts where others have had the same issue,
but I haven't really seen a solution. I am using local accounts on the
Extreme (I tried my username and admin and they both have the same issue).
I can ping and telnet to the extreme from the RANCID box, but it will just
not grab the configs. The logs just show "missed commands" and the devices
show in the "up" file. I am trying to pull configs from two switches and
./clogin -c "show configuration detail" 192.168.1.2
It logs in, grabs the config and then just sits there. It never closes the
connection. If I do the same thing from a Cisco switch that I have, it goes
all the way thru and closes the connection just fine.
you'll have to re-run this clogin with -d and collect the debug info
near the end of the configuration dump to the hang point. also, include
your host o/s info.
Post by Peder
If I do ./clogin -d 192.168.1.2, I get this (I cut off some of the beginning
debugs as I don't think it is relevant because you can see that it actually
expect: set expect_out(0,string) "#"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " \r\n\r\n\r\nExtremeware\r\nCopyright (C)
1996-2004 Extreme Networks. All rights
reserved.\r\n===============================================================
\r\n\r\nPress the <tab> key at any time for completions.\r\nRemember to save
your configuration changes.\r\nS200-B:1 #"
send: sending "\r" to { exp4 }
expect: does " " (spawn_id exp4) match regular expression "[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? no
"^.+(#| \(enable\))"? no
S200-B:1 #
expect: does " \r\nS200-B:1 # " (spawn_id exp4) match regular expression
"[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " \r\n"
expect: continuing expect
expect: does "S200-B:1 # " (spawn_id exp4) match regular expression
"[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? yes
expect: set expect_out(0,string) "S200-B:1 #"
expect: set expect_out(1,string) "S200-B:"
expect: set expect_out(2,string) "#"
expect: set expect_out(3,string) "#"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "S200-B:1 #"
tty_raw_noecho: was raw = 0 echo = 1
Any ideas?
Peder
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Peder
2009-11-02 21:39:07 UTC
Permalink
It is an old Trustix Linux box. It works fine for Cisco routers, switches,
PIX's and Juniper routers, it is just Extreme switches that fail. It shows
the devices as up in routers.up, it just appears to hang when it tries to
pull down the config. Here is the tail of this command:

./clogin -d -c "show configuration detail" 206.190.240.2


expect: does "config cpu-dos-protect port 25 alert-threshold 150
interval-time 1\r\nconfig cpu-dos-protect port 26 alert-threshold 150
interval-time 1\r\n# Enhanced-dos-protect configuration\r\ndisable
enhanced-dos-protect ipfdb\r\ndisable enhanced-dos-protect
rate-limit\r\n\r\n#\r\n# End of configuration file for
"S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "config cpu-dos-protect port 25
alert-threshold 150 interval-time 1\r\n"
config cpu-dos-protect port 25 alert-threshold 150 interval-time 1
expect: continuing expect

expect: does "config cpu-dos-protect port 26 alert-threshold 150
interval-time 1\r\n# Enhanced-dos-protect configuration\r\ndisable
enhanced-dos-protect ipfdb\r\ndisable enhanced-dos-protect
rate-limit\r\n\r\n#\r\n# End of configuration file for
"S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "config cpu-dos-protect port 26
alert-threshold 150 interval-time 1\r\n"
config cpu-dos-protect port 26 alert-threshold 150 interval-time 1
expect: continuing expect

expect: does "# Enhanced-dos-protect configuration\r\ndisable
enhanced-dos-protect ipfdb\r\ndisable enhanced-dos-protect
rate-limit\r\n\r\n#\r\n# End of configuration file for
"S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "# Enhanced-dos-protect configuration\r\n"
# Enhanced-dos-protect configuration
expect: continuing expect

expect: does "disable enhanced-dos-protect ipfdb\r\ndisable
enhanced-dos-protect rate-limit\r\n\r\n#\r\n# End of configuration file for
"S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "disable enhanced-dos-protect ipfdb\r\n"
disable enhanced-dos-protect ipfdb
expect: continuing expect

expect: does "disable enhanced-dos-protect rate-limit\r\n\r\n#\r\n# End of
configuration file for "S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match
regular expression "\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "disable enhanced-dos-protect
rate-limit\r\n\r\n"
disable enhanced-dos-protect rate-limit

expect: continuing expect

expect: does "#\r\n# End of configuration file for
"S200-B".\r\n#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "#\r\n"
#
expect: continuing expect

expect: does "# End of configuration file for "S200-B".\r\n#\r\nS200-B:2 # "
(spawn_id exp4) match regular expression "\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "# End of configuration file for
"S200-B".\r\n"
# End of configuration file for "S200-B".
expect: continuing expect

expect: does "#\r\nS200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "#\r\n"
#
expect: continuing expect

expect: does "S200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? no
"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? no
"^ *--More--[^\n\r]*"? no
"^<-+ More -+>[^\n\r]*"? no
john heasley
2009-11-02 21:46:07 UTC
Permalink
Post by Peder
expect: does "S200-B:2 # " (spawn_id exp4) match regular expression
"\u0008+"? no
"^[^\n\r *]*.? ?S200-B:\[0-9\]+ #"? no
"^[^\n\r]*.? ?S200-B:\[0-9\]+ #."? no
"^--More--[\r\n]+"? no
"[\n\r]+"? no
"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? no
"^ *--More--[^\n\r]*"? no
"^<-+ More -+>[^\n\r]*"? no
your expect is broken. the 2nd or 3rd regex above should have matched.
Also, it should not hang. even with this regex failure, it should
eventually timeout.

we've seen it before that timing (target or network speed) affect expect/tcl.
Loading...