[rancid] Issue with nx-os after switch upgrades

Dan Anderson dan.w.anderson at gmail.com
Wed Mar 4 22:37:59 UTC 2015


I had a similar problem with nxrancid. I ended up modifying the script in
the ShowVersion sub to return(1) for Invalid input detected rather than -1.

The issue is that some of the commands will only show up with certain
hardware ("show vdc all" doesn't work on anything other than a Nexus
7000/7700) or unless certain features have been enabled ("show fex" only
works when "feature fex" has been enabled). It's a hack, but I thought that
it was the easiest solution without creating a command list for every
variable of hardware/configuration.

On Wed, Mar 4, 2015 at 5:08 PM, John Livingston <John.Livingston at emulex.com>
wrote:

> Thanks guys!  Here is the full output of the nxrancid -d script:
>
>
> [user at host1 ~]$ cd bin
> [user at host1 ~]$ nxrancid -d rv-ibmbc1-fc2
> executing clogin -t 90 -c"term no monitor-force;show version;show version
> build-info all;show license;show license usage;show license host-id;show
> system redundancy status;show environment clock;show environment fan;show
> environment fex all fan;show environment temperature;show environment
> power;show boot;dir bootflash:;dir debug:;dir logflash:;dir slot0:;dir
> usb1:;dir usb2:;dir volatile:;show module;show module xbar;show
> inventory;show vtp status;show vlan;show debug;show cores vdc-all;show
> processes log vdc-all;show running-config" rv-ibmbc1-fc2
> PROMPT MATCH: rv-ibmbc1-fc2#
> HIT COMMAND:rv-ibmbc1-fc2#  term no monitor-force
>     In RunCommand: rv-ibmbc1-fc2#  term no monitor-force
> HIT COMMAND:rv-ibmbc1-fc2# show version
>     In ShowVersion: rv-ibmbc1-fc2# show version
> TYPE = NXOS
> HIT COMMAND:rv-ibmbc1-fc2# show version build-info all
>     In ShowVersionBuild: rv-ibmbc1-fc2# show version build-info all
> HIT COMMAND:rv-ibmbc1-fc2# show license
>     In ShowLicense: rv-ibmbc1-fc2# show license
> HIT COMMAND:rv-ibmbc1-fc2# show license usage
>     In ShowLicense: rv-ibmbc1-fc2# show license usage
> HIT COMMAND:rv-ibmbc1-fc2# show license host-id
>     In ShowLicense: rv-ibmbc1-fc2# show license host-id
> HIT COMMAND:rv-ibmbc1-fc2# show system redundancy status
>     In ShowRedundancy: rv-ibmbc1-fc2# show system redundancy status
> HIT COMMAND:rv-ibmbc1-fc2# show environment clock
>     In ShowEnv: rv-ibmbc1-fc2# show environment clock
> HIT COMMAND:rv-ibmbc1-fc2# show environment fan
>     In ShowEnv: rv-ibmbc1-fc2# show environment fan
> HIT COMMAND:rv-ibmbc1-fc2# show environment fex all fan
>     In ShowEnv: rv-ibmbc1-fc2# show environment fex all fan
> HIT COMMAND:rv-ibmbc1-fc2# show environment temperature
>     In ShowEnvTemp: rv-ibmbc1-fc2# show environment temperature
> HIT COMMAND:rv-ibmbc1-fc2# show environment power
>     In ShowEnvPower: rv-ibmbc1-fc2# show environment power
> HIT COMMAND:rv-ibmbc1-fc2# show boot
>     In ShowBoot: rv-ibmbc1-fc2# show boot
> HIT COMMAND:rv-ibmbc1-fc2# dir bootflash:
>     In DirSlotN: rv-ibmbc1-fc2# dir bootflash:
> HIT COMMAND:rv-ibmbc1-fc2# dir debug:
>     In DirSlotN: rv-ibmbc1-fc2# dir debug:
> HIT COMMAND:rv-ibmbc1-fc2# dir logflash:
>     In DirSlotN: rv-ibmbc1-fc2# dir logflash:
> HIT COMMAND:rv-ibmbc1-fc2# dir slot0:
>     In DirSlotN: rv-ibmbc1-fc2# dir slot0:
> HIT COMMAND:rv-ibmbc1-fc2# dir usb1:
>     In DirSlotN: rv-ibmbc1-fc2# dir usb1:
> HIT COMMAND:rv-ibmbc1-fc2# dir usb2:
>     In DirSlotN: rv-ibmbc1-fc2# dir usb2:
> HIT COMMAND:rv-ibmbc1-fc2# dir volatile:
>     In DirSlotN: rv-ibmbc1-fc2# dir volatile:
> HIT COMMAND:rv-ibmbc1-fc2# show module
>     In ShowModule: rv-ibmbc1-fc2# show module
> HIT COMMAND:rv-ibmbc1-fc2# show module xbar
>     In ShowModule: rv-ibmbc1-fc2# show module xbar
> HIT COMMAND:rv-ibmbc1-fc2# show inventory
>     In ShowInventory: rv-ibmbc1-fc2# show inventory
> HIT COMMAND:rv-ibmbc1-fc2# show vtp status
>     In ShowVTP: rv-ibmbc1-fc2# show vtp status
> HIT COMMAND:rv-ibmbc1-fc2# show vlan
>     In ShowVLAN: rv-ibmbc1-fc2# show vlan
> HIT COMMAND:rv-ibmbc1-fc2# show debug
>     In ShowDebug: rv-ibmbc1-fc2# show debug
> HIT COMMAND:rv-ibmbc1-fc2# show cores vdc-all
>     In ShowCores: rv-ibmbc1-fc2# show cores vdc-all
> HIT COMMAND:rv-ibmbc1-fc2# show processes log vdc-all
>     In ShowProcLog: rv-ibmbc1-fc2# show processes log vdc-all
> rv-ibmbc1-fc2: show processes log vdc-all failed: -1
> rv-ibmbc1-fc2: missed cmd(s): show running-config
> rv-ibmbc1-fc2: missed cmd(s): show running-config
> rv-ibmbc1-fc2: End of run not found
> rv-ibmbc1-fc2: End of run not found
> rv-ibmbc1-fc2: clean: 0, end: 0
> !PROC_LOGS:                                   ^
> [user at host1 ~]$
>
>
> And here's the output of clogin with just the "show running-config"
> command:
>
>
>
> [user at host1 ~]$clogin -t 90 -c:"show running-config" rv-ibmbc1-fc2
> rv-ibmbc1-fc2
> spawn ssh -c 3des -x -l user rv-ibmbc1-fc2
> MDS Switch
> Password:
> Cisco Nexus Operating System (NX-OS) Software
> TAC support: http://www.cisco.com/tac
> Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.
> The copyrights to certain works contained in this software are
> owned by other third parties and used and distributed under
> license. Certain components of this software are licensed under
> the GNU General Public License (GPL) version 2.0 or the GNU
> Lesser General Public License (LGPL) Version 2.1. A copy of each
> such license is available at
> http://www.opensource.org/licenses/gpl-2.0.php and
> http://www.opensource.org/licenses/lgpl-2.1.php
> rv-ibmbc1-fc2#
> rv-ibmbc1-fc2# terminal length 0
> rv-ibmbc1-fc2# terminal width 132
> rv-ibmbc1-fc2# terminal-length 0
>                        ^
> % Invalid command at '^' marker.
> rv-ibmbc1-fc2#  :show running-config
>                ^
> % Invalid command at '^' marker.
> rv-ibmbc1-fc2#exit
> Connection to rv-ibmbc1-fc2 closed.
> [user at host1 ~]$
>
> Any help you can provide is much appreciated.
>
> Thanks,
> John
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>



-- 
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150304/cd3488c8/attachment.html>


More information about the Rancid-discuss mailing list