[rancid] IBM BNT Layer 2/3 Copper Gigabit Ethernet Switch no config collected

heasley heas at shrubbery.net
Mon Dec 12 21:19:51 UTC 2016


Mon, Dec 12, 2016 at 12:01:24PM +0300, Alexander R:
> my configuration:
> centos 7 x86_64
> i've issue in rancid 3.5.1 and 3.6.0

thank you for including this.

> i've issue to collect configs from switch modules "BNT Layer 2/3 Copper
> Gigabit Ethernet Switch Module for IBM BladeCenter (5.2.8 (FLASH image1))",
> it has IP 192.168.1.11
> 
> It's cisco-like CLI, so i've created my own "ibm" type in rancid.types.conf:
> 
> # cat /etc/rancid/rancid.types.conf
> ibm;script;rancid -t ibm
> ibm;login;clogin
> ibm;module;ios
> ibm;inloop;ios::inloop
> ibm;command;ios::WriteTerm;show running-config
> 
> It's working fine with other switch module  "IBM Networking OS Virtual
> Fabric 10Gb Switch Module for IBM BladeCenter (7.8.3 (FLASH image1))" and
> it have IP 192.168.1.12, but not with "BNT Layer 2/3 Copper Gigabit
> Ethernet Switch Module for IBM BladeCenter (5.2.8 (FLASH image1))"
> 
> Fail device:
> # rancid -t ibm -d 192.168.1.11
> loadtype: device type ibm
> loadtype: found device type ibm in /etc/rancid/rancid.types.conf
> executing clogin -t 90 -c"show running-config" 192.168.1.11
> PROMPT MATCH: sw11#
> HIT COMMAND:sw11#show running-config
>     In WriteTerm: sw11#show running-config
> 192.168.1.11: End of run not found
> end
> 
> In 192.168.1.11.raw i see config issued by "show run..."
> 
> Ok device:
> # rancid -t ibm -d 192.168.1.12
> loadtype: device type ibm
> loadtype: found device type ibm in /etc/rancid/rancid.types.conf
> executing clogin -t 90 -c"show running-config" 192.168.1.12
> PROMPT MATCH: sw12#
> HIT COMMAND:sw12#show running-config
>     In WriteTerm: sw12#show running-config
> 192.168.1.12: End of run not found
> end
> 
> ps. 192.168.1.11 has NO words "exit" in config, because interface isn't
> configured (such a configuration plan).
> 192.168.1.12 has words "exit", because interfaces is configured.
> 
> Could you help me?

ios::WriteTerM() will expect to find and "end" marker in the config, without
which it will not set $found_end.  if this device does not have this marker
or something similar that a customer version of ios::WriteTerm could use,
you can use a custom version of ios::WriteTerm that just counts lines, which
ios::WriteTerm already does if the input is an ASA (or a few others), which
lack an end marker.

the purpose of this is that some devices behave poorly in low memory
conditions, eg: memory leaks.  some appear to succeed to produce a config,
but output nothing.  requiring the marker prevents rancid from dropping
the config from the repo.



More information about the Rancid-discuss mailing list