Discussion:
[rancid] Can't update router.db
Dan Letkeman
2017-09-22 16:13:34 UTC
Permalink
Hello,

I have a rancid install on centos. It appears to all be working however,
if I replace the contents of the router.db file with the new devices it
still connects to the old ones. I have deleted the file and created a new
one with only the new device ip addresses and it still continues to try and
get configs from the old devices??? Where is it getting this from?

I am able to clogin to any of the new devices without trouble, so its not a
connection issue, but somehow the old router.db file is cached?

drwxr-x---. 2 rancid rancid 24 Sep 22 11:11 configs
-rw-r--r--. 1 rancid rancid 2069 Sep 22 10:48 router.db


10.10.10.1;cisco;up
10.10.10.14;cisco;up
10.10.10.194;cisco;up
10.10.10.5;cisco;up
10.100.104.11;mikrotik;up
10.100.104.12;mikrotik;up
10.100.207.3;mikrotik;up
10.100.207.4;mikrotik;up
10.100.4.10;cisco;up
10.100.4.6;cisco;up
10.104.0.1;cisco;up
10.104.1.11;cisco;up
10.104.12.11;cisco;up
10.105.50.1;cisco;up
10.16.0.1;cisco;up
10.16.1.21;cisco;up
10.16.1.31;cisco;up
10.16.12.11;cisco;up
10.168.0.1;cisco;up
10.168.1.11;cisco;up
10.168.1.21;cisco;up
10.168.1.31;cisco;up
10.168.1.41;cisco;up
10.168.1.51;cisco;up
10.168.12.11;cisco;up
10.175.0.3;mikrotik;up
10.175.0.4;mikrotik;up

etc......


Any help would be appreciated.

Thanks,
Dan.
Piegorsch, Weylin William
2017-09-25 00:37:18 UTC
Permalink
What rancid group is your cron job passing to do-diffs? Is it the same group that you’ve modified, or a different one? Did you update the router.db file of the group that do-diffs is executing?
weylin

From: Dan Letkeman <***@gmail.com>
Date: Friday, September 22, 2017 at 12:13
To: rancid-discuss <rancid-***@shrubbery.net>
Subject: [rancid] Can't update router.db

Hello,

I have a rancid install on centos. It appears to all be working however, if I replace the contents of the router.db file with the new devices it still connects to the old ones. I have deleted the file and created a new one with only the new device ip addresses and it still continues to try and get configs from the old devices??? Where is it getting this from?

I am able to clogin to any of the new devices without trouble, so its not a connection issue, but somehow the old router.db file is cached?

drwxr-x---. 2 rancid rancid 24 Sep 22 11:11 configs
-rw-r--r--. 1 rancid rancid 2069 Sep 22 10:48 router.db


10.10.10.1;cisco;up
10.10.10.14;cisco;up
10.10.10.194;cisco;up
10.10.10.5;cisco;up
10.100.104.11;mikrotik;up
10.100.104.12;mikrotik;up
10.100.207.3;mikrotik;up
10.100.207.4;mikrotik;up
10.100.4.10;cisco;up
10.100.4.6;cisco;up
10.104.0.1;cisco;up
10.104.1.11;cisco;up
10.104.12.11;cisco;up
10.105.50.1;cisco;up
10.16.0.1;cisco;up
10.16.1.21;cisco;up
10.16.1.31;cisco;up
10.16.12.11;cisco;up
10.168.0.1;cisco;up
10.168.1.11;cisco;up
10.168.1.21;cisco;up
10.168.1.31;cisco;up
10.168.1.41;cisco;up
10.168.1.51;cisco;up
10.168.12.11;cisco;up
10.175.0.3;mikrotik;up
10.175.0.4;mikrotik;up

etc......


Any help would be appreciated.

Thanks,
Dan.
Dan Letkeman
2017-09-25 13:19:53 UTC
Permalink
I'm not to familiar with using groups. Cron job looks like this:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/var/rancid
# Run config differ every day at 00:30am
30 00 * * * rancid /usr/libexec/rancid/rancid-run


