<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>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?  </div>
<div>
<div><br>
</div>
<div>I’m trying to figure out if this has any thing to do with it "/config/ssl/ssl.key” that the log mentions?  </div>
<div><br>
</div>
</div>
</div>
</div>
<div>I’ll try the remove environment test and see what happens, but if that’s it – how do I fix it for cron? </div>
<div><br>
</div>
<div> — Matt</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Ehud Gavron <<a href="mailto:gavron@wetwork.net">gavron@wetwork.net</a>><br>
<span style="font-weight:bold">Date: </span>Monday, July 13, 2015 at 12:51 PM<br>
<span style="font-weight:bold">To: </span>Matt Almgren <<a href="mailto:matta@surveymonkey.com">matta@surveymonkey.com</a>>, "<a href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a>" <<a href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [rancid] Rancid isn't scanning the f5s from cron job.<br>
</div>
<div><br>
</div>
<div>
<div>
<div>I've found that some of the older rancid scripts work great from a terminal</div>
<div>logged in with an environment, but fail when run by cron.</div>
<div><br>
</div>
<div>Specifically I have ensured that $HOME is defined for all rancid jobs, and</div>
<div>have also set the terminal type.</div>
<div><br>
</div>
<div>Debugging: in f5rancid, right after the creation of $host.new and $host.raw</div>
<div>preserve those files, by adding</div>
<div>   cp $host.* /tmp/</div>
<div><br>
</div>
<div>That will give you a very good indication of</div>
<div>- whether the login succeeded</div>
<div>- what commands were sent</div>
<div>- what commands got an expected response</div>
<div>- what commands broke the script</div>
<div><br>
</div>
<div>Note: if you want to try and figure out if it's an environmental variable,</div>
<div>then before doing rancid-run clear all your environmental variables and</div>
<div>try rancid-run then.  If it fails, add them back in to figure out what it</div>
<div>needs.</div>
<div><br>
</div>
<div>Ehud</div>
<div><br>
</div>
<div>On 07/13/2015 10:31 AM, Matt Almgren wrote:</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>Very strange behavior here that I can’t pinpoint.  </div>
<div></div>
<div>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</div>
<div>args) it picks them up – no problem.</div>
<div></div>
<div>Cron: 59 9 * * * /usr/lib/rancid/bin/rancid-run</div>
<div></div>
<div>router.db:</div>
<div><snip></div>
<div>mt-lr01.endor.lan:juniper:up</div>
<div>mt-lb03.endor.lan:f5:up</div>
<div>mt-lb04.endor.lan:f5:up</div>
<div><snip></div>
<div></div>
<div>Files:</div>
<div>-rw-r----- 1 rancid rancid 1072279 Jul  8 11:36 mt-lb04.endor.lan</div>
<div>-rw-r----- 1 rancid rancid 1072475 Jul  8 11:36 mt-lb03.endor.lan</div>
<div>-rw-r----- 1 rancid rancid   22647 Jul 10 10:01 mt-er01.endor.lan</div>
<div>-rw-r----- 1 rancid rancid   22211 Jul 10 10:01 mt-er02.endor.lan</div>
<div></div>
<div>Again, running manually, it works just fine.</div>
<div></div>
<div>The logs from the cron job show me what I already know:</div>
<div></div>
<div></div>
<div>Trying to get all of the configs.</div>
<div>mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div>mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div>=====================================</div>
<div>Getting missed routers: round 1.</div>
<div>mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div>mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never</div>
<div>/config/ssl/ssl.crt</div>
<div>=====================================</div>
<div>Getting missed routers: round 2.</div>
<div>mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div>mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div>=====================================</div>
<div>Getting missed routers: round 3.</div>
<div>mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never</div>
<div>/config/ssl/ssl.crt</div>
<div>mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never</div>
<div>/config/ssl/ssl.crt</div>
<div>=====================================</div>
<div>Getting missed routers: round 4.</div>
<div>mt-lb03.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.key,ls --full-time --color=never</div>
<div>/config/ssl/ssl.crt</div>
<div>mt-lb04.corp.surveymonkey.com: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls --full-time --color=never</div>
<div>/config/ssl/ssl.key</div>
<div></div>
<div></div>
<div>But when I run it manually:</div>
<div></div>
<div></div>
<div></div>
<div>Trying to get all of the configs.</div>
<div>All routers sucessfully completed.</div>
<div></div>
<div></div>
<div></div>
<div>Anyone have any clues/ideas?</div>
<div></div>
<div>Thanks, Matt</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div>_______________________________________________</div>
<div>Rancid-discuss mailing list</div>
<div><a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a></div>
<div><a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a></div>
<div></div>
</blockquote>
<div><br>
</div>
</div>
</div>
</span>
</body>
</html>