[rancid] Prompt detection eats exit, clean run not found

Brandon Ewing nicotine at warningg.com
Fri Jan 5 15:40:28 UTC 2018


It appears that several modules for rancid rely on non-prompt exits from
specific commands (IE, "end" at the end of WriteTerm) to ensure that the
"exit" string is available for inloop to detect to mark a clean run.

Devices that do not have an end marker, or custom types that do not have
WriteTerm last, have to fall back on prompt detection, which in most
modules, also swallows the "exit" string.

It appears this is fixed in aeos.pm with a GOTO CMD statement, but that
doesn't appear standard in other modules.

You can reproduce this error by defining a custom type:

test;script;rancid -t test
test;login;clogin
test;module;ios
test;inloop;ios::inloop
test;command;ios::WriteTerm;show running-config
test;command;ios::ShowVersion;show version

rancid -dt test ios
loadtype: device type test
loadtype: found device type test in /home/bewing/etc/rancid.types.conf
executing clogin -t 90 -c"show running-config;show version" ios
PROMPT MATCH: ios#
HIT COMMAND:ios#show running-config
    In WriteTerm: ios#show running-config
HIT COMMAND:ios#show version
    In ShowVersion: ios#show version
TYPE = WS-C3850-48U
ios: End of run not found
ios: clean_run is false
!BOOTLDR: Version 3.58, RELEASE SOFTWARE (P)


-- 
Brandon Ewing                                     (nicotine at warningg.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20180105/c35d3721/attachment.sig>


More information about the Rancid-discuss mailing list