[rancid] Nxrancid woes

Bob Weaver bob.weaver at ibfx.com
Tue Mar 23 19:50:57 UTC 2010


We've been running Rancid for a couple years now on some pretty standard Cisco gear and the powers that be decided it was time to throw some Nexus switches into the mix. Seems like some strange things happen with these ones. We figured out that the service account Rancid uses to log in had to have a certain privilege level to execute some commands so that fixed our initial issues. But I'm still having some troubles.

I've done quite a bit of searching around and narrowed the main problem down to the 'show version' command. It would appear that it does not have an EOL or something like that so the command that immediately follows it in the list appears to fail. In the debug output below I can see the first two commands then it appears to skip the 'show environment fan' which is right after the 'show version' in the command list then reports that it failed. If I comment out the 'show environment fan' command then the 'show environment temp' command becomes the missing one and so on. This is what leads me to believe that the 'show version' command is not "finishing clean" or however that should be stated. Do I need to add some regex to the ShowVersion subroutine to watch for some text in the lower portion of the 'show version' command to "tell" the script that it's over and good or something similar or am I way off track with all this?

Here's the debug output (slightly shortened):

# nxrancid -d x.x.x.x

executing clogin -t 90 -c"term no monitor-force;show version;show environment fan;show environment temperature;show environment power; ...<snipped>..." x.x.x.x
PROMPT MATCH: NY4-CORE-SW01#
HIT COMMAND:NY4-CORE-SW01#  term no monitor-force
    In RunCommand: NY4-CORE-SW01#  term no monitor-force
HIT COMMAND:NY4-CORE-SW01# show version
    In ShowVersion: NY4-CORE-SW01# show version
TYPE = NXOS
HIT COMMAND:NY4-CORE-SW01# show environment temperature
    In ShowEnvTemp: NY4-CORE-SW01# show environment temperature
HIT COMMAND:NY4-CORE-SW01# show environment power
    In ShowEnv: NY4-CORE-SW01# show environment power
... <snipped> ...
HIT COMMAND:NY4-CORE-SW01# show running-config
    In WriteTerm: NY4-CORE-SW01# show running-config
192.168.128.4: found exit
192.168.128.4: missed cmd(s): show environment fan

Any light that could be shed on this is appreciated.

Thanks,
Bob Weaver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20100323/aa904bb4/attachment.html 


More information about the Rancid-discuss mailing list