[rancid] force10 S-50 support in rancid
Colin Corbett
rancid at congiman.com
Thu Mar 16 21:52:52 UTC 2006
Hey folks,
first time posting so go easy. (I looked in the archives and didnt see
this covered).
I had a devil of a time getting rancid (2.3.1) to work with the force10
S-50 (running rev 2.3.1). (code rev is a strange co-incidence).
problems encountered:
1: when telnetting/sshing in, the S-50 may miss various bits of the enable
password. (if its a 10 character password, some characters in the middle
get munged.)
Ideal fix: have force10 figure this out and ensure that they do not miss
characters when enabling (ticket opened)
Possible rancid fix: create a loop in clogin to ensure that for each
character sent a "*" is received.
my hack was to modify clogin:
<HACK>-----Do not do this-----
-re "$e_prompt" { send "X";sleep 1;send "X"; sleep 1;send "X";
sleep 1; send "X"; sleep 1; send "\r"; exp_continue}
----</HACK>
(this was truly horrible.)
2: in the rancid-force10: I added:
next if (/^!Current Configuration\s*:/i);
(as thats how the current config starts)
3: Rancid cannot tell where the end of the config is as the force10 doesnt
say when the end is.
Ideal fix: have force 10 delimit the end of the config
Possible rancid fix: Determine what the prompt is, and look for that as
matching.
My hack: look for something near the end of the config and match that as
the end.
if (/^tacacs-server host/) {
4: the S-50 expects "logout" to actually log you out (not exit).
Possible rancid fix, add this as another "if" platform compare to clogin.
My hack into clogin:
if { [ string compare "force10" "$platform" ] } {
send "logout\r"
} else {
send "quit\r"
}
4a: There is still something missing in the above, as the S-50 may prompt
you if there are unsaved changes:
The system has unsaved changes.
Would you like to save them now? (y/n)
(I didnt build logic in for this).
Hopefully theres a skilled perl person that can build some of this into
the next rev, and worst case, maybe theres someone
with an S-50 that will get some value from this.
Also, I got rid of most of the commands that rancid does, as the S50 (L2)
supports only a few of the commands:
%commands=(
'show version' => "ShowVersion",
'dir nvram' => "DirSlotN",
'show vlan' => "ShowVLAN",
'show running' => "WriteTerm"
);
note: I have no idea how my changes may affect the E series Force10 boxes,
as I'm only trying to make this work on the S
series (I dont have any E series). If you have both, maybe you want to
make 2 different setups?
--C
p.s. apologies if this shows up as a double post. (I posted from the wrong
source address the first attempt (so it might be queued).
More information about the Rancid-discuss
mailing list