Re: [rancid] [patch] fluctuating data from cisco-nx

2018-08-18 Thread Pavel Korovin
On 08/18, heasley wrote:
> Fri, Aug 17, 2018 at 10:16:51PM +0300, Pavel Korovin:
> > There are several issues with fluctuating data received from Cisco Nexus
> > platform (55xx, 77xx):
> > 
> > * if PAR_COUNT is > 1 (by default, it's 5) and rancid simultaneously runs
> >   "show version" in multiple VDCs on the same device, bootflash size
> 
> slot0 too?  or just bootflash?
 
I don't have Nexus devices with slot0 size > 0, but I suppose it should
be the same story.

> >   values hop between 0 and actual size, with each invocation producing cvs
> >   commits and change notifications. To reproduce, run "show ver"
> >   simultaneously on multiple VDCs. It seems that NX-OS requires exclusive
> >   access to hardware to determine the size of bootflash and fails during
> >   concurrent access. I cannot offer any better solution than just
> >   providing a knob to filter out bootflash size fluctuations by setting
> >   FILTER_OSC = ALL.

> > -   # Drop accounting.log
> > -   /\s+accounting\.log$/ && next;
> > +   # Drop accounting logs
> > +   /\s+accounting.log.*/ && next;
> 
> was removal of the escape of the . intentional?

Yes. I don't remember if earlier versions of NX-OS use
accounting_log or accounting.log naming, so it will filter both.
 
-- 
With best regards,
Pavel Korovin

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] [patch] fluctuating data from cisco-nx

2018-08-18 Thread heasley
Fri, Aug 17, 2018 at 10:16:51PM +0300, Pavel Korovin:
> Dear all,
> 
> There are several issues with fluctuating data received from Cisco Nexus
> platform (55xx, 77xx):
> 
> * accounting logs filenames are named as accounting_log,
>   accounting_log.0, etc. These filenames are not filtered out from the
>   output
> 
> * "show interface transceiver" command introduced in v3.8 produces huge
>   (temperature, current, power & voltage); imagine how much output produces
>   N5596 with 96 ports/transceivers. I propose to filter out this output
>   if FILTER_OSC != NO
> 
> * if PAR_COUNT is > 1 (by default, it's 5) and rancid simultaneously runs
>   "show version" in multiple VDCs on the same device, bootflash size

slot0 too?  or just bootflash?

>   values hop between 0 and actual size, with each invocation producing cvs
>   commits and change notifications. To reproduce, run "show ver"
>   simultaneously on multiple VDCs. It seems that NX-OS requires exclusive
>   access to hardware to determine the size of bootflash and fails during
>   concurrent access. I cannot offer any better solution than just
>   providing a knob to filter out bootflash size fluctuations by setting
>   FILTER_OSC = ALL.
> 
> Please see the diff attached.
> 
> -- 
> With best regards,
> Pavel Korovin

> $OpenBSD$
> 
> Index: lib/nxos.pm.in
> --- lib/nxos.pm.in.orig
> +++ lib/nxos.pm.in
> @@ -186,7 +186,7 @@ EndSoftware:
>   }
>   }
>  EndHardware:
> - if (/^\s+(bootflash|slot0):\s+(\d+) kB(.*)$/) {
> + if (/^\s+(bootflash|slot0):\s+(\d+) kB(.*)$/ && ($filter_osc < 2)) {
>   my($tmp) = int($2 / 1024);
>   ProcessHistory("COMMENTS","keysort","B1",
>  "!Memory: $1: $tmp MB$3\n");
> @@ -496,8 +496,8 @@ sub DirSlotN {
>   # Drop bootvar_debug log files
>   /\s+bootvar_debug\./ && next;
>  
> - # Drop accounting.log
> - /\s+accounting\.log$/ && next;
> + # Drop accounting logs
> + /\s+accounting.log.*/ && next;

was removal of the escape of the . intentional?

>   # Drop vtp_debug.log and vtp_debug_old.log CDETS bug CSCuy87611
>   /\s+vtp_debug(_old)?\.log$/ && next;
> @@ -574,6 +574,9 @@ sub ShowIntTransceiver {
>   return(-1) if (/No token match at /);   # 1000v
>   return(-1) if (/\% Permission denied/);
>   return(-1) if (/command authorization failed/i);
> + 
> + # filter out oscillating data from transceivers if FILTER_OSC != NO
> + next if (/(Temperature|Current|Power|Voltage)\s+:/ && ($filter_osc >= 
> 1));

The ones that I have access to, do not include this. :)  It seems to always
be approperiate to filter this, so I've removed the FILTER_OSC knob.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss