[rancid] supermicro switch (again)
Marcin Dulak
marcin.dulak at gmail.com
Tue Nov 15 17:09:20 UTC 2016
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"
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
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?
Regards,
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20161115/345e79a3/attachment-0001.html>
More information about the Rancid-discuss
mailing list