But, I think I may have found an issue with my OS updates that might be
part of the problem. Running CentOS 7. When I did a yum update I recieved
this:

--> Finished Dependency Resolution
Error: Package: rancid-3.2-2.el7.x86_64 (@epel)
Requires: perl(newgetopt.pl)
Removing: perl-Perl4-CoreLibs-0.001-291.el7.noarch (@base)
perl(newgetopt.pl)
Updated By: perl-Perl4-CoreLibs-0.003-7.el7.noarch (base)
Not found
You could try using --skip-broken to work around the problem


Thanks,
Dan.
Post by Piegorsch, Weylin William
What rancid group is your cron job passing to do-diffs? Is it the same
group that you’ve modified, or a different one? Did you update the
router.db file of the group that do-diffs is executing?
weylin
*Date: *Friday, September 22, 2017 at 12:13
*Subject: *[rancid] Can't update router.db
Hello,
I have a rancid install on centos. It appears to all be working however,
if I replace the contents of the router.db file with the new devices it
still connects to the old ones. I have deleted the file and created a new
one with only the new device ip addresses and it still continues to try and
get configs from the old devices??? Where is it getting this from?
I am able to clogin to any of the new devices without trouble, so its not
a connection issue, but somehow the old router.db file is cached?
drwxr-x---. 2 rancid rancid 24 Sep 22 11:11 configs
-rw-r--r--. 1 rancid rancid 2069 Sep 22 10:48 router.db
10.10.10.1;cisco;up
10.10.10.14;cisco;up
10.10.10.194;cisco;up
10.10.10.5;cisco;up
10.100.104.11;mikrotik;up
10.100.104.12;mikrotik;up
10.100.207.3;mikrotik;up
10.100.207.4;mikrotik;up
10.100.4.10;cisco;up
10.100.4.6;cisco;up
10.104.0.1;cisco;up
10.104.1.11;cisco;up
10.104.12.11;cisco;up
10.105.50.1;cisco;up
10.16.0.1;cisco;up
10.16.1.21;cisco;up
10.16.1.31;cisco;up
10.16.12.11;cisco;up
10.168.0.1;cisco;up
10.168.1.11;cisco;up
10.168.1.21;cisco;up
10.168.1.31;cisco;up
10.168.1.41;cisco;up
10.168.1.51;cisco;up
10.168.12.11;cisco;up
10.175.0.3;mikrotik;up
10.175.0.4;mikrotik;up
etc......
Any help would be appreciated.
Thanks,
Dan.
heasley
2017-09-26 03:33:59 UTC
Permalink
Post by Dan Letkeman
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/var/rancid
# Run config differ every day at 00:30am
30 00 * * * rancid /usr/libexec/rancid/rancid-run
But, I think I may have found an issue with my OS updates that might be
part of the problem. Running CentOS 7. When I did a yum update I recieved
--> Finished Dependency Resolution
Requires: perl(newgetopt.pl)
perl(newgetopt.pl)
Updated By: perl-Perl4-CoreLibs-0.003-7.el7.noarch (base)
Not found
You could try using --skip-broken to work around the problem
there is only one thing that requires that lib and it is an example
script; if you are not using rtrfilter, you can force that installation.
Post by Dan Letkeman
Post by Piegorsch, Weylin William
What rancid group is your cron job passing to do-diffs? Is it the same
group that you’ve modified, or a different one? Did you update the
router.db file of the group that do-diffs is executing?
While rancid-run can take a rancid group as an argument, the groups normally
come from LIST_OF_GROUPS in rancid.conf.

I am more suspicious that you have more than one rancid group
(/var/rancid/<groupname>) and you've updated one but not another with the
same devices. another possibility is that permissions are incorrect on
files/directories in the rancid group's directory, presumably:
chown -R rancid /var/rancid

