Discussion:
[rancid] running rancid-run manually generates false changes
Yuval Ben Ari
2007-08-07 14:59:10 UTC
Permalink
Hi,
I have a strange and annoying problem.
when rancid-run is launched from cronjob (on user "rancid" crontab) all is ok.
but if I try to run it manually on some groups or router even if I am
logged in as user rancid while doing it, it create false diffs of
router in all the groups and I get following mail:

-----------
Subject: changes in groupname routers
Routers changed to up:
routerx:cisco

Added routers:
routerx:cisco

Deleted routers:
routerx:cisco
-----------

such mail for every group I have.

also if I try to run with command like this:
/bin/su --command="/home/rancid/bin/rancid-run -r routername" - rancid

I found it is related to control_rancid which falsely detects a change
for some reason.

any idea ?

Thanks
David Luyer
2007-08-07 16:57:20 UTC
Permalink
Post by Yuval Ben Ari
Hi,
I have a strange and annoying problem.
when rancid-run is launched from cronjob (on user "rancid" crontab) all is ok.
but if I try to run it manually on some groups or router even if I am
logged in as user rancid while doing it, it create false diffs of
-----------
Subject: changes in groupname routers
routerx:cisco
routerx:cisco
routerx:cisco
-----------
I take it you have multiple routers in each of these sections of the email?

Some of the state files from RANCID are sorted. Some of the tools in the
control_rancid script assume consistent sorting of the 'before' and 'after'
files.

Your cron daemon and your login session may be using different locales
(with different sort orders)?

David.
Lance
2007-08-07 20:12:34 UTC
Permalink
David/Yuval,

Make sure you source the /etc/rancid.conf file so that you have all the
same environmental variable...including TERM. Different TERMs cause
weird issues.

-Lance
-------- Original Message --------
Subject: [rancid] Re: running rancid-run manually generates false
changes
Date: Tue, August 07, 2007 9:57 am
Post by Yuval Ben Ari
Hi,
I have a strange and annoying problem.
when rancid-run is launched from cronjob (on user "rancid" crontab) all is
ok.
but if I try to run it manually on some groups or router even if I am
logged in as user rancid while doing it, it create false diffs of
-----------
Subject: changes in groupname routers
routerx:cisco
routerx:cisco
routerx:cisco
-----------
I take it you have multiple routers in each of these sections of the email?
Some of the state files from RANCID are sorted. Some of the tools in the
control_rancid script assume consistent sorting of the 'before' and 'after'
files.
Your cron daemon and your login session may be using different locales
(with different sort orders)?
David.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2007-08-10 18:25:46 UTC
Permalink
rancid-run will source the config file itself.

I believe it was mentioned already, but you SHOULD NOT run rancid-run et al
as any user except the rancid pseudo user [unless you know what you're doing].
Only the login scripts are intended to be used outside of rancid.

Withou the proper permissions, that the rancid pseudo user would normally
have, the results are undefined.

And, David points out the subtle differences you can experience with an
interactive shell compared to one from cron.
Post by Lance
David/Yuval,
Make sure you source the /etc/rancid.conf file so that you have all the
same environmental variable...including TERM. Different TERMs cause
weird issues.
-Lance
-------- Original Message --------
Subject: [rancid] Re: running rancid-run manually generates false
changes
Date: Tue, August 07, 2007 9:57 am
Post by Yuval Ben Ari
Hi,
I have a strange and annoying problem.
when rancid-run is launched from cronjob (on user "rancid" crontab) all is
ok.
but if I try to run it manually on some groups or router even if I am
logged in as user rancid while doing it, it create false diffs of
-----------
Subject: changes in groupname routers
routerx:cisco
routerx:cisco
routerx:cisco
-----------
I take it you have multiple routers in each of these sections of the email?
Some of the state files from RANCID are sorted. Some of the tools in the
control_rancid script assume consistent sorting of the 'before' and 'after'
files.
Your cron daemon and your login session may be using different locales
(with different sort orders)?
David.
Lance Vermilion
2007-08-07 20:11:20 UTC
Permalink
David/Yuval,

Make sure you source the /etc/rancid.conf file so that you have all the
same environmental variable...including TERM. Different TERMs cause
weird issues.

-Lance
-------- Original Message --------
Subject: [rancid] Re: running rancid-run manually generates false
changes
Date: Tue, August 07, 2007 9:57 am
Post by Yuval Ben Ari
Hi,
I have a strange and annoying problem.
when rancid-run is launched from cronjob (on user "rancid" crontab) all is
ok.
but if I try to run it manually on some groups or router even if I am
logged in as user rancid while doing it, it create false diffs of
-----------
Subject: changes in groupname routers
routerx:cisco
routerx:cisco
routerx:cisco
-----------
I take it you have multiple routers in each of these sections of the email?
Some of the state files from RANCID are sorted. Some of the tools in the
control_rancid script assume consistent sorting of the 'before' and 'after'
files.
Your cron daemon and your login session may be using different locales
(with different sort orders)?
David.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...