[rancid] end of run not found

Wayne Eisenberg Wayne.Eisenberg at CarolinasIT.com
Sat Dec 15 13:05:23 UTC 2018


> -----Original Message-----
> From: 'heasley' [mailto:heas at shrubbery.net]
> Sent: Friday, December 14, 2018 4:36 PM
> To: Wayne Eisenberg <Wayne.Eisenberg at CarolinasIT.com>
> Cc: 'heasley' <heas at shrubbery.net>; 'rancid-discuss at shrubbery.net'
> <rancid-discuss at shrubbery.net>
> Subject: Re: [rancid] end of run not found
> 
> Fri, Dec 14, 2018 at 04:15:41PM +0000, Wayne Eisenberg:
> > > > > Thu, Dec 13, 2018 at 07:55:29AM +0000, Wayne Eisenberg:
> > > > > > Regarding some PowerConnect N2000/3000/4000 series switches, I
> > > > > > am
> > > > > getting "End of run not found" errors. If I use the smc type
> > > > > that is recommended in the rancid.types.base file, I have the
> > > > > added pleasure of getting "missed cmd(s): show version, dir,
> > > > > show vlan". Trying cisco as a type doesn't change the 'end of
> > > > > run' error, although I don't miss
> > > any commands.
> > > > > Trying my powerconnect type that I made earlier also results in
> > > > > 'end of run not found'.
> > > > > >
> > > > > > Running 'clogin -c"dir,show version,show running-config"
> switchname'
> > > > > works perfectly and returns to the command prompt.
> > > > > >
> > > > > > How do I troubleshoot 'end of run not found'?
> > > > > >
> > > > >
> > > > > it means that it did not find the end of the config.  look at
> > > > > the raw output and srancid -dl <hostname> for missed command
> > > > > matches.  I suspect that it srancid is not recognizing the
> > > > > prompt due to mangled input or unexpected characters in the prompt.
> > > >
> > > > How does one look at raw output?
> > > >
> > > >
> > > export NOPIPE YES ; srancid -dl <hostname> leaves hostname.raw
> >
> > I'm not seeing the problem.
> >
> > I ran:
> > export NOPIPE YES; rancid -t powerconnect -dl tco-core
>                ^=
> 
> > where:
> > powerconnect;script;rancid -t powerconnect powerconnect;login;clogin
> > powerconnect;module;dell powerconnect;inloop;dell::inloop
> > powerconnect;command;dell::GetSystem;show system
> > powerconnect;command;dell::GetConf;show running-config
> >
> > (I remarked out the sub GetFile from dell.pm for testing only)
> >
> > I got:
> > loadtype: device type powerconnect
> > loadtype: found device type powerconnect in
> > /usr/local/rancid3/etc/rancid.types.conf
> > executing clogin -t 90 -c"show system;show running-config" tco-core
> > HIT COMMAND:TCO-CORE#show system
> >     In GetSystem: TCO-CORE#show system HIT COMMAND:TCO-CORE#show
> > running-config
> >     In GetConf: TCO-CORE#show running-config Done clogin:
> > tco-core: End of run not found
> > tco-core: clean_run is false
> 
> implies it didnt find the prompt & command where it logs-out from the
> device.
> see match in dell::inloop.
> 
> > exit
> >
> > And the .new file has a full copy of both 'show system' and 'show running-
> config'. No obvious mistakes.
> >
> > Interestingly, if I put the GetFile sub back in and add it to the
> rancid.types.conf file, I get the same error and the .new file is the same - no
> directory listing. Weird.
> 
> that function is discarding its input except for the last line, as I inheritted it.
> welcome a patch make it do something more useful.
> 
> > Any other type of debugging that can be done?
> >
> >

There you go. The dell.pm is looking for 
if (/[>#]\s?exit$/)
but these switches don't put the exit statement on a separate line (or maybe we don't see it because of the ' tr/\015//d;' statement right before the if statement ). In any case, the end of the session looks like:
TCO-CORE>exitConnection to tco-core closed.

So get rid of the $ at the end of the expression, and it works.

Thanks again for your help.





More information about the Rancid-discuss mailing list