[rancid] Problems with clogin and Extreme XOS
Tore Anderson
tore at linpro.no
Thu Mar 16 10:10:01 UTC 2006
Hi. I'm having some issues using RANCID (v2.3.2a3) with some switches
running Extreme XOS (version 11.3.3.7). My ~/.cloginrc looks as
follows:
add password * passwordhere
add user * admin
add passprompt * "password"
add method * ssh
add autoenable * 1
First, a minor issue. When I run clogin with the -c argument, it
seems to insist on first running the command "term length 0", which
isn't available in XOS. The supplied command is afterwards run without
any problems, even if the output would normally cause paging. (The XOS
command for disabling the pager for one session only is "disable
clipaging").
A bigger problem, is that the prompt changes when the configuration is
unsaved - the string "* " is prepended. RANCID is appararantly unable
to cope with this:
tore at echo :) clogin -c "show version" cs0-hmg9.int
cs0-hmg9.int
spawn ssh -c 3des -x -l admin cs0-hmg9.int
Keyboard-interactive authentication
Enter password for admin:
ExtremeWare XOS
Copyright (C) 2000-2005 Extreme Networks. All rights reserved.
Protected by US Patent Nos: 6,678,248; 6,104,700; 6,766,482; 6,618,388; 6,034,957; 6,859,438.
==============================================================================
Press the <tab> or '?' key at any time for completions.
Remember to save your configuration changes.
* cs0.hmg9.no.linpro.net.1 #
* cs0.hmg9.no.linpro.net.1 # couldn't compile regular expression pattern: quantifier operand invalid
while executing
"expect -nobrace -re {* cs0.hmg9.no.([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {} -re {[
]+} { exp_continue }"
invoked from within
"expect {
-re $reprompt {}
-re "\[\n\r]+" { exp_continue }
}"
(procedure "run_commands" line 23)
invoked from within
"run_commands $prompt $command"
("foreach" body line 145)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
send_user "$router\n"
# Figure out the prompt.
# autoenabl..."
(file "/stat/home0/tore/local/bin/clogin" line 686)
tore at echo :(
It is also impossible to run a command which changes the config and
thus the prompt:
tore at echo :) clogin -c "configure vlan Adm name SomethingElse; sh ver" cs0-hmg9.int
cs0-hmg9.int
spawn ssh -c 3des -x -l admin cs0-hmg9.int
Keyboard-interactive authentication
Enter password for admin:
ExtremeWare XOS
Copyright (C) 2000-2005 Extreme Networks. All rights reserved.
Protected by US Patent Nos: 6,678,248; 6,104,700; 6,766,482; 6,618,388; 6,034,957; 6,859,438.
==============================================================================
Press the <tab> or '?' key at any time for completions.
Remember to save your configuration changes.
cs0.hmg9.no.linpro.net.1 #
cs0.hmg9.no.linpro.net.1 # term length 0
^
%% Invalid input detected at '^' marker.
cs0.hmg9.no.linpro.net.2 # configure vlan Adm name SomethingElse
* cs0.hmg9.no.linpro.net.3 #
Error: TIMEOUT reached
tore at echo :)
Had I run "sh ver; sh ver" instead, it would have run both command and
successfully logged out of the script. Side note, shouldn't clogin
return unsuccessfully when such a timeout error occur?
I have also a few more low-end Extreme switches running ExtremeWare
7.4. Their prompt behaves just like in XOS, yet they work flawlessly
with RANCID. I don't really know expect, but reading the source code
of clogin I see that there appears to be a variable named "platform"
that gets the value "extreme" in some cases. I do not think that is
correctly set on a switch running XOS. However, there seems to be
another problem - when I explicitly change the variable to be "extreme"
in all cases, it still bombs out when the prompt indicating unsaved
configuration is shown, and it also hangs after having run the (first)
command:
tore at echo :) clogin -c "sh ver; sh ver" cs1-hmg9.int
cs1-hmg9.int
sterm length 0pawn ssh -c 3des -x -l admin cs1-hmg9.int
Keyboard-interactive authentication
Enter password for admin:
ExtremeWare XOS
Copyright (C) 2000-2005 Extreme Networks. All rights reserved.
Protected by US Patent Nos: 6,678,248; 6,104,700; 6,766,482; 6,618,388; 6,034,957; 6,859,438.
==============================================================================
Press the <tab> or '?' key at any time for completions.
Remember to save your configuration changes.
cs1.hmg9.no.linpro.net.1 #
cs1.hmg9.no.linpro.net.1 # sh ver
Switch : 800143-00-04 0547G-00763 Rev 4.0 BootROM: 1.0.0.9 IMG: 11.3.3.7
XGM-2xn-1 :
Image : ExtremeWare XOS version 11.3.3.7 v1133b7 by release-manager
on Thu Feb 9 11:58:36 PST 2006
BootROM : 1.0.0.9
Error: TIMEOUT reached
tore at echo :)
(Note that it doesn't attempt to run "term length 0" any longer.)
Any suggestions?
Kind regards
--
Tore Anderson
More information about the Rancid-discuss
mailing list