Adding cisco cluster support for RANCID

Chris Stave cstave at
Tue May 10 20:23:44 UTC 2005

I am NOT including patches or anything here, but following my
description you should be able to do everything I have done, probably

I have enjoyed RANCID since I first installed it, it is nice, but it
didn't get information from cluster members (many of the switches that
I am dealing with are interfaceless cluster members accessable through
the cluster commander by typing (eg.) rcommand 1) ...

I initially tried to add an extra flag for cluster member to various
parts of rancid, but after some progress I eventually ran into the
fact that I had forgotten: I don't actually know expect, tcl, perl, or
really any other scripting language enough to extend the scripts in
the way that I was thinking of.

Then the issue of cluster member configs was brought up again and I
thought about the problem again.  I now have rancid collecting
configurations and information from my cluster member switches.  What
follows is how I did it (okay, this is how I should have done it, a
few things have been added in where they should have been done rather
than at later points in the process when i realized something was
wrong and did them):

While working on rancid it is a good idea to stop it from running
every hour ... I got this all working on a test system rather than a
production system, but it was still running every hour...  that can
cause strangeness when you've only changed some things that need to be
changed, not all of them...

I made three copies of clogin -- cm1login, cm2login, and cm3login, to
log into cluster member 1, 2, and 3, respectively (if you have any 5+
member clusters then you will have to make more cmXlogins).  I edited
these to include include sending "rcommand 1(or 2, or 3)" to the
switch (I tacked this on to the enable section for quickness and I
figured it would work there) -- I also had to include an extra "quit"
at the end of the process so that when leaving the cluster member it
did not get stuck at the cluster commander.

I then had to make three new versions of rancid (cm1rancid, cm2rancid,
and cm3rancid), based upon the original rancid.  These changes were
easy, just search and replace clogin with the appropriate new cm1login
(or cm2login, etc.)...

Then I edited rancid-fe to include three new device types, ccm1, ccm2,
and ccm3, each pointing to the appropriate edited rancid.

Finally, I had to add three new groups (one for each cluster member
type), since if they were all in one router.db like so:

it didn't work, as the information from the cluster member overwrote
the information from the cluster commander.  So I made 3 new groups
(and associated aliases) for cluster member 1s, cluster member 2s, and
cluster member 3s, respectively.  I populated their router.db lists
and all was well.

It was pretty easy, required no specific knowledge of scripting beyond
looking up a few surrounding commands and matching syntax within
files, and worked.  It is not elegant, pretty, well documented,
error-resistant, or even non-horrible (rcommand in the enable
section?!), but it seems to be working (I haven't had it going for
long, it might be overly error-prone or generally unreliable)

Comments?  Questions?

More information about the Rancid-discuss mailing list