[rancid] How to make SVN ignore select changed configs?

heasley heas at shrubbery.net
Mon Oct 7 23:07:36 UTC 2013


Mon, Oct 07, 2013 at 01:13:55PM -0700, Matt Almgren:
> Hi, we have a few f5's that are controlled with scripts that will bring a node in and out of the pool.   The problem here is that every time rancid runs, it picks up on this "monitor up/down" change and fires off a Rancid SVN change email.
> 
> Modified: trunk/network/rancid/SCA/configs/sca-lb001
> ===================================================================
> --- trunk/network/rancid/SCA/configs/sca-lb001 2013-10-07 17:03:09 UTC (rev 2067)
> +++ trunk/network/rancid/SCA/configs/sca-lb001 2013-10-07 19:03:03 UTC (rev 2068)
> @@ -3539,7 +3539,7 @@
> #       }
> #       10.102.120.132:5700 {
> #          node type pool member t
> -#          monitor state up
> +#          monitor state down
> #          new session enable mon enabled
> #          enable
> #          inband inst disable
> 
> 
> Based on this thread, I see there's a way to exclude some matching lines with CVS, but I don't see a way to do that with SVN ? or at least not easily with the existing control-rancid script.

svn diff --diff-cmd "ARG" ...

> http://www.shrubbery.net/pipermail/rancid-discuss/2006-June/001542.html
> 
> Here's the code in question in the control_rancid file:
> 
> if [ $RCSSYS = "cvs" ] ; then
>     cvs -f diff -U 4 -ko | 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
> fi
> 
> 
> Has anyone any tips for modifying that svn diff line to exclude "^monitor state" from the compared files?
> 
> Thanks, Matt


More information about the Rancid-discuss mailing list