Discussion:
[rancid] After upgrade rancid works, rancid-run does not work
Schmidt, Daniel
2009-10-28 20:56:51 UTC
Permalink
Many apologies if somebody has answered this - Rancid has always worked
for me before and I'm new to the list. Any assistance greatly
appreciated.

clogin and rancid work fine after upgrade, given the correct PATH.
clogin logs in correctly, rancid correctly creates a router.new file.
rancid-run does not work. The log is empty and tacacs logs show that it
didn't even try to login.

***@che-rancid-001:~/var/logs$ cat group_name.20091028.142620
starting: Wed Oct 28 14:26:20 MDT 2009



ending: Wed Oct 28 14:26:21 MDT 2009
***@che-rancid-001:~/var/logs$

Everything seemed to install to the correct location with the following
configure.
./configure --localstatedir=/home/rancid --prefix=/home/rancid

I tried a new rancid.conf including the new CVSROOT commands, but have
not have any luck. Suggestions greatly appreciated!

-Dan
john heasley
2009-10-28 21:45:14 UTC
Permalink
Post by Schmidt, Daniel
Many apologies if somebody has answered this - Rancid has always worked
for me before and I'm new to the list. Any assistance greatly
appreciated.
clogin and rancid work fine after upgrade, given the correct PATH.
clogin logs in correctly, rancid correctly creates a router.new file.
rancid-run does not work. The log is empty and tacacs logs show that it
didn't even try to login.
starting: Wed Oct 28 14:26:20 MDT 2009
ending: Wed Oct 28 14:26:21 MDT 2009
Everything seemed to install to the correct location with the following
configure.
./configure --localstatedir=/home/rancid --prefix=/home/rancid
I tried a new rancid.conf including the new CVSROOT commands, but have
not have any luck. Suggestions greatly appreciated!
did routers.up get populated properly? if not, i'm guess is youre on
linux and configure screwed-up figuring out the options to diff.
Schmidt, Daniel
2009-10-29 15:10:11 UTC
Permalink
Thanks for your suggestion! I am on Linux, however, the contents of
routers.up seem correct. Is there other troubleshooting I can do?

-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Wednesday, October 28, 2009 3:45 PM
To: Schmidt, Daniel
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] After upgrade rancid works, rancid-run does not
work
Post by Schmidt, Daniel
Many apologies if somebody has answered this - Rancid has always worked
for me before and I'm new to the list. Any assistance greatly
appreciated.
clogin and rancid work fine after upgrade, given the correct PATH.
clogin logs in correctly, rancid correctly creates a router.new file.
rancid-run does not work. The log is empty and tacacs logs show that it
didn't even try to login.
starting: Wed Oct 28 14:26:20 MDT 2009
ending: Wed Oct 28 14:26:21 MDT 2009
Everything seemed to install to the correct location with the
following
Post by Schmidt, Daniel
configure.
./configure --localstatedir=/home/rancid --prefix=/home/rancid
I tried a new rancid.conf including the new CVSROOT commands, but have
not have any luck. Suggestions greatly appreciated!
did routers.up get populated properly? if not, i'm guess is youre on
linux and configure screwed-up figuring out the options to diff.
Schmidt, Daniel
2009-10-30 19:29:43 UTC
Permalink
I believe this appears to be a control_rancid bug with inconsistent
capitalization. Possible regression as it seemed to work before.

You've got perl that lowercases everything here:

205 perl -F: -ane '{($F[0] =~ ***@A-***@a-z@,print "$F[0]:$F[1]\n")
206 if ($F[2] =~ /^up$/i);}' routers.db > routers.up.new
207 if [ ! -f routers.up ] ; then touch routers.up; fi
208 diff -U 4 routers.up routers.up.new > /dev/null 2>&1; RUP=$?

So, if somebody uses an uppercase character, it will never match here:

356 # if a device (-r) was specified, see if that device is in this
group
357 if [ "X$device" != "X" ] ; then
358 trap 'rm -fr $TMP $DIR/routers.single;' 1 2 15
359 devlistfile="$DIR/routers.single"
360 grep "^$device:" routers.up > $devlistfile
361 if [ $? -eq 1 ] ; then
362 exit;
363 fi
364 else
365 devlistfile="$DIR/routers.up"
366 fi

It exits, conveniently without any error, at 362.

I implemented a primitive fix to solve my problem.

51 tolower()
52 {
53 local char="$*"
54
55 out=$(echo $char | tr [:upper:] [:lower:])
56 local retval=$?
57 echo "$out"
58 unset out
59 unset char
60 return $retval
61 }

90 device=$(tolower "$1")


