[rancid] supermicro switch (again)
heasley
heas at shrubbery.net
Wed Nov 16 20:14:01 UTC 2016
Tue, Nov 15, 2016 at 06:09:20PM +0100, Marcin Dulak:
> Hi,
>
> I read through this thread ending with no solution
> http://www.shrubbery.net/pipermail/rancid-discuss/2013-November/007279.html
>
> Things I have tried:
>
> Version rancid-3.1-4.el6.x86_64
>
> 0.
> add to ~rancid/.cloginrc the supermicro-switch settings
>
> add autoenable supermicro-switch 1
> add user supermicro-switch username
> add password supermicro-switch password password
> add method supermicro-switch ssh
>
>
> 1.
> clogin shows errors out-of-the-box, this is expected
>
> rancid $ clogin -c"show version" supermicro-switch
> supermicro-switch
> spawn ssh -c 3des -x -l username supermicro-switch
> username at supermicro-switch's password:
>
> Supermicro Switch
>
> supermicro-switch#
> supermicro-switch# terminal length 0
> % Invalid Command
> supermicro-switch# terminal width 132
> % Invalid Command
> supermicro-switch# show version
> Switch ID Hardware Version Firmware Version OS
> Version
> 0 XXX-XXXX Rev. X (XX-XX) X.X.X-X X.X.X
> supermicro-switch#exit
>
> 2.
> copy clogin to smlogin
>
> root # cp /usr/libexec/rancid/clogin /usr/libexec/rancid/smlogin
>
> and replace the offending
> send "terminal length 0\r" and send "terminal width 132\r" with with send
> "\r"
so, how do you turn of the pager?
does supermicro actually make the switch, or is it an OEM for which a script
may already exist.
> After that this returns without errors:
>
> rancid $ smlogin -c"show version" supermicro-switch
>
> 3.
> rancid $ rancid -d supermicro-switch
> loadtype(): device_type is empty
> Couldn't load device type spec for
>
> So I add to /etc/rancid/rancid.types.base:
>
> supermicro;script;rancid -t supermicro
This implies that there is a lib/supermicro.pm library.
> supermicro;login;smlogin
> supermicro;inloop;supermicro::inloop
> supermicro;command;supermicro::ShowVersion;show version
> supermicro;command;supermicro::WriteTerm;show running-config
>
> and then:
>
> rancid $ rancid -d -t supermicro supermicro-switch
> loadtype: device type supermicro
> loadtype: found device type supermicro in /etc/rancid/rancid.types.base
> executing smlogin -t 90 -c"show version;show running-config"
> supermicro-switch
> supermicro-switch: missed cmd(s): all commands
> supermicro-switch: End of run not found
> supermicro-switch: End of run not found
>
> but as we know executing directly on the command line works: smlogin -t 90
> -c"show version;show running-config" supermicro-switch
>
> To further debug I create `cp /usr/libexec/rancid/rancid
> /usr/libexec/rancid/smrancid` and point to it with
> supermicro;script;smrancid -t supermicro
> but my guess is wrong: some other script than /usr/libexec/rancid/smrancid
> is executed during `rancid -d -t supermicro supermicro-switch`
>
> How to debug this further?
i'd start with rancid 3.5.1.
More information about the Rancid-discuss
mailing list