Discussion:
[rancid] Cisco 9124 SAN Switch
M***@csiro.au
2008-03-03 10:45:07 UTC
Permalink
Hi,

I'm trying to use rancid on a Cisco MDS 9124 SAN switch running SAN-OS
ver 3.1(3a). Initially I had a problem with the WriteTerm subroutine of
the rancid script not recognising when the "end of config" had been
reached. By making a change similar to that for the ContentEngine, I
got past that problem (happy to post diffs if there's any interest). Now
I regularly get emails that the config has changed because the order of
some of the output lines changes (below - the "callhome" line flips
about). Has anyone on the list got a Cisco SAN switch working with
rancid?

Thanks,

Mark Favas


no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10

fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@

fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af

+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2
Lance Vermilion
2008-03-03 15:12:27 UTC
Permalink
Here is how it has been done in the past. Refer to this thread.

http://www.shrubbery.net/pipermail/rancid-discuss/2006-June/001542.html

Modifying control_rancid with this line might solve your issue.

--ignore-matching-lines='^callhome$'

cvs -f diff -U 4 --ignore-matching-lines='^callhome$' | sed -e '/^RCS
file: /d' -e '/^--- /d' -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /'
$TMP.diff
Similar solution is in this thread too.
http://www.shrubbery.net/pipermail/rancid-discuss/2006-May/001503.html

Note I have not verified this is possible with any version of rancid,
just sharing what others have shared in the past.

-Lance
Hi,
I'm trying to use rancid on a Cisco MDS 9124 SAN switch running SAN-OS ver
3.1(3a). Initially I had a problem with the WriteTerm subroutine of the
rancid script not recognising when the "end of config" had been reached. By
making a change similar to that for the ContentEngine, I got past that
problem (happy to post diffs if there's any interest). Now I regularly get
emails that the config has changed because the order of some of the output
lines changes (below - the "callhome" line flips about). Has anyone on the
list got a Cisco SAN switch working with rancid?
Thanks,
Mark Favas
no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10
fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@
fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af
+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Eric Cables
2008-03-03 21:11:20 UTC
Permalink
It would be nice if a future RANCID release included ignore options in the
rancid.conf file, or by some other intuitive means.

Is this a possibility?
Post by Lance Vermilion
Here is how it has been done in the past. Refer to this thread.
http://www.shrubbery.net/pipermail/rancid-discuss/2006-June/001542.html
Modifying control_rancid with this line might solve your issue.
--ignore-matching-lines='^callhome$'
cvs -f diff -U 4 --ignore-matching-lines='^callhome$' | sed -e '/^RCS
file: /d' -e '/^--- /d' -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /'
$TMP.diff
Similar solution is in this thread too.
http://www.shrubbery.net/pipermail/rancid-discuss/2006-May/001503.html
Note I have not verified this is possible with any version of rancid,
just sharing what others have shared in the past.
-Lance
Hi,
I'm trying to use rancid on a Cisco MDS 9124 SAN switch running SAN-OS
ver
3.1(3a). Initially I had a problem with the WriteTerm subroutine of the
rancid script not recognising when the "end of config" had been reached.
By
making a change similar to that for the ContentEngine, I got past that
problem (happy to post diffs if there's any interest). Now I regularly
get
emails that the config has changed because the order of some of the
output
lines changes (below - the "callhome" line flips about). Has anyone on
the
list got a Cisco SAN switch working with rancid?
Thanks,
Mark Favas
no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10
fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@
fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af
+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Eric Cables
john heasley
2008-03-06 06:55:50 UTC
Permalink
Can't this go in ~/.cvsrc?
Post by Eric Cables
It would be nice if a future RANCID release included ignore options in the
rancid.conf file, or by some other intuitive means.
Is this a possibility?
Post by Lance Vermilion
Here is how it has been done in the past. Refer to this thread.
http://www.shrubbery.net/pipermail/rancid-discuss/2006-June/001542.html
Modifying control_rancid with this line might solve your issue.
--ignore-matching-lines='^callhome$'
cvs -f diff -U 4 --ignore-matching-lines='^callhome$' | sed -e '/^RCS
file: /d' -e '/^--- /d' -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /'
$TMP.diff
Similar solution is in this thread too.
http://www.shrubbery.net/pipermail/rancid-discuss/2006-May/001503.html
Note I have not verified this is possible with any version of rancid,
just sharing what others have shared in the past.
-Lance
Hi,
I'm trying to use rancid on a Cisco MDS 9124 SAN switch running SAN-OS
ver
3.1(3a). Initially I had a problem with the WriteTerm subroutine of the
rancid script not recognising when the "end of config" had been reached.
By
making a change similar to that for the ContentEngine, I got past that
problem (happy to post diffs if there's any interest). Now I regularly
get
emails that the config has changed because the order of some of the
output
lines changes (below - the "callhome" line flips about). Has anyone on
the
list got a Cisco SAN switch working with rancid?
Thanks,
Mark Favas
no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10
fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@
fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af
+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Eric Cables
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Eric Cables
2008-03-03 21:12:58 UTC
Permalink
Mark,

I have been unable to backup my 9500 MDS switches since I've gotten RANCID,
and have been relying on other tools to archive the configs.

What changes did you make to enable the archival of these devices? I'm not
much of a coder, so the more info on what you did the better.

Thanks,
Hi,
I'm trying to use rancid on a Cisco MDS 9124 SAN switch running SAN-OS ver
3.1(3a). Initially I had a problem with the WriteTerm subroutine of the
rancid script not recognising when the "end of config" had been reached. By
making a change similar to that for the ContentEngine, I got past that
problem (happy to post diffs if there's any interest). Now I regularly get
emails that the config has changed because the order of some of the output
lines changes (below - the "callhome" line flips about). Has anyone on the
list got a Cisco SAN switch working with rancid?
Thanks,
Mark Favas
no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10
fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@
fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af
+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Eric Cables
M***@csiro.au
2008-03-04 05:52:00 UTC
Permalink
Eric,

The diffs against Rancid 2.3.1 are below. Basically, it sets the type to
be "SAN" if it sees the string "Cisco Storage Area Networking Software",
and then assumes it's found the end of the config if it's seen more than
five lines of output and the router type is "SAN". That was enough to
get it to work for me...

Cheers,

Mark

*** rancid Thu Apr 5 05:30:58 2007
--- rancidsan Tue Mar 4 10:30:06 2008
***************
*** 153,158 ****
--- 153,159 ----
next;
}
if (/^Application and Content Networking Software/) { $type="CE"; }
+ if (/^Cisco Storage Area Networking Operating System/) { $type="SAN";
}
/^Application and Content Networking Software Release /i &&
ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next;
/^Cisco Secure PIX /i &&
***************
*** 1411,1416 ****
--- 1412,1424 ----
$found_end = 1;
return(1);
}
+ # The Cisco SAN switch running SANOS lacks a definitive "end of
config"
+ # marker. If we know that it is a SAN switch and we have seen at
least 5
+ # lines of write term o/p, we can be reasonably sure that we got
the config.
+ if ($type =~ /^SAN$/ && $linecnt > 5) {
+ $found_end = 1;
+ return(1);
+ }

return(0);
}





_____

From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Eric Cables
Sent: Tuesday, 4 March 2008 6:13 AM
To: Favas, Mark (CSIRO IM&T, Kensington)
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: Cisco 9124 SAN Switch


Mark,

I have been unable to backup my 9500 MDS switches since I've gotten
RANCID, and have been relying on other tools to archive the configs.

What changes did you make to enable the archival of these devices? I'm
not much of a coder, so the more info on what you did the better.

Thanks,


On Mon, Mar 3, 2008 at 2:45 AM, <***@csiro.au> wrote:


Hi,

I'm trying to use rancid on a Cisco MDS 9124 SAN switch running
SAN-OS ver 3.1(3a). Initially I had a problem with the WriteTerm
subroutine of the rancid script not recognising when the "end of config"
had been reached. By making a change similar to that for the
ContentEngine, I got past that problem (happy to post diffs if there's
any interest). Now I regularly get emails that the config has changed
because the order of some of the output lines changes (below - the
"callhome" line flips about). Has anyone on the list got a Cisco SAN
switch working with rancid?

Thanks,

Mark Favas


no snmp-server enable traps vrrp
snmp-server enable traps license
- callhome
fcalias name SH1_2_2 vsan 1
member pwwn 21:01:00:1b:32:38:50:10

fcalias name SH2_2_2 vsan 1
@@ -114,8 +113,9 @@

fcalias name L180_DR_1 vsan 1
member pwwn 50:01:04:f0:00:58:e7:af

+ callhome
zone name SH1_2_2_ZONE vsan 1
member fcalias SH1_2_2


_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Eric Cables
Loading...