Discussion:
[rancid] Avoid diff when flash memory change
Gerhard Mourani
2012-08-27 14:11:46 UTC
Permalink
Hello List,

I've a small issue with Foundry/Brocade devices and Rancid (latest version).
Every time flash bytes change on the Foundry/Brocade devices, Rancid generate a new diff and send alerts on it generating almost 10 messages per day just for that.
The question is -> How to avoid diff when flash memory change with Foundry/Brocade devices (see example below)?

- !Flash: Bytes Used : 9269248 bytes
- !Flash: Bytes Free : 4093083648 bytes
+ !Flash: Bytes Used : 9273344 bytes
+ !Flash: Bytes Free : 4093079552 bytes

Regards,
Jason Lewis
2012-08-27 14:39:26 UTC
Permalink
Gerhard,

I just had to do something similar for our Nexus switches this morning; you need to comment the relevant command(s) out of the module for your switch. Just edit the module (found in ~rancid/bin), find the command table, and comment out the command that's generating the output you don't want anymore. Unfortunately, I haven't dealt with Foundry switches before, so I can't help you with the command itself.

Good luck with it, and let us know if you need additional help.

Jason Lewis | Senior Server Specialist
Phone:614.497.1994 | Mobile:614.657.2300
email: ***@trilogyff.com<mailto:***@trilogyff.com>
[Description: Description: Description: Description: Trilogy Logo color]

From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Gerhard Mourani
Sent: Monday, August 27, 2012 10:13 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Avoid diff when flash memory change

Hello List,

I've a small issue with Foundry/Brocade devices and Rancid (latest version).
Every time flash bytes change on the Foundry/Brocade devices, Rancid generate a new diff and send alerts on it generating almost 10 messages per day just for that.
The question is -> How to avoid diff when flash memory change with Foundry/Brocade devices (see example below)?

- !Flash: Bytes Used : 9269248 bytes
- !Flash: Bytes Free : 4093083648 bytes
+ !Flash: Bytes Used : 9273344 bytes
+ !Flash: Bytes Free : 4093079552 bytes

Regards,

#####################################################################################
Scanned by MailMarshal - M86 Security's comprehensive email content security solution.
#####################################################################################
Gerhard Mourani
2012-08-27 14:45:06 UTC
Permalink
Jason,

Thanks, I found the related command table and codes, then removed the corresponding lines, references and now it work!

Here a diff for those interested about what has been removed:

diff -ur rancid-2.3.8.orig/bin/francid.in rancid-2.3.8/bin/francid.in
--- rancid-2.3.8.orig/bin/francid.in 2011-03-09 12:19:15.000000000 -0500
+++ rancid-2.3.8/bin/francid.in 2012-08-27 10:42:39.000000000 -0400
@@ -244,22 +244,6 @@
return(0);
}

-# This routine parses "show flash"
-sub ShowFlash {
- print STDERR " In ShowFlash: $_" if ($debug);
-
- while (<INPUT>) {
- tr/\015//d;
- last if (/^$prompt/);
- next if (/^\s*$/);
- return(1) if (/^\s+\^$/); # edgeiron invalid command
-
- ProcessHistory("FLASH","","","!Flash: $_");
- }
- ProcessHistory("","","","!\n");
- return;
-}
-
# This routine parses "show module"
sub ShowModule {
print STDERR " In ShowModule: $_" if ($debug);
@@ -418,7 +402,6 @@
{'show version' => 'ShowVersion'},
{'show chassis' => 'ShowChassis'},
{'show module' => 'ShowModule'},
- {'show flash' => 'ShowFlash'},
{'write term' => 'WriteTerm'},
{'show running-config' => 'WriteTerm'},
);

Regards,

From: Jason Lewis [mailto:***@TRILOGYFF.com]
Sent: August-27-12 10:39 AM
To: Gerhard Mourani; rancid-***@shrubbery.net
Subject: RE: Avoid diff when flash memory change

Gerhard,

I just had to do something similar for our Nexus switches this morning; you need to comment the relevant command(s) out of the module for your switch. Just edit the module (found in ~rancid/bin), find the command table, and comment out the command that's generating the output you don't want anymore. Unfortunately, I haven't dealt with Foundry switches before, so I can't help you with the command itself.

Good luck with it, and let us know if you need additional help.

Jason Lewis | Senior Server Specialist
Phone:614.497.1994 | Mobile:614.657.2300
email: ***@trilogyff.com<mailto:***@trilogyff.com>
[Description: Description: Description: Description: Trilogy Logo color]

From: rancid-discuss-***@shrubbery.net<mailto:rancid-discuss-***@shrubbery.net> [mailto:rancid-discuss-***@shrubbery.net]<mailto:[mailto:rancid-discuss-***@shrubbery.net]> On Behalf Of Gerhard Mourani
Sent: Monday, August 27, 2012 10:13 AM
To: rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>
Subject: [rancid] Avoid diff when flash memory change

Hello List,

I've a small issue with Foundry/Brocade devices and Rancid (latest version).
Every time flash bytes change on the Foundry/Brocade devices, Rancid generate a new diff and send alerts on it generating almost 10 messages per day just for that.
The question is -> How to avoid diff when flash memory change with Foundry/Brocade devices (see example below)?

- !Flash: Bytes Used : 9269248 bytes
- !Flash: Bytes Free : 4093083648 bytes
+ !Flash: Bytes Used : 9273344 bytes
+ !Flash: Bytes Free : 4093079552 bytes

Regards,
________________________________

Scanned by MailMarshal - M86 Security's comprehensive email content security solution.
________________________________

Loading...