[rancid] Can't update router.db

Piegorsch, Weylin William weylin at bu.edu
Tue Sep 26 14:34:16 UTC 2017


Hi Dan,

Run the command “ps  aux”.  you’ll probably find rancid being stuck on some device or another.  You can log in to that device and kill the telnet/ssh session from there, or you can kill the ssh session on the Linux CLI (kill -9- <pid>).

weylin

From: Dan Letkeman <danletkeman at gmail.com>
Date: Tuesday, September 26, 2017 at 09:43
To: heasley <heas at shrubbery.net>
Cc: Weylin Piegorsch <weylin at bu.edu>, rancid-discuss <rancid-discuss at shrubbery.net>
Subject: Re: [rancid] Can't update router.db

Looks like there is only one group and the permissions look correct to me.

[root at observium /]# cd /var/rancid/
[root at observium rancid]# ls
logs  observium  SVN
[root at observium rancid]# cd logs
[root at observium logs]# ls
[root at observium logs]# cd ..
[root at observium rancid]# cd observium/
[root at observium observium]# ls
configs  old  router.db  routers.all  routers.down  routers.up
[root at 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
[root at 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<http://observium.gvsd.ca>?  Old lockfile still exists:
-rw-r-----. 1 rancid rancid 0 Sep 22 11:25 /tmp/.observium.run.lock


Dan.

On Mon, Sep 25, 2017 at 10:33 PM, heasley <heas at shrubbery.net<mailto:heas at shrubbery.net>> wrote:
Mon, Sep 25, 2017 at 08:19:53AM -0500, Dan Letkeman:
> 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<http://newgetopt.pl>)
>            Removing: perl-Perl4-CoreLibs-0.001-291.el7.noarch (@base)
>                perl(newgetopt.pl<http://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.

> On Sun, Sep 24, 2017 at 7:37 PM, Piegorsch, Weylin William <weylin at bu.edu<mailto:weylin at bu.edu>>
> wrote:
>
> > 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.

> > weylin
> >
> >
> >
> > *From: *Dan Letkeman <danletkeman at gmail.com<mailto:danletkeman at gmail.com>>
> > *Date: *Friday, September 22, 2017 at 12:13
> > *To: *rancid-discuss <rancid-discuss at shrubbery.net<mailto:rancid-discuss at 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.
> >
> _______________________________________________
> 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/20170926/80c14d06/attachment.html>


More information about the Rancid-discuss mailing list