Discussion:
[rancid] Rancid isn't scanning the f5s from cron job.
Matt Almgren
2015-07-13 17:31:49 UTC
Permalink
Very strange behavior here that I can’t pinpoint.

When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no args) it picks them up – no problem.

Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run

router.db:
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>

Files:
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan

Again, running manually, it works just fine.

The logs from the cron job show me what I already know:


Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key


But when I run it manually:



Trying to get all of the configs.
All routers sucessfully completed.



Anyone have any clues/ideas?

Thanks, Matt
Scott Granados
2015-07-13 18:01:36 UTC
Permalink
I’m not sure if this matters but I had to use ;s instead of :s in the router.db. This was a change that appeared fairly recently and popped up for me when I upgraded from 2.3.6 to 3.2.

so you might try something like

bigip;f5;up
Post by Matt Almgren
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no args) it picks them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Matt Almgren
2015-07-13 18:10:44 UTC
Permalink
Hi Scott, I’ll be moving to 3.x soon, but this is currently 2.3.8. All the other devices in the router.db run fine, just not our f5s in two different groups.

Thanks, Matt




From: Scott Granados <***@gmail.com<mailto:***@gmail.com>>
Date: Monday, July 13, 2015 at 11:01 AM
To: Matt Almgren <***@surveymonkey.com<mailto:***@surveymonkey.com>>
Cc: "rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>" <rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>>
Subject: Re: [rancid] Rancid isn't scanning the f5s from cron job.

I’m not sure if this matters but I had to use ;s instead of :s in the router.db. This was a change that appeared fairly recently and popped up for me when I upgraded from 2.3.6 to 3.2.

so you might try something like

bigip;f5;up

On Jul 13, 2015, at 1:31 PM, Matt Almgren <***@surveymonkey.com<mailto:***@surveymonkey.com>> wrote:

Very strange behavior here that I can’t pinpoint.

When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no args) it picks them up – no problem.

Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run

router.db:
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>

Files:
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan

Again, running manually, it works just fine.

The logs from the cron job show me what I already know:


Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key


But when I run it manually:



Trying to get all of the configs.
All routers sucessfully completed.



Anyone have any clues/ideas?

Thanks, Matt
Ehud Gavron
2015-07-13 19:51:09 UTC
Permalink
I've found that some of the older rancid scripts work great from a terminal
logged in with an environment, but fail when run by cron.

Specifically I have ensured that $HOME is defined for all rancid jobs, and
have also set the terminal type.

Debugging: in f5rancid, right after the creation of $host.new and $host.raw
preserve those files, by adding
cp $host.* /tmp/

That will give you a very good indication of
- whether the login succeeded
- what commands were sent
- what commands got an expected response
- what commands broke the script

Note: if you want to try and figure out if it's an environmental variable,
then before doing rancid-run clear all your environmental variables and
try rancid-run then. If it fails, add them back in to figure out what it
needs.

Ehud
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no
args) it picks them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alan McKinnon
2015-07-13 20:00:40 UTC
Permalink
Post by Ehud Gavron
I've found that some of the older rancid scripts work great from a terminal
logged in with an environment, but fail when run by cron.
This is highly likely to be the OP's root cause, it's a classic mistake
when using cron.

rancid probably can't find the *login scripts as /usr/lib/rancid/bin/ is
unlikely to be in PATH.

Golden rule: Always always always use fully qualified paths everywhere
in scripts launched from cron, and never rely on handy features provided
by the shell to make a user's life easier.

$PATH is a user feature, not a system one. The system works best when
$PATH is not set for cron and friends.
Post by Ehud Gavron
Specifically I have ensured that $HOME is defined for all rancid jobs, and
have also set the terminal type.
Debugging: in f5rancid, right after the creation of $host.new and $host.raw
preserve those files, by adding
cp $host.* /tmp/
That will give you a very good indication of
- whether the login succeeded
- what commands were sent
- what commands got an expected response
- what commands broke the script
Note: if you want to try and figure out if it's an environmental variable,
then before doing rancid-run clear all your environmental variables and
try rancid-run then. If it fails, add them back in to figure out what it
needs.
Ehud
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no
args) it picks them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
***@gmail.com
Matt Almgren
2015-07-13 20:02:52 UTC
Permalink
I could see that being a problem if it was an all-or-nothing type of scenario. But in my situation – 40 devices are working just fine. But 4 are not. And the only thing they have in common is that they are f5. Are you saying this is specific to the f5rancid script?

I’m trying to figure out if this has any thing to do with it "/config/ssl/ssl.key” that the log mentions?

I’ll try the remove environment test and see what happens, but if that’s it – how do I fix it for cron?

— Matt


From: Ehud Gavron <***@wetwork.net<mailto:***@wetwork.net>>
Date: Monday, July 13, 2015 at 12:51 PM
To: Matt Almgren <***@surveymonkey.com<mailto:***@surveymonkey.com>>, "rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>" <rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>>
Subject: Re: [rancid] Rancid isn't scanning the f5s from cron job.

