[rancid] Missing Diff Change Summary in 3.2

Matt Almgren matta at surveymonkey.com
Sun Jul 26 01:27:46 UTC 2015


Aha, found it.  It’s diffstat!

It’s included in 2.3.8, but not in 3.2:

    if [ $MAXSZ -eq 0 ] ; then
        (
          echo "To: $mailrcpt"
          echo "Subject: $subject"
          echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'
          echo ""
+          if which diffstat >/dev/null; then
+              diffstat $TMP.diff
+          fi
          cat $TMP.diff
        ) | /usr/sbin/sendmail -t $MAILOPTS
    else

I installed diffstat then added the above and seems to work like 2.3.8.  :)   That was driving me nuts not having that.

 — Matt







From: Matt Almgren <matta at surveymonkey.com<mailto:matta at surveymonkey.com>>
Date: Thursday, July 23, 2015 at 3:48 PM
To: John Heasley <heas at shrubbery.net<mailto:heas at shrubbery.net>>
Subject: Re: [rancid] Missing Diff Change Summary in 3.2

It’s CVS, not GIT.  Would you know how to fix it? :)

I tried to compare the control_rancid files between the two versions to see how we’re calling CVS, but there were too many difference to find out where we call CVS.

Thanks, Matt




From: John Heasley <heas at shrubbery.net<mailto:heas at shrubbery.net>>
Date: Thursday, July 23, 2015 at 3:45 PM
To: Matt Almgren <matta at surveymonkey.com<mailto:matta at surveymonkey.com>>
Subject: Re: [rancid] Missing Diff Change Summary in 3.2





Am 23.07.2015 um 18:27 schrieb Matt Almgren <matta at surveymonkey.com<mailto:matta at surveymonkey.com>>:

Hi, in 2.3.8, the notification emails used to have the first few lines showing <what> devices were changed, and <quantity> of lines changed.

But the new 3.2 version seems to have that stripped out – which just means that I have to go through the entire email to see if there’s some device in there that I care about. Truth be told, our load balancers are so dynamic, I usually ignore those emails when I see only those devices have changed.  I’m more interested in the network infrastructure that changes.

Thats not from rancid, its from git. So you changed something or git did.


I’d love to have the code changes that print the first three lines in bold below:

# old
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com> |   71 ++++++++++++++++++++++++++++++++++----
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com> |   77 ++++++++++++++++++++++++++++++++++++------
2 files changed, 129 insertions(+), 19 deletions(-)
Index: configs/mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>
===================================================================

# new
Index: configs/mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>
===================================================================
retrieving revision 1.3
diff -u -4 -r1.3 mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>



Thanks, Matt


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net<mailto:Rancid-discuss at shrubbery.net>
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150726/26e7840d/attachment.html>


More information about the Rancid-discuss mailing list