[rancid] [patch] unexpected command - "write term" in newer Foundry devices
Erik Muller
erikm at buh.org
Tue Jul 12 09:57:34 UTC 2016
On 7/11/16 23:46 , heasley wrote:
> This should be handled by the existing code. There must be another root
> cause. Perhaps you would send the output of the following command to me?
>
> eval `rancid -t foundry -C cer.r8.atl` > output 2>&1
Sure thing, attached.
I do see a bit in WriteTerm that looks like it should be handling that, though it seems to kick it back to the inner loop of inloop with the "Invalid" line still as the current line of $INPUT. I guess either inloop would need to know from the return code that it needed to break out of the current command loop for that to do the trick.
Also this may be useful:
$ rancid -d -t foundry cer.r8.atl
loadtype: device type foundry
loadtype: found device type foundry in /opt/local/etc/rancid/rancid.types.base
executing flogin -t 90 -c"show version;show chassis;show module;show flash;write term;show running-config" cer.r8.atl
PROMPT MATCH: SSH at er1-pp.c8.56M#
HIT COMMAND:SSH at er1-pp.c8.56M#show version
In ShowVersion: SSH at er1-pp.c8.56M#show version
HIT COMMAND:SSH at er1-pp.c8.56M#show chassis
In ShowChassis: SSH at er1-pp.c8.56M#show chassis
HIT COMMAND:SSH at er1-pp.c8.56M#show module
In ShowModule: SSH at er1-pp.c8.56M#show module
HIT COMMAND:SSH at er1-pp.c8.56M#show flash
In ShowFlash: SSH at er1-pp.c8.56M#show flash
HIT COMMAND:SSH at er1-pp.c8.56M#write term
In WriteTerm: SSH at er1-pp.c8.56M#write term
HIT COMMAND:Invalid input -> write term
cer.r8.atl: found unexpected command - "write term"
cer.r8.atl: missed cmd(s): show running-config
cer.r8.atl: missed cmd(s): show running-config
cer.r8.atl: End of run not found
cer.r8.atl: End of run not found
(and, for completeness, all this is being tested on 3.4.1 on OSX 10.10.5, using the macports build, which is pretty much stock source except a couple of changes to the installation paths)
-------------- next part --------------
cer.r8.atl
spawn ssh -c 3des -x -l ranciduser cer.r8.atl
Password:
SSH at er1-pp.c8.56M>enable
User Name:ranciduser
Password:
SSH at er1-pp.c8.56M#
SSH at er1-pp.c8.56M#skip-page-display
Invalid input -> skip-page-display
Type ? for a list
SSH at er1-pp.c8.56M#terminal length 0
SSH at er1-pp.c8.56M#show version
System: NetIron CER (Serial #: XXXXXXXXXXX, Part #: 40-1000859-12)
License: RT_SCALE (LID: xxxxxxxxxxx)
Boot : Version 5.5.0T185 Copyright (c) 1996-2013 Brocade Communications Systems, Inc.
Compiled on Sep 19 2012 at 10:34:20 labeled as ceb05500
(456313 bytes) from boot flash
Monitor : Version 5.5.0T185 Copyright (c) 1996-2013 Brocade Communications Systems, Inc.
Compiled on Sep 19 2012 at 10:34:20 labeled as ceb05500
(456313 bytes) from code flash
IronWare : Version 5.5.0cT183 Copyright (c) 1996-2013 Brocade Communications Systems, Inc.
Compiled on Jul 8 2013 at 14:53:26 labeled as ce05500c
(16507070 bytes) from Primary
CPLD Version: 0x00000001
Micro-Controller Version: 0x0000000d
Extended route scalability
PBIF Version: 0x015d
800 MHz Power PC processor 8544 (version 8021/0023) 400 MHz bus
512 KB Boot Flash (MX29LV040C), 64 MB Code Flash (MT28F256J3)
2048 MB DRAM
System uptime is 209 days 17 hours 1 minutes 6 seconds
SSH at er1-pp.c8.56M#show chassis
*** NetIron CER 2024F-4X ***
---POWERS ---
Power 1 ( 3I50 - AC 504W): Installed (OK)
Power 2 ( 3I50 - AC 504W): Installed (OK)
Total power budget for system = 1008 W
--- FANS ---
Metro fan tray (fan 1): Status = OK, Speed = MED (75%)
Metro fan tray (fan 2): Status = OK, Speed = MED (75%)
Metro fan tray (fan 3): Status = OK, Speed = MED (75%)
Metro fan tray (fan 4): Status = OK, Speed = MED (75%)
Metro fan tray (fan 5): Status = OK, Speed = MED (75%)
Metro fan tray (fan 6): Status = OK, Speed = MED (75%)
--- TEMPERATURE READINGS ---
CPU: Board 50.0C Chip 52.43C
24X1G PPCR: Board 48.50C Chip 51.56C
24X1G TCAM: Board 42.0C Chip 40.75C
4X10G PPCR1: Board 43.0C Chip 48.6C
4X10G TCAM1: Board 41.0C Chip 39.56C
4X10G PPCR2: Board 44.50C Chip 49.0C
4X10G TCAM2: Board 40.50C Chip 40.6C
Fans are in auto mode (current speed is MED (75%)). Temperature monitoring poll period is 60 seconds.
Base MAC Address = 748e.abcd.1234
SSH at er1-pp.c8.56M#show module
*** NetIron CER 2024F-4X ***
Module Status Ports Starting MAC
S1: 24x1G Fiber Ports Virtual Module CARD_STATE_UP 24 748e.abcd.1234
S2: 4x10G Ports Virtual Module CARD_STATE_UP 4 748e.abcd.4321
SSH at er1-pp.c8.56M#show flash
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code Flash - Type MT28F256J3, Size 64 MB
o IronWare Image (Primary)
Version 5.5.0cT183, Size 16507070 bytes, Check Sum 05e4
Compiled on Jul 8 2013 at 14:53:26 labeled as ce05500c
o Monitor Image
Version 5.5.0T185, Size 456313 bytes, Check Sum 546d
Compiled on Sep 19 2012 at 10:34:20 labeled as ceb05500
o Startup Configuration
Size 99219 bytes, Check Sum 630a
Modified on 12:09:35 GMT+00 Thu Jul 07 2016
Boot Flash - Type MX29LV040C, Size 512 KB
o Boot Image
Version 5.5.0T185, Size 456313 bytes, Check Sum 546d
Compiled on Sep 19 2012 at 10:34:20 labeled as ceb05500
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SSH at er1-pp.c8.56M#write term
Invalid input -> write term
Type ? for a list
SSH at er1-pp.c8.56M#show running-config
Current configuration:
!
ver V5.5.0cT183
!
!
!
lag "vdx-fabric" dynamic id 64
ports ethernet 2/3 to 2/4
primary-port 2/3
deploy
port-name "vdx-fabric-trunk" ethernet 2/3
port-name "vdx-fabric-trunk-r9" ethernet 2/4
!
!
!
no spanning-tree
!
!
vlan 1 name DEFAULT-VLAN
no untagged ethe 1/1 to 1/2
!
vlan 50
tagged ethe 1/1 to 1/2 ethe 2/3 to 2/4
router-interface ve 50
!
!
system-max ip-cache 1048576
system-max ip-route 1048576
system-max virtual-interface 4095
!
!
aaa authentication enable default local tacacs+
aaa authentication login default local tacacs+
tacacs-server host 10.10.10.1
tacacs-server key 2 $xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
!
!
!
!
ntp
server 10.10.10.1
!
!
enable super-user-password .....
logging host 10.10.10.1
logging host 10.10.10.3
username xxxxxxxx password .....
username xxxxxxxx history .....
username xxxxxxxx privilege 5 password .....
username xxxxxxxx password .....
username xxxxxxxx password .....
!
ip route 0.0.0.0/0 11.22.333.44
!
!
!
!
!
snmp-client 10.10.10.1
snmp-server
snmp-server community ..... ro
snmp-server community ..... rw
snmp-server host 10.10.10.1 version v2c .....
hostname er1-pp.c8.56M
!
!
router vrrp-extended
!
!
!
!
!
!
!
interface management 1
ip address 10.10.10.43/24
enable
!
interface ethernet 1/1
enable
!
interface ethernet 1/3
enable
!
![interfaces, bgp policy omitted for brevity]
!
!
lldp run
!
!
!
!
end
SSH at er1-pp.c8.56M#exit
SSH at er1-pp.c8.56M>exitConnection to 10.10.50.243 closed.
Killed by signal 1.
More information about the Rancid-discuss
mailing list