trying to add Cisco clustering support to rancid -- almost done

Andrew Partan asp at
Fri May 13 18:29:37 UTC 2005

On Tue, May 10, 2005 at 11:37:08AM -0400, Chris Stave wrote:
> at the end of processing a switch rancid logs out of the switch; where
> is this done?  I need to add a second 'exit' command there, but I'm
> not sure where it does this.  (a line number would be completely
> ideal, since my knowledge of scripting is a bit questionable)

Its in clogin; look for this line:
	send "exit\r"

Or you could add it to the list of commands in bin/rancid; I'd try
adding it to the end of $cisco_cmds.  This may be harder, since
rancid looks for 'quit' to see if its done running all of the
commands; if it sees 'quit', than rancid figures its done with all
of its work and stops.

I'm not quite sure what needs to be changed so that you can have
quit commands to log out of parts of the cluster, but then still
have more commands left.

I don't know what cisco cluster stuff looks like, but for HFR support,
we had to add commands like these:
	admin show diag
- which means to run show diag in admin mode.  Does cisco support
anything sorta like
	run_on cluster_node 3 show something
?  If so, adding commands like these to the list of commands would
be trivial.

I just think that we are going to run into problems with rancid's
control logic if we want to spit a serias of commands like this to
some cluster:
	show version
	show diag
	login cluster_node 1
	show version
	show diag
	login cluster_node 2
	show version
	show diag
	show running-config
These embedded 'exit' commands are really going to mess things up.
rancid's control logic is really very simple right now; all that
it knows is that is runs a series of commands and that the last
command is 'exit', and that when it sees 'exit', its done & its an
error if there are commands left over.

More information about the Rancid-discuss mailing list