Discussion:
[rancid] Pinning Moving Config Lines
Michael Stefaniuc
2009-01-27 10:18:14 UTC
Permalink
Hello guys,

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.

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?

thanks
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
john heasley
2009-01-27 17:50:48 UTC
Permalink
Post by Michael Stefaniuc
Hello guys,
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.
Post by Michael Stefaniuc
- 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.
Michael Stefaniuc
2009-01-28 11:14:06 UTC
Permalink
Post by john heasley
Post by 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.
Post by john heasley
Post by Michael Stefaniuc
- 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
john heasley
2009-01-28 19:43:26 UTC
Permalink
Post by Michael Stefaniuc
Post by john heasley
Post by 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.
@@ -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.
Post by john heasley
Post by Michael Stefaniuc
- 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.
i really dislike ciscos for stuff like this.

try adding a match for it like
/^callhome/ &&
ProcessHistory("COMMENTS","keysort","Z0","$_") && next;
Michael Stefaniuc
2009-02-04 13:17:58 UTC
Permalink
Post by john heasley
Post by Michael Stefaniuc
Post by john heasley
Post by 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.
Post by Michael Stefaniuc
- 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.
i really dislike ciscos for stuff like this.
try adding a match for it like
/^callhome/ &&
ProcessHistory("COMMENTS","keysort","Z0","$_") && next;
That would have been too easy if it would have worked. But it doesn't; I
tried it out but the "callhome" line still moves around.

I'll hack something up as it is annoying; depending on the amount of
"spare time" it will be a hack or a proper patch I can submit upstream.

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
john heasley
2009-02-04 21:31:52 UTC
Permalink
Post by Michael Stefaniuc
Post by john heasley
Post by Michael Stefaniuc
Post by john heasley
Post by 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.
Post by Michael Stefaniuc
- 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.
i really dislike ciscos for stuff like this.
try adding a match for it like
/^callhome/ &&
ProcessHistory("COMMENTS","keysort","Z0","$_") && next;
you might also try this with "" instead of "COMMENTS", or just filter it.
Post by Michael Stefaniuc
That would have been too easy if it would have worked. But it doesn't; I
tried it out but the "callhome" line still moves around.
I'll hack something up as it is annoying; depending on the amount of
"spare time" it will be a hack or a proper patch I can submit upstream.
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
Loading...