[rancid] IBM BNT Layer 2/3 Copper Gigabit Ethernet Switch no config collected
heasley
heas at shrubbery.net
Tue Jun 6 04:06:31 UTC 2017
Mon, Jun 05, 2017 at 06:01:58PM +0300, Alexander R:
> On Fri, Dec 16, 2016 at 8:44 PM, heasley <heas at shrubbery.net> wrote:
>
> > Tue, Dec 13, 2016 at 10:30:08AM +0300, Alexander R:
> > > On Tue, Dec 13, 2016 at 12:19 AM, heasley <heas at shrubbery.net> wrote:
> > >
> > > > 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.
> > > >
> > >
> > > Hi,
> > > thank you for responce.
> > >
> > > It's my configs
> > >
> > > Ok device:
> > > rancid]# tail -n5 192.168.1.12.raw
> > > ntp secondary-server 192.168.1.1
> > > !
> > > end
> > >
> > > sw12#exitReceived disconnect from 192.168.1.12: 11: Logged out.
> > > rancid]#
> > >
> > > Fail device:
> > > rancid]# tail -n5 192.168.1.11.raw
> > > ntp secondary-server 192.168.1.1
> > > !
> > > end
> > >
> > > sw11#exitReceived disconnect from 192.168.1.11: 11: Logged out.
> > ^^ this is likely the problem; the lousy thing didnt echo the
> > CR. inloop() expects the CR and set $clean_run. you'll have to adjust
> > the match; the lousy exos does this too.
> >
>
> I'm sorry, but how to do this "you'll have to adjust the match"?
there is a match in inloop() for the exit/logout/whatever from the cli.
it expects the device to act normally and this one does not, as mentioned.
see the same match in exos.pm; something similar to that ought to work.
>
> >
> > > rancid]#
> > >
> > > So, both switches have "end" word at the end of file. Any ideas? I don't
> > > know why it's not worked on same "text" files
> > >
> > >
> > > > 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