[rancid] Limit commands run for GSR

Alan McKinnon alan.mckinnon at gmail.com
Thu Jun 20 07:28:20 UTC 2013


On 18/06/2013 03:42, Peter Jackson wrote:
> Check out some of the other command sections that are skipped for
> certain 'types'.  Figure out the type that rancid sets for the GSRs and
> use the line below (formatted for the correct type) in the command
> sections you don't want to run for them.
> 
> I assume the following would skip 12006, 12010, 12404, 12410, etc.:
> 
> return(1) if ($type !~ /^12[40]/);



I think I missed replying to this one, sorry about that.

I don't think that approach will work for me - I don't need to prevent
rancid parsing the output, I need some commands to not be run on the
device at all.

That means I'd have to modify @commandtable based on chassis type so
that clogin doesn't issue certain commands. But I don't know the chassis
type until clogin has already run and minimally ShowVersion has already
been parsed. By then it's too late.

3.0alpha looks like it might be moving in a direction that solves my
problem quite nicely


> 
> 
> 
> 
> On Mon, Jun 17, 2013 at 3:21 PM, Alan McKinnon <alan.mckinnon at gmail.com
> <mailto:alan.mckinnon at gmail.com>> wrote:
> 
>     Hi,
> 
>     Our provider edge runs on GSR 12's and they carry a hefty config. NetOps
>     complain that rancid noticeably spikes the cpu load [1] when it runs
>     these 4 (essentially the same) commands.
> 
>     {'more system:running-config'   => 'WriteTerm'},        # ASA/PIX
>     { running-config view full'=> 'WriteTerm'},        # workaround for
>     {'show running-config'          => 'WriteTerm'},
>     {'write term'                   => 'WriteTerm'},
> 
>     I got it under control easily by forking rancid to a gsrrancid script
>     and removing the bits I don't want from @commandtable.
> 
>     I'd rather not do it this way, I'd like to have this in the rancid
>     parser. But I can't figure a way to modify @commandtable at runtime
>     based on chassis/OS type.
> 
>     Ideas?
> 
> 
>     [1] It's a legit complaint, not a fiction of a NetOps engineer's
>     imagination. On every other chassis I can ignore the effects rancid
>     causes, but not these ones. We do things with the 12k most folks think
>     should not be possible :-)
> 
>     --
>     Alan McKinnon
>     alan.mckinnon at gmail.com <mailto:alan.mckinnon at gmail.com>
> 
>     _______________________________________________
>     Rancid-discuss mailing list
>     Rancid-discuss at shrubbery.net <mailto:Rancid-discuss at shrubbery.net>
>     http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
> 
> 


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list