-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Schmidt,
Daniel
Sent: Thursday, October 29, 2009 9:10 AM
To: john heasley
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: After upgrade rancid works, rancid-run does not
work

Thanks for your suggestion! I am on Linux, however, the contents of
routers.up seem correct. Is there other troubleshooting I can do?

-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Wednesday, October 28, 2009 3:45 PM
To: Schmidt, Daniel
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] After upgrade rancid works, rancid-run does not
work
Post by Schmidt, Daniel
Many apologies if somebody has answered this - Rancid has always worked
for me before and I'm new to the list. Any assistance greatly
appreciated.
clogin and rancid work fine after upgrade, given the correct PATH.
clogin logs in correctly, rancid correctly creates a router.new file.
rancid-run does not work. The log is empty and tacacs logs show that it
didn't even try to login.
starting: Wed Oct 28 14:26:20 MDT 2009
ending: Wed Oct 28 14:26:21 MDT 2009
Everything seemed to install to the correct location with the
following
Post by Schmidt, Daniel
configure.
./configure --localstatedir=/home/rancid --prefix=/home/rancid
I tried a new rancid.conf including the new CVSROOT commands, but have
not have any luck. Suggestions greatly appreciated!
did routers.up get populated properly? if not, i'm guess is youre on
linux and configure screwed-up figuring out the options to diff.
Witteveen, Tim
2009-10-30 23:07:53 UTC
Permalink
I just found out a new project ordered some BNT switches. I don't' have
them yet, but would like to integrate them into rancid. Anyone have
rancid working on these already? What did you set the device type to?

I'd like to get a jump on this before it gets here, so I can get things
going as quick as possible.

They will be running bladeos v1.1.1

Cheers,
Tim Witteveen
john heasley
2009-11-02 22:52:24 UTC
Permalink
Post by Schmidt, Daniel
I believe this appears to be a control_rancid bug with inconsistent
capitalization. Possible regression as it seemed to work before.
206 if ($F[2] =~ /^up$/i);}' routers.db > routers.up.new
207 if [ ! -f routers.up ] ; then touch routers.up; fi
208 diff -U 4 routers.up routers.up.new > /dev/null 2>&1; RUP=$?
thanks for catching that. i think that grep -i is sufficient...for you
silly caps people :)
Post by Schmidt, Daniel
356 # if a device (-r) was specified, see if that device is in this
group
357 if [ "X$device" != "X" ] ; then
358 trap 'rm -fr $TMP $DIR/routers.single;' 1 2 15
359 devlistfile="$DIR/routers.single"
360 grep "^$device:" routers.up > $devlistfile
361 if [ $? -eq 1 ] ; then
362 exit;
363 fi
364 else
365 devlistfile="$DIR/routers.up"
366 fi
It exits, conveniently without any error, at 362.
I implemented a primitive fix to solve my problem.
51 tolower()
52 {
53 local char="$*"
54
55 out=$(echo $char | tr [:upper:] [:lower:])
56 local retval=$?
57 echo "$out"
58 unset out
59 unset char
60 return $retval
61 }
90 device=$(tolower "$1")
-----Original Message-----
Daniel
Sent: Thursday, October 29, 2009 9:10 AM
To: john heasley
Subject: [rancid] Re: After upgrade rancid works, rancid-run does not
work
Thanks for your suggestion! I am on Linux, however, the contents of
routers.up seem correct. Is there other troubleshooting I can do?
-----Original Message-----
Sent: Wednesday, October 28, 2009 3:45 PM
To: Schmidt, Daniel
Subject: Re: [rancid] After upgrade rancid works, rancid-run does not
work
Post by Schmidt, Daniel
Many apologies if somebody has answered this - Rancid has always
worked
Post by Schmidt, Daniel
for me before and I'm new to the list. Any assistance greatly
appreciated.
clogin and rancid work fine after upgrade, given the correct PATH.
clogin logs in correctly, rancid correctly creates a router.new file.
rancid-run does not work. The log is empty and tacacs logs show that
it
Post by Schmidt, Daniel
didn't even try to login.
starting: Wed Oct 28 14:26:20 MDT 2009
ending: Wed Oct 28 14:26:21 MDT 2009
Everything seemed to install to the correct location with the
following
Post by Schmidt, Daniel
configure.
./configure --localstatedir=/home/rancid --prefix=/home/rancid
I tried a new rancid.conf including the new CVSROOT commands, but have
not have any luck. Suggestions greatly appreciated!
did routers.up get populated properly? if not, i'm guess is youre on
linux and configure screwed-up figuring out the options to diff.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Continue reading on narkive:
Loading...