[rancid] [patch] unexpected command - "write term" in newer Foundry devices

heasley heas at shrubbery.net
Tue Jul 12 14:40:11 UTC 2016


Tue, Jul 12, 2016 at 11:57:34AM +0200, Erik Muller:
> On 7/11/16 23:46 , heasley wrote:
> > This should be handled by the existing code.  There must be another root
> > cause.  Perhaps you would send the output of the following command to me?
> > 
> > eval `rancid -t foundry -C cer.r8.atl` > output 2>&1
> 
> Sure thing, attached.
> 
> I do see a bit in WriteTerm that looks like it should be handling that, though it seems to kick it back to the inner loop of inloop with the "Invalid" line still as the current line of $INPUT.  I guess either inloop would need to know from the return code that it needed to break out of the current command loop for that to do the trick. 
> 
> Also this may be useful:
> $ rancid -d -t foundry cer.r8.atl                  
> loadtype: device type foundry
> loadtype: found device type foundry in /opt/local/etc/rancid/rancid.types.base
> executing flogin -t 90 -c"show version;show chassis;show module;show flash;write term;show running-config" cer.r8.atl
> PROMPT MATCH: SSH at er1-pp.c8.56M#
> HIT COMMAND:SSH at er1-pp.c8.56M#show version
>     In ShowVersion: SSH at er1-pp.c8.56M#show version
> HIT COMMAND:SSH at er1-pp.c8.56M#show chassis
>     In ShowChassis: SSH at er1-pp.c8.56M#show chassis
> HIT COMMAND:SSH at er1-pp.c8.56M#show module
>     In ShowModule: SSH at er1-pp.c8.56M#show module
> HIT COMMAND:SSH at er1-pp.c8.56M#show flash
>     In ShowFlash: SSH at er1-pp.c8.56M#show flash
> HIT COMMAND:SSH at er1-pp.c8.56M#write term
>     In WriteTerm: SSH at er1-pp.c8.56M#write term
> HIT COMMAND:Invalid input -> write term
> cer.r8.atl: found unexpected command - "write term"

ah, this is what I did not "see"; I just had the process in mind.  You are
correct.  Thanks for the patch!



More information about the Rancid-discuss mailing list