I've found that some of the older rancid scripts work great from a terminal
logged in with an environment, but fail when run by cron.

Specifically I have ensured that $HOME is defined for all rancid jobs, and
have also set the terminal type.

Debugging: in f5rancid, right after the creation of $host.new and $host.raw
preserve those files, by adding
cp $host.* /tmp/

That will give you a very good indication of
- whether the login succeeded
- what commands were sent
- what commands got an expected response
- what commands broke the script

Note: if you want to try and figure out if it's an environmental variable,
then before doing rancid-run clear all your environmental variables and
try rancid-run then. If it fails, add them back in to figure out what it
needs.

Ehud

On 07/13/2015 10:31 AM, Matt Almgren wrote:
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no
args) it picks them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
router.db:
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
Files:
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
The logs from the cron job show me what I already know:
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
But when I run it manually:
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
John Kougoulos
2015-07-14 07:38:38 UTC
Permalink
HI,

try changing in f5rancid this one:
$ENV{'TERM'} = "vt100";

to:
$ENV{'TERM'} = "vt100-w";

Regards,
John
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple
locations. But when I run “rancid-run” manually (with no args) it picks
them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.key,ls --full-time --color=never
/config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time
--color=never /config/ssl/ssl.crt,ls --full-time --color=never
/config/ssl/ssl.key
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Matt Almgren
2015-07-14 17:22:06 UTC
Permalink
That did the trick!! Thank you very much.

Does that simply change the output to wide-mode or similar?

— Matt






From: John Kougoulos <***@gmail.com<mailto:***@gmail.com>>
Date: Tuesday, July 14, 2015 at 12:38 AM
To: Matt Almgren <***@surveymonkey.com<mailto:***@surveymonkey.com>>
Cc: "rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>" <rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>>
Subject: Re: [rancid] Rancid isn't scanning the f5s from cron job.

HI,

try changing in f5rancid this one:
$ENV{'TERM'} = "vt100";

to:
$ENV{'TERM'} = "vt100-w";

Regards,
John

On Mon, Jul 13, 2015 at 7:31 PM, Matt Almgren <***@surveymonkey.com<mailto:***@surveymonkey.com>> wrote:
Very strange behavior here that I can’t pinpoint.

When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with no args) it picks them up – no problem.

Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run

router.db:
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>

Files:
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan

Again, running manually, it works just fine.

The logs from the cron job show me what I already know:


Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com<http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com<http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key


But when I run it manually:



Trying to get all of the configs.
All routers sucessfully completed.



Anyone have any clues/ideas?

Thanks, Matt
Ehud Gavron
2015-07-14 17:27:05 UTC
Permalink
vt100-w is wide mode - 132 characters.

http://www.lehman.cuny.edu/cgi-bin/man-cgi?terminfo+4

E
Post by Matt Almgren
That did the trick!! Thank you very much.
Does that simply change the output to wide-mode or similar?
— Matt
Date: Tuesday, July 14, 2015 at 12:38 AM
Subject: Re: [rancid] Rancid isn't scanning the f5s from cron job.
HI,
$ENV{'TERM'} = "vt100";
$ENV{'TERM'} = "vt100-w";
Regards,
John
Very strange behavior here that I can’t pinpoint.
When the cron job runs once per day, it doesn’t scan our f5s in multiple locations. But when I run “rancid-run” manually (with
no args) it picks them up – no problem.
Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run
<snip>
mt-lr01.endor.lan:juniper:up
mt-lb03.endor.lan:f5:up
mt-lb04.endor.lan:f5:up
<snip>
-rw-r----- 1 rancid rancid 1072279 Jul 8 11:36 mt-lb04.endor.lan
-rw-r----- 1 rancid rancid 1072475 Jul 8 11:36 mt-lb03.endor.lan
-rw-r----- 1 rancid rancid 22647 Jul 10 10:01 mt-er01.endor.lan
-rw-r----- 1 rancid rancid 22211 Jul 10 10:01 mt-er02.endor.lan
Again, running manually, it works just fine.
Trying to get all of the configs.
mt-lb03.corp.surveymonkey.com <http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com <http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
mt-lb03.corp.surveymonkey.com <http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb04.corp.surveymonkey.com <http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 2.
mt-lb04.corp.surveymonkey.com <http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
mt-lb03.corp.surveymonkey.com <http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
mt-lb04.corp.surveymonkey.com <http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb03.corp.surveymonkey.com <http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
=====================================
Getting missed routers: round 4.
mt-lb03.corp.surveymonkey.com <http://mt-lb03.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.key,ls --full-time --color=never /config/ssl/ssl.crt
mt-lb04.corp.surveymonkey.com <http://mt-lb04.corp.surveymonkey.com>: missed cmd(s): ls --full-time --color=never
/config/ssl/ssl.crt,ls --full-time --color=never /config/ssl/ssl.key
Trying to get all of the configs.
All routers sucessfully completed.
Anyone have any clues/ideas?
Thanks, Matt
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...