[rancid] Re: Pinning Moving Config Lines

Michael Stefaniuc mstefani at redhat.com
Wed Jan 28 11:14:06 UTC 2009


john heasley wrote:
> Tue, Jan 27, 2009 at 11:18:14AM +0100, Michael Stefaniuc:
>> is there an easy way to assign a fixed position to config lines that
>> move around during two invocations of "write term"?
>>
>> In the Cisco SAN-OS devices the "callhome" config line moves between the
>> front and end of the "fcalias name" sections producing bogus change reports.
> 
> how so?  please show an example of the moving.
Sure:
@@ -104,8 +104,9 @@

  snmp-server user ...
  no snmp-server enable traps vrrp
  snmp-server enable traps license
+ callhome
  fcalias name santest1_util vsan 10
      member pwwn 11:22:33:44:55:66:77:88

  fcalias name n0a-f0a vsan 10
@@ -345,9 +346,8 @@

  fcalias name n1b-f0c vsan 30
      member pwwn 22:33:44:55:66:77:88:99

- callhome
  zone name santest1_util_10 vsan 10
      member fcalias santest1_util
      member fcalias n0a-f0a
      member fcalias n0b-f0a

The next rancid run the above diff would be reversed.

>> The solutions I see on a quick glance (none satisfactory):
>> - The absolute easiest way would be to just drop the line but for this
>>   config line it doesn't seem like a wise idea.
>> - In the WriteTerm function create a separate ProcessHistory
>>   "fcalias name" section with sorting and add "callhome" to that section
>>   too. Drawback is that I would have to parse the "fcalias name"
>>   sections correctly too.
>>
>> Does anybody know a nicer way to pin the moving config line down?
> 
> We'd normally just sort it.
Yeah, will be a pita in this case.

bye
	michael
-- 
Michael Stefaniuc                           Tel.: +49-711-96437-199
Consulting Communications Engineer          Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach bei Muenchen
Handelsregister: Amtsgericht Muenchen HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
                 Werner Knoblich


More information about the Rancid-discuss mailing list