Discussion:
[rancid] Gathering Cisco MDS configurations
Eric Cables
2008-04-30 17:46:52 UTC
Permalink
I have sent a couple of e-mails in the past about this topic, and gotten
some replies that were helpful, but I am still struggling with this. I have
9500 series MDS switches, running SAN-OS, that I need to archive. Currently
I rely on CiscoWorks to do this, which is pretty much the only reason I
still have that software in place.

Here are the suggestions I have received, and implemented:

Modify the bin/rancid file as follows:

--
if (/^Application and Content Networking Software/) { $type="CE"; }
+ if (/^Cisco Storage Area Networking Operating System/) { $type="SAN";
}
--

--
}
# The ContentEngine lacks a definitive "end of config" marker. If we
# know that it is a CE 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 =~ /^CE$/ && $linecnt > 5) {
$found_end = 1;
return(0);
}

+ # 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);
--

I have done the above, but it didn't seem to yield the expected results.
Here is my output from a rancid-run:

Trying to get all of the configs.
mds-02-04: End of run not found

mds-02-01: End of run not found

mds-02-02: End of run not found

mds-02-03: End of run not found

<<output ommitted due to redundancy>>

cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs

ending: Wed Apr 30 10:42:09 PDT 2008


The above just loops for each round, and then it fails out. Any suggestions
would be greatly appreciated.
--
Eric Cables
Michael Stefaniuc
2008-04-30 19:29:52 UTC
Permalink
Post by Eric Cables
I have sent a couple of e-mails in the past about this topic, and gotten
some replies that were helpful, but I am still struggling with this. I
have 9500 series MDS switches, running SAN-OS, that I need to archive.
Currently I rely on CiscoWorks to do this, which is pretty much the only
reason I still have that software in place.
That's not enough, check the patch/email i have sent to this mailing
list at the beginning of the month; subject was
"[PATCH] Preliminary support for Cisco's SANOS devices"

bye
michael
Post by Eric Cables
--
if (/^Application and Content Networking Software/) { $type="CE"; }
+ if (/^Cisco Storage Area Networking Operating System/) {
$type="SAN"; }
--
--
}
# The ContentEngine lacks a definitive "end of config" marker. If we
# know that it is a CE 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 =~ /^CE$/ && $linecnt > 5) {
$found_end = 1;
return(0);
}
+ # 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);
--
I have done the above, but it didn't seem to yield the expected
Trying to get all of the configs.
mds-02-04: End of run not found
mds-02-01: End of run not found
mds-02-02: End of run not found
mds-02-03: End of run not found
<<output ommitted due to redundancy>>
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
ending: Wed Apr 30 10:42:09 PDT 2008
The above just loops for each round, and then it fails out. Any
suggestions would be greatly appreciated.
--
Michael Stefaniuc Tel.: +49-711-96437-199
Consulting Communications Engineer Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Hauptstätter Strasse 58, 70178 Stuttgart
Handelsregister: Amtsgericht Stuttgart HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
Werner Knoblich
Eric Cables
2008-04-30 19:47:17 UTC
Permalink
Excellent, that did the trick. I hope this makes it into the next rancid
release.
Post by Michael Stefaniuc
Post by Eric Cables
I have sent a couple of e-mails in the past about this topic, and gotten
some replies that were helpful, but I am still struggling with this. I
have 9500 series MDS switches, running SAN-OS, that I need to archive.
Currently I rely on CiscoWorks to do this, which is pretty much the only
reason I still have that software in place.
That's not enough, check the patch/email i have sent to this mailing
list at the beginning of the month; subject was
"[PATCH] Preliminary support for Cisco's SANOS devices"
bye
michael
Post by Eric Cables
--
if (/^Application and Content Networking Software/) {
$type="CE"; }
Post by Eric Cables
+ if (/^Cisco Storage Area Networking Operating System/) {
$type="SAN"; }
--
--
}
# The ContentEngine lacks a definitive "end of config" marker. If
we
Post by Eric Cables
# know that it is a CE and we have seen at least 5 lines of write
term
Post by Eric Cables
# o/p, we can be reasonably sure that we got the config.
if ($type =~ /^CE$/ && $linecnt > 5) {
$found_end = 1;
return(0);
}
+ # The Cisco SAN switch running SANOS lacks a definitive "end of
config"
Post by Eric Cables
+ # 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);
--
I have done the above, but it didn't seem to yield the expected
Trying to get all of the configs.
mds-02-04: End of run not found
mds-02-01: End of run not found
mds-02-02: End of run not found
mds-02-03: End of run not found
<<output ommitted due to redundancy>>
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
ending: Wed Apr 30 10:42:09 PDT 2008
The above just loops for each round, and then it fails out. Any
suggestions would be greatly appreciated.
--
Michael Stefaniuc Tel.: +49-711-96437-199
Consulting Communications Engineer Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Hauptstätter Strasse 58, 70178 Stuttgart
Handelsregister: Amtsgericht Stuttgart HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
Werner Knoblich
--
Eric Cables
Loading...