Also, look at the rancid logs for given group.
Post by Dan Letkeman
Post by Piegorsch, Weylin William
weylin
*Date: *Friday, September 22, 2017 at 12:13
*Subject: *[rancid] Can't update router.db
Hello,
I have a rancid install on centos. It appears to all be working however,
if I replace the contents of the router.db file with the new devices it
still connects to the old ones. I have deleted the file and created a new
one with only the new device ip addresses and it still continues to try and
get configs from the old devices??? Where is it getting this from?
I am able to clogin to any of the new devices without trouble, so its not
a connection issue, but somehow the old router.db file is cached?
drwxr-x---. 2 rancid rancid 24 Sep 22 11:11 configs
-rw-r--r--. 1 rancid rancid 2069 Sep 22 10:48 router.db
10.10.10.1;cisco;up
10.10.10.14;cisco;up
10.10.10.194;cisco;up
10.10.10.5;cisco;up
10.100.104.11;mikrotik;up
10.100.104.12;mikrotik;up
10.100.207.3;mikrotik;up
10.100.207.4;mikrotik;up
10.100.4.10;cisco;up
10.100.4.6;cisco;up
10.104.0.1;cisco;up
10.104.1.11;cisco;up
10.104.12.11;cisco;up
10.105.50.1;cisco;up
10.16.0.1;cisco;up
10.16.1.21;cisco;up
10.16.1.31;cisco;up
10.16.12.11;cisco;up
10.168.0.1;cisco;up
10.168.1.11;cisco;up
10.168.1.21;cisco;up
10.168.1.31;cisco;up
10.168.1.41;cisco;up
10.168.1.51;cisco;up
10.168.12.11;cisco;up
10.175.0.3;mikrotik;up
10.175.0.4;mikrotik;up
etc......
Any help would be appreciated.
Thanks,
Dan.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Dan Letkeman
2017-09-26 13:42:27 UTC
Permalink
Looks like there is only one group and the permissions look correct to me.

[***@observium /]# cd /var/rancid/
[***@observium rancid]# ls
logs observium SVN
[***@observium rancid]# cd logs
[***@observium logs]# ls
[***@observium logs]# cd ..
[***@observium rancid]# cd observium/
[***@observium observium]# ls
configs old router.db routers.all routers.down routers.up
[***@observium observium]# ls -l
total 16
drwxr-x---. 2 rancid rancid 24 Sep 22 11:41 configs
drwxrwxr-x. 2 rancid rancid 75 Sep 22 11:05 old
-rw-rw----. 1 rancid rancid 2069 Sep 22 10:48 router.db
-rw-r-----. 1 rancid rancid 1719 Sep 22 11:25 routers.all
-rw-r-----. 1 rancid rancid 1 Sep 22 11:25 routers.down
-rw-r-----. 1 rancid rancid 1718 Sep 22 11:25 routers.up
[***@observium observium]#


It doesn't work at all anymore. I found this at the end of the logs:

rancid observium hung on observium.gvsd.ca? Old lockfile still exists:
-rw-r-----. 1 rancid rancid 0 Sep 22 11:25 /tmp/.observium.run.lock


