[rancid] missed cmds, but only when run from cron

Alan McKinnon alan.mckinnon at gmail.com
Wed Aug 14 05:53:49 UTC 2013


If it truly is a case that the script always fails when run from the
commandline and always fails when run from cron, then the problem is
almost certainly one of two thing

1. Your cron is set to run when something else is happening on the
network, and this increased activity is too much. This is rare.
2. Shell environment issues. This is very common as cron tends to run
with an empty environment and rancid's login shell does not.

Print out your environment as the rancid user and add likely things as
envvars to the crontab one by one till you find one that fixes the problem.

On 14/08/2013 02:22, Brent Wiese wrote:
> This is boggling my mind.
> 
>  
> 
> I slightly modified the f5rancid script to work with their version 11
> TMOS. Basically, all it does is “show running-config” and then runs
> “quit” instead of “exit” when it finds the prompt.
> 
>  
> 
> This has been working just fine for our existing load balancers. But we
> recently added a new set. The first run appears to work. Then I start
> getting this in the logs:
> 
>  
> 
>  
> 
> starting: Tue Aug 13 17:02:11 MST 2013
> 
>  
> 
> cvs add: lb01.my.domain already exists, with version number 1.4
> 
> Added lb01.my.domain
> 
>  
> 
> Trying to get all of the configs.
> 
> lb01.my.domain: (v11) missed cmd(s): show running-config
> 
> lb01.my.domain: (v11) End of run not found
> 
> #
> 
>  
> 
> I don’t get it – if I run f5rancid_v11 (my modified copy), it runs just
> fine and the “.new” file is there with all the info I need. It’s only
> when it’s run from cron that it throws any kind of error. F5login runs
> fine too (or f5rancid_v11 would fail). I added the “(v11)” in the log
> line area to confirm it’s running the correct script when it does
> rancid-run.
> 
>  
> 
> Since it’s logging errors, I don’t think it’s any kind of permissions
> error. But I am running as the same user as the cron job.
> 
>  
> 
> All my other configs are coming in and diff’ing just fine, so I don’t
> think it’s a CVS issue (or the ability to write temp files for example).
> 
>  
> 
> Any ideas?
> 
>  
> 
> Thanks!
> 
> 
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> 


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list