Mailing List Archive

Maximum Config Sizes
Is there a limit for config sizes that RANCID will handle? I have a
NetScreen with a config in the silly numbers, and RANCID only seems to
be capturing the first 1600 or so lines of it. Are there any timeouts
or anything like that which might cause this?

Thanks,
Ras
Maximum Config Sizes [ In reply to ]
I've got >1MB configs under Cisco IOS.

-jr

* Jee Kay <jeekay at gmail.com> [20050706 20:07]:
> Is there a limit for config sizes that RANCID will handle? I have a
> NetScreen with a config in the silly numbers, and RANCID only seems to
> be capturing the first 1600 or so lines of it. Are there any timeouts
> or anything like that which might cause this?
>
> Thanks,
> Ras

--
Josh Richards | Colocation Web Hosting Bandwidth
Digital West Networks | +1 805 781-9378 / www.digitalwest.net
San Luis Obispo, CA | AS14589 (Production) / AS29962 (R&D)
jrichard at digitalwest.net | DWNI - Making Internet Business Better
Maximum Config Sizes [ In reply to ]
On Wed, Jul 06, 2005 at 09:07:19PM +0100, Jee Kay wrote:
> Is there a limit for config sizes that RANCID will handle? I have a
> NetScreen with a config in the silly numbers, and RANCID only seems to
> be capturing the first 1600 or so lines of it. Are there any timeouts
> or anything like that which might cause this?

By default, nrancid calls nlogin with a timeout of 90 seconds. If that's
not long enough for your NetScreen to dump its config, then you won't
get the whole file.

Try running "nrancid -t 120 <routername>" to see if that gives you the rest
of (or more of) the config file. If so, you can edit the default value
of $timeo in nrancid - look for this line:

$timeo = 90; # nlogin timeout in seconds

And adjust accordingly.
Maximum Config Sizes [ In reply to ]
Wed, Jul 06, 2005 at 05:05:55PM -0400, Ed Ravin:
> On Wed, Jul 06, 2005 at 09:07:19PM +0100, Jee Kay wrote:
> > Is there a limit for config sizes that RANCID will handle? I have a
> > NetScreen with a config in the silly numbers, and RANCID only seems to
> > be capturing the first 1600 or so lines of it. Are there any timeouts
> > or anything like that which might cause this?
>
> By default, nrancid calls nlogin with a timeout of 90 seconds. If that's
> not long enough for your NetScreen to dump its config, then you won't
> get the whole file.

the timeout applies to an expect clause. that is, when an expect {}
begins, if $timeo seconds elapse before expect matches something, it
will return a timeout. each match or exp_continue resets the timers.

if there is some part of the configuration that takes a _long_ time to
complete, ie: the output pauses for an extended period, then increasing
the timeout will help.

any clues in the logs?

> Try running "nrancid -t 120 <routername>" to see if that gives you the rest
> of (or more of) the config file. If so, you can edit the default value
> of $timeo in nrancid - look for this line:
>
> $timeo = 90; # nlogin timeout in seconds
>
> And adjust accordingly.
Maximum Config Sizes [ In reply to ]
On 7/6/05, john heasley <heas at shrubbery.net> wrote:
> if there is some part of the configuration that takes a _long_ time to
> complete, ie: the output pauses for an extended period, then increasing
> the timeout will help.

