Discussion:
[rancid] "Routers changed to down:" Problem
thomas cp lee
2008-04-16 10:07:53 UTC
Permalink
Hello !

(First-off, apologies if this is spam - I couldn't find a search threads
option in the ml-archives to see if this issue had already been adressed)

I'm running rancid 2.3.1-4 on ubuntu, and all seems to be going swimmingly
apart from a tiny bit of weird behavior by the mail part of the control_rancid
script...

Every time rancid is run (from cron), it correctly detects up/down diffs in
the router.db's, and also correctly mails diffs on the routers themselves.
However, rancid mails me (for each $group), a mail looking like :

+++

From: rancid@$isp.com
Subject: changes in $group routers
To: rancid-$group@$isp.com
Date: Wed, 16 Apr 2008 11:01:12 +0200 (CEST)

Routers changed to down:

+++

...and that's it ! Nothing has changed in the router.db file, there's
just this constantly empty message. I've scrabbled in the logs, and
nothing is mentioned. Why am I being mailled when no changes have taken
place ?

I'm guessing that it's a permissions issue, but uid/gid are rancid:rancid
everywhere, & it seems to be recreating the routers.down files no probs (if
I delete 'em) and as i said above, it detects the changes all right, so I don't
understand where the problem could be. Is it the CVS being odd ?

Any help would be greatly appreciated. Vive Rancid !

Cheers,

Tom
--
Thomas Lee
Unix, Réseaux & Sécurité
ISIS [Pôle Services]
Air Liquide
thomas cp lee
2008-04-16 14:48:34 UTC
Permalink
Post by thomas cp lee
Any help would be greatly appreciated. Vive Rancid !
Okay, looks like I've cracked it myself...

There is (at least on my ubuntu) a problem with the
flags in the 'diff' program called by control_rancid.

The "diff" program is executed with the flags "-u -4", and
that appears to be obselete. When I modify it in the control_rancid
script, so that it's "-U 4", it seems to now work as god intended.

(plz note, I've not changed it (yet) on the "cvs diff" line...)

So, in a nutshell for me :

perl -i -pe 's/^diff -u -4/diff -U 4/g' /var/lib/rancid/bin/control_rancid

Voila, cheers.

Tom

--s
Thomas Lee
Unix, Réseaux & Sécurité
ISIS [Pôle Services]
Air Liquide

Loading...