[rancid] xrrancid vs. IOS-XR on Cisco ASR9000 (ASR9K)

Buchan Milne bgmilne at staff.telkomsa.net
Tue Oct 14 08:04:24 UTC 2014

On Thu, 2014-10-09 at 10:01 +0200, Buchan Milne wrote:
> We have been using rancid successfully with IOS- and IOS-XE-based
> devices for some time, and we haven't had any real problems.
> However, we have replaced some of these devices with Cisco ASR9000s, and
> have had trouble with rancid on these. At present we are running IOS-XR
> 4.3.1 on most, but we have a few running 5.1.2.
> The problem seems to be that xrrancid doesn't realise it has retrieved
> all the results of the commands, and thus times out waiting for more
> data.
> If I manually run xrrancid, this still happens:
> $ time xrrancid -d $device
> executing clogin -t 90 -c"terminal no-timestamp;terminal exec prompt
> no-timestamp;admin show version;admin show install summary;admin show
> license;admin show variables boot;show redundancy secondary;show install
> active;admin show env all;dir /all nvram:;dir /all bootflash:;dir /all
> compactflash:;dir /all compactflasha:;dir /all slot0:;dir /all
> disk0:;dir /all disk0a:;dir /all slot1:;dir /all disk1:;dir /all
> disk1a:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all
> harddiska:;dir /all harddiskb:;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 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;admin show running;admin show diag;admin show inventory
> raw;show vlan;show debug;show rpl maximum;show running-config" $device
> ...
> $device: missed cmd(s): show running-config,dir /all slot0:,admin show
> env all,show debug,show vlan,show rpl maximum
> $device: missed cmd(s): show running-config,dir /all slot0:,admin show
> env all,show debug,show vlan,show rpl maximum
> $device: End of run not found
> $device: End of run not found
> !
> real    3m46.481s
> user    0m0.900s
> sys     0m0.120s
> Naturally, if I use clogin and run the commands manually, they complete.

The problem seems to stem from the following configuration we had on our
IOS-XR boxes:

line default
 cli whitespace completion

(which completes commands when you hit space, rather than requiring tab)

This seems to be confusing xrrancid, as I was getting lines like this
from the debug output:

HIT COMMAND:RP/0/RSP0/CPU0:ROUTERNAME#terminalRP/0/RSP0/CPU0:ROUTERNAME#terminal execRP/0/RSP0/CPU0:ROUTERNAME#terminal exec promptRP/0/RSP0/CPU0:ROUTERNAME#terminal exec prompt no-timestamp

Having compared the output to a router running IOS, I saw that the prompt wasn't repeating.

After disabling 'cli whitespace completion', the debug logs look like this:

HIT COMMAND:RP/0/RSP0/CPU0:NBSC-TI-PR-OMICRON-00#terminal exec prompt no-timestamp
    In FilterAll: RP/0/RSP0/CPU0:NBSC-TI-PR-OMICRON-00#terminal exec prompt no-timestamp

And now the run completes with all commands and output in 22s.

Unfortunately, it seems Cisco professional services likes to enable this feature by default. It would be nice if xrrancid could be improved to work with this feature enabled.


More information about the Rancid-discuss mailing list