Dan.
Post by Dan Letkeman
Post by Dan Letkeman
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/var/rancid
# Run config differ every day at 00:30am
30 00 * * * rancid /usr/libexec/rancid/rancid-run
But, I think I may have found an issue with my OS updates that might be
part of the problem. Running CentOS 7. When I did a yum update I
recieved
Post by Dan Letkeman
--> Finished Dependency Resolution
Requires: perl(newgetopt.pl)
perl(newgetopt.pl)
Updated By: perl-Perl4-CoreLibs-0.003-7.el7.noarch (base)
Not found
You could try using --skip-broken to work around the problem
there is only one thing that requires that lib and it is an example
script; if you are not using rtrfilter, you can force that installation.
Post by Dan Letkeman
On Sun, Sep 24, 2017 at 7:37 PM, Piegorsch, Weylin William <
Post by Piegorsch, Weylin William
What rancid group is your cron job passing to do-diffs? Is it the same
group that you’ve modified, or a different one? Did you update the
router.db file of the group that do-diffs is executing?
While rancid-run can take a rancid group as an argument, the groups normally
come from LIST_OF_GROUPS in rancid.conf.
I am more suspicious that you have more than one rancid group
(/var/rancid/<groupname>) and you've updated one but not another with the
same devices. another possibility is that permissions are incorrect on
chown -R rancid /var/rancid
Also, look at the rancid logs for given group.
Post by Dan Letkeman
Post by Piegorsch, Weylin William
weylin
*Date: *Friday, September 22, 2017 at 12:13
*Subject: *[rancid] Can't update router.db
Hello,
I have a rancid install on centos. It appears to all be working
however,
Post by Dan Letkeman
Post by Piegorsch, Weylin William
if I replace the contents of the router.db file with the new devices it
still connects to the old ones. I have deleted the file and created a
new
Post by Dan Letkeman
Post by Piegorsch, Weylin William
one with only the new device ip addresses and it still continues to
try and
Post by Dan Letkeman
Post by Piegorsch, Weylin William
get configs from the old devices??? Where is it getting this from?
I am able to clogin to any of the new devices without trouble, so its
not
Post by Dan Letkeman
Post by Piegorsch, Weylin William
a connection issue, but somehow the old router.db file is cached?
drwxr-x---. 2 rancid rancid 24 Sep 22 11:11 configs
-rw-r--r--. 1 rancid rancid 2069 Sep 22 10:48 router.db
10.10.10.1;cisco;up
10.10.10.14;cisco;up
10.10.10.194;cisco;up
10.10.10.5;cisco;up
10.100.104.11;mikrotik;up
10.100.104.12;mikrotik;up
10.100.207.3;mikrotik;up
10.100.207.4;mikrotik;up
10.100.4.10;cisco;up
10.100.4.6;cisco;up
10.104.0.1;cisco;up
10.104.1.11;cisco;up
10.104.12.11;cisco;up
10.105.50.1;cisco;up
10.16.0.1;cisco;up
10.16.1.21;cisco;up
10.16.1.31;cisco;up
10.16.12.11;cisco;up
10.168.0.1;cisco;up
10.168.1.11;cisco;up
10.168.1.21;cisco;up
10.168.1.31;cisco;up
10.168.1.41;cisco;up
10.168.1.51;cisco;up
10.168.12.11;cisco;up
10.175.0.3;mikrotik;up
10.175.0.4;mikrotik;up
etc......
Any help would be appreciated.
Thanks,
Dan.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley
2017-09-26 14:58:55 UTC
Permalink
This post might be inappropriate. Click to display it.
Gauthier, Chris
2017-09-26 17:16:34 UTC
Permalink
This post might be inappropriate. Click to display it.
heasley
2017-09-26 17:42:03 UTC
Permalink
I’m kind of curious if it really is the expect hack or not. I noticed he is using an old version of rancid (3.2.2) because that is what is packaged. I’m running CentOS 7 and rancid 3.6.4 with no issues or hangs. My only issues with getting rancid fully-deployed are internal politics.
More dependent upon the tcl and expect they have. Most expect coding errors
of this sort lead to a timeout. since it is hanging rather than timing-out,
i suspect the tcl bug.
Dan Letkeman
2017-09-26 19:53:22 UTC
Permalink
It appears to be working now. I didn't change anything and its actually
getting the configs from the correct devices.
Post by Gauthier, Chris
Post by Gauthier, Chris
I’m kind of curious if it really is the expect hack or not. I noticed
he is using an old version of rancid (3.2.2) because that is what is
packaged. I’m running CentOS 7 and rancid 3.6.4 with no issues or hangs.
My only issues with getting rancid fully-deployed are internal politics.
More dependent upon the tcl and expect they have. Most expect coding errors
of this sort lead to a timeout. since it is hanging rather than timing-out,
i suspect the tcl bug.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...