[rancid] Re: Ignoring certain diffs

Eric Cables ecables at gmail.com
Mon Nov 24 18:02:12 UTC 2008


Here is what the e-mail looks like from RANCID, can anyone look at the
syntax and help me figure out what's wrong?  Obviously the -I
statements are having no effect (-I '.*Flash.*nvram.*' for example)

diff -u -4 -I ''\''.*call-forward.*'\''' -I ''\''.*Flash.*nvram.*'\'''
-I ''\''.*VTP.*Revision'\''' -I ''\''.*VTP.*MD5'\''' -I
''\''.*Cryptochecksum.*'\''' -r1.3 <hostname.here> @@ -27,15 +27,15 @@
  !
  !Flash: nvram: Directory of nvram:/
- !Flash: nvram:   469  -rw-        7395                    <no date>
startup-config
+ !Flash: nvram:   469  -rw-        7516                    <no date>
startup-config
  !Flash: nvram:   470  ----        1934                    <no date>
private-config
- !Flash: nvram:   471  -rw-        7395                    <no date>
underlying-config
+ !Flash: nvram:   471  -rw-        7516                    <no date>
underlying-config
  !Flash: nvram:     1  ----           4                    <no date>
rf_cold_starts
  !Flash: nvram:     2  -rw-        1922                    <no date>
ifIndex-table
  !Flash: nvram:     3  ----          12                    <no date>
persistent-data
- !Flash: nvram: 491512 bytes total (478035 bytes free)
+ !Flash: nvram: 491512 bytes total (477914 bytes free)

Here's the snippit of control_rancid that calls the -I statements:
--
DIFFSUPPRESS="-I '.*call-forward.*' -I '.*Flash.*nvram.*' -I '.*VTP.*Revision' -
I '.*VTP.*MD5' -I '.*Cryptochecksum.*'"

    cvs -f diff -u -4 -ko $DIFFSUPPRESS \
        | sed -e '/^RCS file: /d' -e '/^--- /d' \
        -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /' >$TMP.diff
--

-- Eric Cables



On Wed, Nov 19, 2008 at 9:47 AM, Lance Vermilion <rancid at gheek.net> wrote:
> If you don't want the flash stuff you could always very simply remove
> it from the collection. Most people that I have seen ask that question
> do that.
>
> open the corresponding rancid file "for cisco open:
> <rancid_home>/bin/rancid" and then search for "commandtable". Comment
> out the commands you don't really care for.
>
> A much more ideal solution would be some nice regex during the
> collection period that would remove the file size or date/time stamp.
> I don't have time at the moment to look at that, but maybe someone
> else does and they can offer it up to John to include.
>
> -Lance
>
> On Wed, Nov 19, 2008 at 10:09 AM, Eric Cables <ecables at gmail.com> wrote:
>> Anyone?
>>
>> On Mon, Nov 17, 2008 at 9:39 AM, Eric Cables <ecables at gmail.com> wrote:
>>> I went through the archives, and implemented one of the solutions for
>>> ignoring diffs (such as call-forward, etc.).
>>>
>>> I implemented it as follows in control_rancid:
>>> <-- snippit -->
>>> if [ $RCSSYS = "cvs" ] ; then
>>> DIFFSUPPRESS="-I '.*call-forward.*' -I '.*Flash.*nvram.*'"
>>>
>>>     cvs -f diff -u -4 -ko $DIFFSUPPRESS \
>>>         | sed -e '/^RCS file: /d' -e '/^--- /d' \
>>>         -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /' >$TMP.diff
>>> else
>>>     svn diff | sed -e '/^+++ /d' -e 's/^\([-+ ]\)/\1 /' >$TMP.diff
>>> <-- snippit -->
>>>
>>>
>>> Unfortunately this doesn't seem to have worked.  I checked my RANCID e-mail
>>> this morning and it shows the following:
>>>
>>> Index: configs/<hostname>
>>> ===================================================================
>>> retrieving revision 1.4
>>> diff -u -4 -I ''\''.*call-forward.*'\''' -I ''\''.*Flash.*nvram.*'\''' -r1.4
>>> <hostname> @@ -26,16 +26,16 @@
>>>   !Flash: nvram: Directory of nvram:/
>>> - !Flash: nvram:   230  -rw-        7166                    <no date>
>>> startup-config
>>> + !Flash: nvram:   230  -rw-        7127                    <no date>
>>> startup-config
>>>   !Flash: nvram:   231  ----        3867                    <no date>
>>> private-config
>>> - !Flash: nvram:   232  -rw-        7166                    <no date>
>>> underlying-config
>>> + !Flash: nvram:   232  -rw-        7127                    <no date>
>>> underlying-config
>>>
>>> It looks like it should have ignored any lines with "Flash: nvram", yet they
>>> are still showing up.
>>>
>>> Can anyone please provide a second set of eyes and help me figure out what
>>> I've done wrong?
>>>
>>> Thanks,
>>>
>>>
>>> --
>>> Eric Cables
>>>
>> _______________________________________________
>> Rancid-discuss mailing list
>> Rancid-discuss at shrubbery.net
>> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>


More information about the Rancid-discuss mailing list