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

Matt Almgren malmgren at skyfire.com
Mon Oct 7 20:13:55 UTC 2013


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.

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



________________________________
This message is being sent by Skyfire Labs. It is intended exclusively for the individuals and entities to which it is addressed. This communication, including any attachments, may contain information that is proprietary, privileged, confidential, or otherwise subject to restrictions on disclosure pursuant to applicable law. If you are not the named addressee, you are not authorized to read, print, retain copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by email and delete all copies of this message. This message is protected by applicable legal privileges and is confidential.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20131007/43a47973/attachment.html>


More information about the Rancid-discuss mailing list