[rancid] Fwd: Rancid - cmwlogin - HPE switches

Kevin Olbrich ko at sv01.de
Fri Oct 25 12:27:52 UTC 2019


Hi Henri,

ok, old releases are a no-go for me, as I have HP devices with recent FW
that would loop (find diff on every refresh) as HP introduced a timestamp
for some commands.
I would like to see CMW work in 3.9+ but I was unable to get this working
on my own (I have no perl skills and don't plan to extend them).

Kind regards
Kevin

Am Fr., 25. Okt. 2019 um 13:50 Uhr schrieb henri hemery <
henri.hemery at gmail.com>:

> Hi Kevin, I am using rancid 3.4.1, I followed this procedure:
> https://www.petenetlive.com/KB/Article/0001331
>
> HPE 5130 was not working with cmwlogin module, but works fine with module
> h3crancid, after I modified it as mentioned in my previous mail.
>
>
>
> On Fri, Oct 25, 2019 at 5:20 AM Kevin Olbrich <ko at sv01.de> wrote:
>
>> Are you using a recent release of rancid, eg. 3.9?
>>
>> As these scripts did not work for me and the switch stack does not get
>> many updates, I simply backed them up myself in the past.
>> All other devices worked fine.
>>
>> Kind regards
>> Kevin
>>
>>
>> Am Do., 24. Okt. 2019 um 20:29 Uhr schrieb henri hemery <
>> henri.hemery at gmail.com>:
>>
>>>
>>> I think I found the solution.
>>>>
>>>> I finally can use h3clogin//h3crancid work for my HPE 5130.
>>>> Here is what I modified in the file h3crancid:
>>>>
>>>> I had to modify the first line by this:
>>>>
>>>> #! /usr/bin/perl5.16.3             --» Because it is what we have in
>>>> /usr/bin
>>>>
>>>> And I also modified this line:
>>>>
>>>> my $logincmd = "/usr/local/rancid/bin/h3clogin";        --» because the
>>>> script was unable to locate h3clogin
>>>>
>>>> Thanks for your help all!
>>>>
>>>>
>>>>
>>>> On Thu, Oct 24, 2019 at 10:27 AM Ugo Bellavance <ugob at lubik.ca> wrote:
>>>>
>>>>> There is no such file on my version (2.3).
>>>>>
>>>>> In 2.3, the config was in rancid-fe, I think and it looked like this:
>>>>>
>>>>>     'h3c'               => 'h3crancid',
>>>>>
>>>>> The login command was defined it the *rancid script:
>>>>>
>>>>> my $logincmd = "h3clogin";
>>>>>
>>>>>
>>>>> On Thu, Oct 24, 2019 at 8:55 AM henri hemery <henri.hemery at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thanks Ugo, so you modified /usr/local/rancid/etc/rancid.types.conf
>>>>>> like this? :
>>>>>>
>>>>>> h3c;script;h3crancid -t cmw
>>>>>> h3c;login;h3clogin
>>>>>>
>>>>>> On Thu, Oct 24, 2019 at 8:11 AM Ugo Bellavance <ugob at lubik.ca> wrote:
>>>>>>
>>>>>>> I don't know if that helps, but I'm running rancid with a 5120, but
>>>>>>> I'm using h3crancid, because I use an old version of rancid.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> On Thu, Oct 24, 2019 at 8:07 AM henri hemery <henri.hemery at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>> Have you read this
>>>>>>>>> https://sites.google.com/site/jrbinks/code/rancid/cmwrancid ?
>>>>>>>>>
>>>>>>>>> Yes, I dicovered cmwlogin from this page and I followed every
>>>>>>>> step, but I think this module is not for every type of comware 7 devices
>>>>>>>>
>>>>>>>>
>>>>>>>>> You may want to read this thread:
>>>>>>>>> http://www.shrubbery.net/pipermail/rancid-discuss/2018-February/010065.html
>>>>>>>>>
>>>>>>>>
>>>>>>>> Yes I read that thread, not so much to learn from..But I gonna try
>>>>>>>> to get in touch with the person.
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Oct 23, 2019 at 3:57 PM henri hemery <
>>>>>>>>> henri.hemery at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I would like to know if some of you succeeded in backing UP HPE
>>>>>>>>>> switches.
>>>>>>>>>>
>>>>>>>>>> I successfully backed up HP FF 7910, HP 2530, but no way to back
>>>>>>>>>> up HPE 5130 and HP 5120.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> If I type this command:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *[rancid at cardlswbkp1 bin]$ ./cmwlogin -c "display version"
>>>>>>>>>> 10.1.170.1*
>>>>>>>>>>
>>>>>>>>>> *10.1.170.1*
>>>>>>>>>>
>>>>>>>>>> *spawn telnet 10.1.170.1*
>>>>>>>>>>
>>>>>>>>>> *Trying 10.1.170.1...*
>>>>>>>>>>
>>>>>>>>>> *Connected to 10.1.170.1.*
>>>>>>>>>>
>>>>>>>>>> *Escape character is '^]'.*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ********************************************************************************
>>>>>>>>>>
>>>>>>>>>> ** Copyright (c) 2010-2017 Hewlett Packard Enterprise Development
>>>>>>>>>> LP          **
>>>>>>>>>>
>>>>>>>>>> ** Without the owner's prior written
>>>>>>>>>> consent,                                 **
>>>>>>>>>>
>>>>>>>>>> ** no decompiling or reverse-engineering shall be
>>>>>>>>>> allowed.                    **
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ********************************************************************************
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *login: [login]*
>>>>>>>>>>
>>>>>>>>>> *Password:*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>undo smart*
>>>>>>>>>>
>>>>>>>>>> *             ^*
>>>>>>>>>>
>>>>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>undo interactive*
>>>>>>>>>>
>>>>>>>>>> *             ^*
>>>>>>>>>>
>>>>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>undo terminal monitor*
>>>>>>>>>>
>>>>>>>>>> *The current terminal is disabled to display logs.*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>terminal length 0*
>>>>>>>>>>
>>>>>>>>>> *                 ^*
>>>>>>>>>>
>>>>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>terminal width 132*
>>>>>>>>>>
>>>>>>>>>> *                 ^*
>>>>>>>>>>
>>>>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>display version*
>>>>>>>>>>
>>>>>>>>>> *HPE Comware Software, Version 7.1.070, Release 3208P03*
>>>>>>>>>>
>>>>>>>>>> *Copyright (c) 2010-2017 Hewlett Packard Enterprise Development
>>>>>>>>>> LP*
>>>>>>>>>>
>>>>>>>>>> *HPE 5130 24G PoE+ 4SFP+ EI Switch uptime is 10 weeks, 4 days, 6
>>>>>>>>>> hours, 28 minutes*
>>>>>>>>>>
>>>>>>>>>> *Last reboot reason : Cold reboot*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *####suppressed output###*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *Boot image: flash:/5130ei-cmw710-boot-r3208p03.bin*
>>>>>>>>>>
>>>>>>>>>> *Boot image version: 7.1.070, Release 3208P03*
>>>>>>>>>>
>>>>>>>>>> *  Compiled Dec 14 2017 18:00:00*
>>>>>>>>>>
>>>>>>>>>> *System image: flash:/5130ei-cmw710-system-r3208p03.bin*
>>>>>>>>>>
>>>>>>>>>> *System image version: 7.1.070, Release 3208P03*
>>>>>>>>>>
>>>>>>>>>> *  Compiled Dec 14 2017 18:00:00*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>exit*
>>>>>>>>>>
>>>>>>>>>> *Connection closed by foreign host.*
>>>>>>>>>>
>>>>>>>>>> *[rancid at cardlswbkp1 bin]$*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> It work. But when I launch rancid-run, I never receive the output.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> When I type: ./cmwlogin -dl 10.1.170.1, the output is stocked
>>>>>>>>>> here:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *expect: does "" (spawn_id exp6) match regular expression
>>>>>>>>>> "[\r\n]+"? (No Gate, RE only) gate=yes re=no*
>>>>>>>>>>
>>>>>>>>>> *"^(.+[:.])1 ((>\u0007?|#| \(enable\)))"? (No Gate, RE only)
>>>>>>>>>> gate=yes re=no*
>>>>>>>>>>
>>>>>>>>>> *"^.+(>\u0007?|#| \(enable\))"? (No Gate, RE only) gate=yes re=no*
>>>>>>>>>>
>>>>>>>>>> *<MGMSW1>*
>>>>>>>>>>
>>>>>>>>>> *expect: does "<MGMSW1>" (spawn_id exp6) match regular expression
>>>>>>>>>> "[\r\n]+"? (No Gate, RE only) gate=yes re=no*
>>>>>>>>>>
>>>>>>>>>> *"^(.+[:.])1 ((>\u0007?|#| \(enable\)))"? (No Gate, RE only)
>>>>>>>>>> gate=yes re=no*
>>>>>>>>>>
>>>>>>>>>> *"^.+(>\u0007?|#| \(enable\))"? (No Gate, RE only) gate=yes
>>>>>>>>>> re=yes*
>>>>>>>>>>
>>>>>>>>>> *expect: set expect_out(0,string) "<MGMSW1>"*
>>>>>>>>>>
>>>>>>>>>> *expect: set expect_out(1,string) ">"*
>>>>>>>>>>
>>>>>>>>>> *expect: set expect_out(spawn_id) "exp6"*
>>>>>>>>>>
>>>>>>>>>> *expect: set expect_out(buffer) "<MGMSW1>"*
>>>>>>>>>>
>>>>>>>>>> *tty_raw_noecho: was raw = 0  echo = 1*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Anybody can help?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Rancid-discuss mailing list
>>>>>>>>>> Rancid-discuss at shrubbery.net
>>>>>>>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ugo Bellavance (ugob at lubik.ca)
>>>>>>>>> _______________________________________________
>>>>>>>>> Rancid-discuss mailing list
>>>>>>>>> Rancid-discuss at shrubbery.net
>>>>>>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ugo Bellavance (ugob at lubik.ca)
>>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Ugo Bellavance (ugob at lubik.ca)
>>>>>
>>>>
>>>
>>> --
>>> Ugo Bellavance (ugob at lubik.ca)
>>> _______________________________________________
>>> Rancid-discuss mailing list
>>> Rancid-discuss at shrubbery.net
>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>
>> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20191025/8a6a2365/attachment.htm>


More information about the Rancid-discuss mailing list