[rancid] Re: Nxrancid woes

Bob Weaver bob.weaver at ibfx.com
Tue Mar 23 20:57:48 UTC 2010


We noticed early on that 'show environment clock' didn't work, on our Nexus switches anyway so it's been commented out from the beginning. I've used clogin to connect as our service.rancid user and tested all the other commands that aren't commented out and they work just fine from the console.

I took a look at the .raw file and the output looks to me normal to me. The output of all the commands was there. The snipped below is the tail end of 'show version' and the head end of 'show environment fan'. I don't see anything that looks wrong but then I don't really know what I'm looking for either. Is it a problem that the 'MNY4-CORE-SW01# show environment fan' entry is attached to the end of the 'Core Plugin, Ethernet Plugin' part rather than being on its own line (newline)? Does that indicate that it thinks the '... fan' command was part of the 'show version' somehow?

Kernel uptime is 206 day(s), 0 hour(s), 16 minute(s), 28 second(s)^M
^M
Last reset ^M
  Reason: Unknown^M
  System version: 4.0(1a)N2(1)^M
  Service: ^M
^M
plugin^M
  Core Plugin, Ethernet Plugin^MNY4-CORE-SW01# show environment fan^M^M
^M
^M
Fan:^M
------------------------------------------------------^M
Fan             Model                Hw         Status^M
------------------------------------------------------^M
Chassis-1       N5K-C5020-FAN        --         ok^M
Chassis-2       N5K-C5020-FAN        --         ok^M

Bob Weaver

Ps, sorry about that first message in HTML format. I reloaded my computer last week and forgot to force Outlook back to plain text like I generally do.

> 
> Tue, Mar 23, 2010 at 07:50:57PM +0000, Bob Weaver:
> > 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?
> 
> its probably that show environment clock o/p changed and ShowEnv is eat
> that and the show environment fan o/p.  but, why isnt obvious.  if you
> provide the hostname.raw file from NOPIPE=YES;export NOPIPE;nxrancid -d
> hostname, that will help find the problem.
> 
> > 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
> 
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


More information about the Rancid-discuss mailing list