[rancid] new rancid install not working

Jeffrey d'Ambly jeffrey.dambly at jasper.com
Fri Apr 17 23:41:49 UTC 2015


Here is my manual run, it looks like it worked right?
Also is it expected for routers.down to look like this?

[rancid at qa-scl009-005 routers]$ cat routers.down
sjc-core01:cisco:up
sjc-vpe1:cisco:up



[rancid at qa-scl009-005 tmp]$ /usr/bin/rancid -d -t cisco sjc-vpe1
loadtype: device type cisco
loadtype: found device type cisco in /etc/rancid/rancid.types.base
executing clogin -t 90 -c"show version;show redundancy;show idprom
backplane;show install active;show env all;show rsp chassis-info;show gsr
chassis;show diag chassis-info;show boot;show bootvar;show variables
boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir
/all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all
disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all
sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir /all
slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all
slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all
slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all
sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all
sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir
/all sec-disk2:;show controllers;show controllers cbus;show diagbus;show
diag;show capture;show module;show spe version;show c7200;show inventory
raw;show vtp status;show vlan;show vlan-switch;show switch detail;show sdm
prefer;show system mtu;show debug;show shun;more
system:running-config;show running-config view full;show
running-config;write term" sjc-vpe1
PROMPT MATCH: sjc-vpe1#
HIT COMMAND:sjc-vpe1#show version
    In ShowVersion: sjc-vpe1#show version
TYPE = CISCO3925-CHASSIS
HIT COMMAND:sjc-vpe1#show redundancy
    In ShowRedundancy: sjc-vpe1#show redundancy
HIT COMMAND:sjc-vpe1#show idprom backplane
    In ShowIDprom: sjc-vpe1#show idprom backplane
HIT COMMAND:sjc-vpe1#show install active
    In ShowInstallActive: sjc-vpe1#show install active
HIT COMMAND:sjc-vpe1#show env all
    In ShowEnv: sjc-vpe1#show env all
HIT COMMAND:sjc-vpe1#show rsp chassis-info
    In ShowRSP: sjc-vpe1#show rsp chassis-info
HIT COMMAND:sjc-vpe1#show gsr chassis
    In ShowGSR: sjc-vpe1#show gsr chassis
HIT COMMAND:sjc-vpe1#show diag chassis-info
    In ShowGSR: sjc-vpe1#show diag chassis-info
HIT COMMAND:sjc-vpe1#show boot
    In ShowBoot: sjc-vpe1#show boot
HIT COMMAND:sjc-vpe1#show bootvar
    In ShowBoot: sjc-vpe1#show bootvar
HIT COMMAND:sjc-vpe1#show variables boot
    In ShowBoot: sjc-vpe1#show variables boot
HIT COMMAND:sjc-vpe1#show flash
    In ShowFlash: sjc-vpe1#show flash
HIT COMMAND:sjc-vpe1#dir /all nvram:
    In DirSlotN: sjc-vpe1#dir /all nvram:
HIT COMMAND:sjc-vpe1#dir /all bootflash:
    In DirSlotN: sjc-vpe1#dir /all bootflash:
HIT COMMAND:sjc-vpe1#dir /all slot0:
    In DirSlotN: sjc-vpe1#dir /all slot0:
HIT COMMAND:sjc-vpe1#dir /all disk0:
    In DirSlotN: sjc-vpe1#dir /all disk0:
HIT COMMAND:sjc-vpe1#dir /all slot1:
    In DirSlotN: sjc-vpe1#dir /all slot1:
HIT COMMAND:sjc-vpe1#dir /all disk1:
    In DirSlotN: sjc-vpe1#dir /all disk1:
HIT COMMAND:sjc-vpe1#dir /all slot2:
    In DirSlotN: sjc-vpe1#dir /all slot2:
HIT COMMAND:sjc-vpe1#dir /all disk2:
    In DirSlotN: sjc-vpe1#dir /all disk2:
HIT COMMAND:sjc-vpe1#dir /all harddisk:
    In DirSlotN: sjc-vpe1#dir /all harddisk:
HIT COMMAND:sjc-vpe1#dir /all harddiska:
    In DirSlotN: sjc-vpe1#dir /all harddiska:
HIT COMMAND:sjc-vpe1#dir /all harddiskb:
    In DirSlotN: sjc-vpe1#dir /all harddiskb:
HIT COMMAND:sjc-vpe1#dir /all sup-bootdisk:
    In DirSlotN: sjc-vpe1#dir /all sup-bootdisk:
HIT COMMAND:sjc-vpe1#dir /all sup-bootflash:
    In DirSlotN: sjc-vpe1#dir /all sup-bootflash:
HIT COMMAND:sjc-vpe1#dir /all sup-microcode:
    In DirSlotN: sjc-vpe1#dir /all sup-microcode:
HIT COMMAND:sjc-vpe1#dir /all slavenvram:
    In DirSlotN: sjc-vpe1#dir /all slavenvram:
HIT COMMAND:sjc-vpe1#dir /all slavebootflash:
    In DirSlotN: sjc-vpe1#dir /all slavebootflash:
HIT COMMAND:sjc-vpe1#dir /all slaveslot0:
    In DirSlotN: sjc-vpe1#dir /all slaveslot0:
HIT COMMAND:sjc-vpe1#dir /all slavedisk0:
    In DirSlotN: sjc-vpe1#dir /all slavedisk0:
HIT COMMAND:sjc-vpe1#dir /all slaveslot1:
    In DirSlotN: sjc-vpe1#dir /all slaveslot1:
HIT COMMAND:sjc-vpe1#dir /all slavedisk1:
    In DirSlotN: sjc-vpe1#dir /all slavedisk1:
HIT COMMAND:sjc-vpe1#dir /all slaveslot2:
    In DirSlotN: sjc-vpe1#dir /all slaveslot2:
HIT COMMAND:sjc-vpe1#dir /all slavedisk2:
    In DirSlotN: sjc-vpe1#dir /all slavedisk2:
HIT COMMAND:sjc-vpe1#dir /all slavesup-bootflash:
    In DirSlotN: sjc-vpe1#dir /all slavesup-bootflash:
HIT COMMAND:sjc-vpe1#dir /all sec-nvram:
    In DirSlotN: sjc-vpe1#dir /all sec-nvram:
HIT COMMAND:sjc-vpe1#dir /all sec-bootflash:
    In DirSlotN: sjc-vpe1#dir /all sec-bootflash:
HIT COMMAND:sjc-vpe1#dir /all sec-slot0:
    In DirSlotN: sjc-vpe1#dir /all sec-slot0:
HIT COMMAND:sjc-vpe1#dir /all sec-disk0:
    In DirSlotN: sjc-vpe1#dir /all sec-disk0:
HIT COMMAND:sjc-vpe1#dir /all sec-slot1:
    In DirSlotN: sjc-vpe1#dir /all sec-slot1:
HIT COMMAND:sjc-vpe1#dir /all sec-disk1:
    In DirSlotN: sjc-vpe1#dir /all sec-disk1:
HIT COMMAND:sjc-vpe1#dir /all sec-slot2:
    In DirSlotN: sjc-vpe1#dir /all sec-slot2:
HIT COMMAND:sjc-vpe1#dir /all sec-disk2:
    In DirSlotN: sjc-vpe1#dir /all sec-disk2:
HIT COMMAND:sjc-vpe1#show controllers
    In ShowContAll: sjc-vpe1#show controllers
HIT COMMAND:sjc-vpe1#show controllers cbus
    In ShowContCbus: sjc-vpe1#show controllers cbus
HIT COMMAND:sjc-vpe1#show diagbus
    In ShowDiagbus: sjc-vpe1#show diagbus
HIT COMMAND:sjc-vpe1#show diag
    In ShowDiag: sjc-vpe1#show diag
HIT COMMAND:sjc-vpe1#show capture
    In ShowCapture: sjc-vpe1#show capture
HIT COMMAND:sjc-vpe1#show module
    In ShowModule: sjc-vpe1#show module
HIT COMMAND:sjc-vpe1#show spe version
    In ShowSpeVersion: sjc-vpe1#show spe version
HIT COMMAND:sjc-vpe1#show c7200
    In ShowC7200: sjc-vpe1#show c7200
HIT COMMAND:sjc-vpe1#show inventory raw
    In ShowInventory: sjc-vpe1#show inventory raw
HIT COMMAND:sjc-vpe1#show vtp status
    In ShowVTP: sjc-vpe1#show vtp status
HIT COMMAND:sjc-vpe1#show vlan
    In ShowVLAN: sjc-vpe1#show vlan
HIT COMMAND:sjc-vpe1#show vlan-switch
    In ShowVLAN: sjc-vpe1#show vlan-switch
HIT COMMAND:sjc-vpe1#show switch detail
    In ShowDetail: sjc-vpe1#show switch detail
HIT COMMAND:sjc-vpe1#show sdm prefer
    In ShowSDM: sjc-vpe1#show sdm prefer
HIT COMMAND:sjc-vpe1#show system mtu
    In ShowMTU: sjc-vpe1#show system mtu
HIT COMMAND:sjc-vpe1#show debug
    In ShowDebug: sjc-vpe1#show debug
HIT COMMAND:sjc-vpe1#show shun
    In ShowShun: sjc-vpe1#show shun
HIT COMMAND:sjc-vpe1#more system:running-config
    In WriteTerm: sjc-vpe1#more system:running-config
HIT COMMAND:sjc-vpe1#show running-config view full
    In WriteTerm: sjc-vpe1#show running-config view full
HIT COMMAND:sjc-vpe1#show running-config
    In WriteTerm: sjc-vpe1#show running-config
HIT COMMAND:sjc-vpe1#write term
    In WriteTerm: sjc-vpe1#write term




On 4/17/15, 4:36 PM, "Alan McKinnon" <alan.mckinnon at gmail.com> wrote:

>On 18/04/2015 01:11, Jeffrey d'Ambly wrote:
>> Ok so I got that sorted out
>> qa-scl009-005:/var/log/rancid# whoami
>> rancid
>> qa-scl009-005:/var/log/rancid# which clogin
>> /usr/libexec/rancid/clogin
>> qa-scl009-005:/var/log/rancid#
>> 
>> /usr/bin/rancid -d -t cisco sjc-vpe1
>> Gives me what I think should happen at least. It creates a file
>> sjc-vpe1.new in the local dir I¹m in.
>
>
>Examine that file closely, there is something about the results of
>clogin in there that the rancid script cannot deal with.
>
>Unfortunately there is no single cause for this, the error messages you
>have posted really just say "something went wrong". This isn't rancid's
>fault really, it's a consequence of trying to infer structured data from
>unstructured output from the router.
>
>Look first for the important stuff. Does the script announce that it
>found the prompt? Does it find an initial list of commands output
>correctly, then get confused and claim it cannot find any commands
>thereafter?
>
>Sometimes you have to look closely. A common problem is "#" and ">"
>characters in the router's shell prompt, (and once I had a Nexus that
>didn't end a "show admin something" with a proper EOL character. Took
>hours to find that :-) )
>
>
>
>
>> 
>> 
>> But when I run /usr/bin/rancid-run I just get what looks like an empty
>>file
>> 
>> qa-scl009-005:/var/rancid/routers/configs# cat sjc-core01.new
>> !RANCID-CONTENT-TYPE: cisco
>> !
>> !
>> !
>> !
>> !
>> 
>> 
>> 
>> 
>> ‹jeff
>> 
>> 
>> 
>> On 4/17/15, 3:43 PM, "heasley" <heas at shrubbery.net> wrote:
>> 
>>> Fri, Apr 17, 2015 at 10:41:54PM +0000, Jeffrey d'Ambly:
>>>> I cannot for the life of me figure out what I¹m doing wrong here.
>>>>
>>>> When I run /usr/bin/rancid-run it seems like nothing happens. When I
>>>> run rancid manually I get the following
>>>>
>>>>
>>>> qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1
>>>>
>>>> loadtype: device type cisco
>>>>
>>>> loadtype: found device type cisco in /etc/rancid/rancid.types.base
>>>>
>>>> executing clogin -t 90 -c"show version;show redundancy;show idprom
>>>> backplane;show install active;show env all;show rsp chassis-info;show
>>>> gsr chassis;show diag chassis-info;show boot;show bootvar;show
>>>>variables
>>>> boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all
>>>>slot0:;dir
>>>> /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all
>>>> disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir
>>>> /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir
>>>> /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir
>>>>/all
>>>> slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all
>>>> slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all
>>>> sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all
>>>> sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all
>>>> sec-slot2:;dir /all sec-disk2:;show controllers;show controllers
>>>> cbus;show diagbus;show diag;show capture;show module;show spe
>>>> version;show c7200;show inventory raw;show vtp status;show vlan;show
>>>> vlan-switch;show switch detail;show sdm prefer;show system mtu;show
>>>> debug;show shun;more system:running-config;show running-config view
>>>> full;show running-config;write term" sjc-vpe1
>>>>
>>>> sh: clogin: command not found
>>>
>>> set your PATH correctly
>>>
>>>> sjc-vpe1: missed cmd(s): all commands
>>>>
>>>> sjc-vpe1: End of run not found
>>>>
>>>> sjc-vpe1: End of run not found
>>>>
>>>> But if I can clogin manually it works
>>>>
>>>>
>>>> qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90
>>>>-c"show
>>>> version" sjc-vpe1
>>>>
>>>> sjc-vpe1
>>>>
>>>> spawn ssh -c 3des -x -l confbackup sjc-vpe1
>>>>
>>>> Password:
>>>>
>>>> sjc-vpe1#
>>>>
>>>> sjc-vpe1#terminal length 0
>>>>
>>>> sjc-vpe1#terminal width 132
>>>>
>>>> sjc-vpe1#show version
>>>>
>>>> Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version
>>>> 15.2(4)M7, RELEASE SOFTWARE (fc2)
>>>>
>>>> Technical Support: http://www.cisco.com/techsupport
>>>>
>>>> Copyright (c) 1986-2014 by Cisco Systems, Inc.
>>>>
>>>> Compiled Thu 25-Sep-14 10:09 by prod_rel_team
>>>>
>>>>
>>>> ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1)
>>>>
>>>> I have no idea what the hell I am doing wrong here, if someone could
>>>> point me in the right direction here that would be awesome.
>>>>
>>>> ‹Jeff
>>>
>>>> _______________________________________________
>>>> Rancid-discuss mailing list
>>>> Rancid-discuss at shrubbery.net
>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>
>> 
>> _______________________________________________
>> Rancid-discuss mailing list
>> Rancid-discuss at shrubbery.net
>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>> 
>
>
>-- 
>Alan McKinnon
>alan.mckinnon at gmail.com
>
>_______________________________________________
>Rancid-discuss mailing list
>Rancid-discuss at shrubbery.net
>http://www.shrubbery.net/mailman/listinfo/rancid-discuss



More information about the Rancid-discuss mailing list