[rancid] Re: "End of run not found" troubleshooting

john heasley heas at shrubbery.net
Thu Oct 18 22:34:20 UTC 2007


Thu, Oct 18, 2007 at 03:27:10PM -0600, Aaron Smith:
> I had a similar problem when grabbing configs off Catalyst 4006 devices
> running CatOS.  If you look at the last lines in cat5rancid (or rancid),
> you see:
> 
> # check for completeness
> if (scalar(%commands) || !$clean_run || !$found_end) {
>     if (scalar(%commands)) {
>         printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%
> commands)));
>         printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%
> commands))) if ($debug);
>     }
>     if (!$clean_run || !$found_end) {
>         print STDOUT "$host: End of run not found\n";
>         print STDERR "$host: End of run not found\n" if ($debug);
>         system("/usr/bin/tail -1 $host.new");
>     }
>     unlink "$host.new" if (! $debug);
> }
> 
> I recommend you print out the value of $clean_run and $found_end.  That
> tells you which is causing the problem.  In my case, it was $clean_run.
> For some reason it wasn't seeing the completed "exit" command, and thus
> wouldn't back up the config.  Until I get time to dig in further and
> find the root cause, I inserted these lines before the code block above:
> 
> # I don't care if it sees "exit"
> $clean_run = 1;

It looks for all these tag for a reason; to ensure that everything is
collected.  truncation can occur, and without these it will commit
incomplete configurations to the repository.

re: your exit problem specifically; that is an catOS bug, which I believe
is largely worked-around by a patch someone offered.  try 2.3.2a7.


More information about the Rancid-discuss mailing list