None.. if I nlogin manually and 'get conf' it dumps the entire config
happily to the term. Any ideas for how to debug this further? (oh and
nrancid doesn't support -t :))
Maximum Config Sizes [ In reply to ]
Wed, Jul 06, 2005 at 11:47:44PM +0100, Jee Kay:
> On 7/6/05, john heasley <heas at shrubbery.net> wrote:
> > if there is some part of the configuration that takes a _long_ time to
> > complete, ie: the output pauses for an extended period, then increasing
> > the timeout will help.
>
> None.. if I nlogin manually and 'get conf' it dumps the entire config
> happily to the term. Any ideas for how to debug this further? (oh and
> nrancid doesn't support -t :))

First I'd look at the logs for clues, then

% NOPIPE=YES
% nrancid -d host

and check .raw file to make sure it is complete. if it, then I'd start
looking at nrancid for bugs that cause the matching within GetConf to
return to the main loop.
Maximum Config Sizes [ In reply to ]
On 7/6/05, Jee Kay <jeekay at gmail.com> wrote:

> None.. if I nlogin manually and 'get conf' it dumps the entire config
> happily to the term. Any ideas for how to debug this further? (oh and
> nrancid doesn't support -t :))

That was obviously meant in response to the 'is there anything in the
log' paragraph, rather than what I quoted.

Also, 'time' says it quits after around 44 seconds when using nrancid.
When doing nlogin -c'show conf' directly, it also finishes afer 44
seconds, except that way it outputs the entire config correctly.

There don't appear to be any accidental hits of the prompt regexp
(even though it really is rather looser than it probably should be..)
Maximum Config Sizes [ In reply to ]
On 7/6/05, john heasley <heas at shrubbery.net> wrote:

> % NOPIPE=YES
> % nrancid -d host
>
> and check .raw file to make sure it is complete. if it, then I'd start
> looking at nrancid for bugs that cause the matching within GetConf to
> return to the main loop.

(yay for crossing emails)

With NOPIPE, the .raw correctly contains the full output of the
config. The .new however does not. I shall dig deeper into nrancid
when I have a chance and see what is causing a bogus match.

Thanks for the quick response!
Maximum Config Sizes [ In reply to ]
On 7/6/05, Jee Kay <jeekay at gmail.com> wrote:
> With NOPIPE, the .raw correctly contains the full output of the
> config. The .new however does not. I shall dig deeper into nrancid
> when I have a chance and see what is causing a bogus match.

(apologies for the context diff.. stupid solaris)

> diff nrancid.orig nrancid
269c269
< $prompt = "\-\>\s*";
---
> $prompt = "^[A-Za-z0-9\(\)]+\-\>\s*";
Maximum Config Sizes [ In reply to ]
Thu, Jul 07, 2005 at 12:07:06AM +0100, Jee Kay:
> On 7/6/05, Jee Kay <jeekay at gmail.com> wrote:
> > With NOPIPE, the .raw correctly contains the full output of the
> > config. The .new however does not. I shall dig deeper into nrancid
> > when I have a chance and see what is causing a bogus match.
>
> (apologies for the context diff.. stupid solaris)
>
> > diff nrancid.orig nrancid
> 269c269
> < $prompt = "\-\>\s*";
> ---
> > $prompt = "^[A-Za-z0-9\(\)]+\-\>\s*";

the most recent nrancid matches more explicitly.

$prompt = ($_ =~ /^([^>]+->)/)[0];
$prompt =~ s/([][}{)(\\])/\\$1/g;

Does that work for you?
Maximum Config Sizes [ In reply to ]
On 7/7/05, john heasley <heas at shrubbery.net> wrote:

> the most recent nrancid matches more explicitly.

It looks like that should work - the NetScreens have different prompts
depending on what mode they've decided to be in that day, but [^>]
looks safe.

Is there any chance you could do a new rollup for 2.3.2 with the
autoconf fix and any new fixes/features in ?

Thanks,
Ras
Maximum Config Sizes [ In reply to ]
Thu, Jul 07, 2005 at 12:14:39AM +0100, Jee Kay:
> On 7/7/05, john heasley <heas at shrubbery.net> wrote:
>
> > the most recent nrancid matches more explicitly.
>
> It looks like that should work - the NetScreens have different prompts
> depending on what mode they've decided to be in that day, but [^>]
> looks safe.
>
> Is there any chance you could do a new rollup for 2.3.2 with the
> autoconf fix and any new fixes/features in ?

ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.2a2.tar.gz

note that the included nlogin supports -t.

should be stable as it does not include any of the half-done/integrated bits :)