[rancid] Restore of rancid-based hp procurve config files failed

Per-Olof Olsson peo at chalmers.se
Fri Oct 14 18:26:59 UTC 2011


Hi

Yes Procurve switches use the first comment line as a type of identifier 
to prevent loading wrong (or none) config files to the switch.

I don't know why hrancid remove that line from the backup.
After put that line back its easier to use.
I just make a copy of the rancid backup file, removing the comment part 
up to identifier line, and load it to the switch.


diff -c hrancid.in.ORG hrancid.in
...
*** 302,307 ****
--- 340,346 ----
         s/\$(Revision|Id):/ $1:/;
         /^; (\S+) configuration editor;/i &&
             ProcessHistory("COMMENTS","keysort","A0",";Chassis type: 
$1\n") &&
+           ProcessHistory("","","",";\n;Running config file:\n$_") &&
             next;

         # order logging statements - doesnt appear to do syslog as of 
right now
***************
...

/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Hörsalsvägen 5                412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8680
----------------------------------------------------------


Stefan Metzger  2011-10-12 07:22:
> Hi,
>
> configured rancid (version 2.3.6, expect version 5.44 on a SLES 11.1) based on different tutorials. Created a user “rancid”, the .cloginrc file, modified the
> rancid.conf file, created the svn/cvs repository (rancid-cvs) and tested successfully the login on our hp procurve switch
> infrastructure by using hlogin.
>
> After running the “rancid-run” script to backup the configuration of a hp procurve 4208 switch, the config file under
> /usr/local/rancid/var/<LIST_OF_GROUPS_entry>/configs looks like this:
>
> -----
> ;RANCID-CONTENT-TYPE: hp
> ;
> ;Chassis type: J8773A
> ;Serial Number: SG746VB024
> ;
> ;Memory: 47M
> ;
> ;Image: stamp:    /sw/code/build/rmm(rm11)
> ;Image: Mar 12 2010 01:28:36
> ;Image: L.11.24
> ;Image: 76
> ;Image: Boot Image:     Primary
> ;Image: ROM L.10.03
> ;
> ;Flash: Image           Size(Bytes)   Date   Version
Y> ;Flash: -----           ----------  -------- -------
> ;Flash: Primary Image   : 4542313   03/12/10 L.11.24
> ;Flash: Secondary Image : 4542313   03/12/10 L.11.24
> ;Flash: Boot Rom Version: L.10.03
> ;Flash: Current Boot    : Primary
> ;
> ;  Status and Counters - Module Information
> ;   Slot  Module Description                       Serial Number
> ;   ----- ---------------------------------------- --------------
> ;   A     ProCurve J9033A Gig-T/SFP vl Module      SG743AM06Y
> ;   B     ProCurve J8768A 24p Gig-T vl Module      SG744AK0D9
> ;
> ; Stacking Status
> ;  Stack State           : Candidate
> ;  Transmission Interval : 60
> ;  Auto Join             : Yes
> ;
> ;
> hostname "ProCurve Switch 4208vl"
> max-vlans 256
> module 1 type J9033A
> module 2 type J8768A
> […]
> ;
> ---------
>
> If I try to restore this file by using scp on the switch startup-config (scp<backup file>  <login>@<switch-ip>:/cfg/startup-config
> I got an error:
>
> scp: /cfg/startup-config/: errno = 0xe
>
>
> If I backup the config manually by using scp the backup file (header) looks a little bit different:
>
> -----
> ; J8773A Configuration Editor; Created on release #L.11.24
>
> hostname "ProCurve Switch 4208vl"
> max-vlans 256
> module 2 type J8768A
> module 1 type J9033A
> […]
>
> -----
>
> Restoring this one works well.
> If I replace the comments header of the rancid backup file by the second one (; J8773A Configuration Editor; Created on release #L.11.24) the restore
> works also.
>
> Any idea/solution?
>
> Br
> Stefan
> ___________________________________________________________
> SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss




More information about the Rancid-discuss mailing list