Discussion:
[rancid] HP Procurve 2920-48G-POE+ Stack and hrancid show stack command issue
Stephen Austen
2014-02-07 05:47:24 UTC
Permalink
Hi,

I am having an issue where config differs are being created every hour due to the response to "show stack" command in hrancid.

The problem appears to be that "Uptime" in this command's response needs to be skipped/removed and my attempts at editing hrancid end up aborting due compile errors.

--- networking/configs/X.X.X.X 2014/02/07 03:01:34 1.40
+++ networking/configs/ X.X.X.X 2014/02/07 04:01:36 1.42
@@ -34,7 +34,7 @@
;MAC Address : 9cb654-d0638b
;Stack Topology : Chain
;Stack Status : Active
-;Uptime : 48d 21h 20m
+;Uptime : 48d 22h 20m
;Software Version : WB.15.11.0003
; Mbr
; ID Mac Address Model Pri Status

Would someone be so kind as to assist me in filtering out "Uptime" in hrancid, or elsewhere, to avoid unnecessary emails and CVS updates?

System versions:
rancid 2.3.8 on CentOS 5.9

Regards,

Steve Austen

<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td>
<a align="left" href="www.lanecove.nsw.gov.au/festivals" target="_blank"><img alt="Walk Around The World" src="Loading Image..." style="width: 522px; min-height: 152px; border-width: 0pt; border-style: solid; float: left; display: block;" /></a></td>
</tr>
<tr>
<td>
<pre>
**********************************************************************
Looking for something in particular?
Visit our website: - <a href="http://www.lanecove.nsw.gov.au" target="_blank">www.lanecove.nsw.gov.au</a>

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
Lane Cove Council.

Information transmitted via email may be subject to corruption by the
process. Information contained in this email should not be relied upon
where loss, damage or injury is possible. Verified information should
be obtained in writing directly from the authorised Council officers.

This footnote also confirms that this email message has been swept by
Sophos for the presence of computer viruses.

**********************************************************************</pre>
</td>
</tr>
</tbody>
</table>
<br clear="all">


_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services on behalf of Lane Cove Council - powered by MessageLabs. For further information
visit http://www.mci.com
Alan McKinnon
2014-02-07 06:57:02 UTC
Permalink
Post by Stephen Austen
Hi,
I am having an issue where config differs are being created every hour
due to the response to “show stack” command in hrancid.
The problem appears to be that “Uptime” in this command’s response needs
to be skipped/removed and my attempts at editing hrancid end up aborting
due compile errors.
--- networking/configs/X.X.X.X 2014/02/07
03:01:34 1.40
+++ networking/configs/ X.X.X.X 2014/02/07 04:01:36 1.42
@@ -34,7 +34,7 @@
;MAC Address : 9cb654-d0638b
;Stack Topology : Chain
;Stack Status : Active
-;Uptime : 48d 21h 20m
+;Uptime : 48d 22h 20m
;Software Version : WB.15.11.0003
;
Mbr
; ID Mac Address Model Pri Status
Would someone be so kind as to assist me in filtering out “Uptime” in
hrancid, or elsewhere, to avoid unnecessary emails and CVS updates?
Add this to sub ShowStack(), directly after the 2 return statements is a
good place:

next if (/^Uptime/);


That will remove any line starting with "Uptime", which I imagine will
suit your needs.
--
Alan McKinnon
***@gmail.com
Hughes, Doug
2014-02-07 13:52:11 UTC
Permalink
Yeah, if you check the mail list archives you will find that about 1/3 of the requests are similar in nature. The gist is, edit the hrancid file, find the routine that collects Uptime (it's one of the commandtable callbacks) and add a next if /;Uptime/; command in there near the other 'next if' commands. It's very easy.


From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Stephen Austen
Sent: Friday, February 07, 2014 12:47 AM
To: rancid-***@shrubbery.net
Subject: [rancid] HP Procurve 2920-48G-POE+ Stack and hrancid show stack command issue

Hi,

I am having an issue where config differs are being created every hour due to the response to "show stack" command in hrancid.

The problem appears to be that "Uptime" in this command's response needs to be skipped/removed and my attempts at editing hrancid end up aborting due compile errors.

--- networking/configs/X.X.X.X 2014/02/07 03:01:34 1.40
+++ networking/configs/ X.X.X.X 2014/02/07 04:01:36 1.42
@@ -34,7 +34,7 @@
;MAC Address : 9cb654-d0638b
;Stack Topology : Chain
;Stack Status : Active
-;Uptime : 48d 21h 20m
+;Uptime : 48d 22h 20m
;Software Version : WB.15.11.0003
; Mbr
; ID Mac Address Model Pri Status

Would someone be so kind as to assist me in filtering out "Uptime" in hrancid, or elsewhere, to avoid unnecessary emails and CVS updates?

System versions:
rancid 2.3.8 on CentOS 5.9

Regards,

Steve Austen


[Walk Around The World]<www.lanecove.nsw.gov.au/festivals>




**********************************************************************

Looking for something in particular?

Visit our website: - www.lanecove.nsw.gov.au<http://www.lanecove.nsw.gov.au>



**********************************************************************

This email and any files transmitted with it are confidential and

intended solely for the use of the individual or entity to whom they

are addressed. If you have received this email in error please notify

Lane Cove Council.



Information transmitted via email may be subject to corruption by the

process. Information contained in this email should not be relied upon

where loss, damage or injury is possible. Verified information should

be obtained in writing directly from the authorised Council officers.



This footnote also confirms that this email message has been swept by

Sophos for the presence of computer viruses.



**********************************************************************





_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services on behalf of Lane Cove Council - powered by MessageLabs. For further information
visit http://www.mci.com

Loading...