Discussion:
[rancid] Help for total Rancid Newb / Linux Newb?
James Shride
2013-06-20 14:41:24 UTC
Permalink
Hi!

1. Linux Newb
2. Rancid Newb


Here is the problem:
    We have had a working rancid build in place for a while. However we no longer have the person who admin'd it. After a recent config change to a switch, its spamming the notification. I never noticed this behavior before. Is this indicative of an error in the switch config, or do I have to acknowledge this rancid alert or something?


    I am grateful for any guidance or advice.

Thanks!
Ryan West
2013-06-20 16:33:52 UTC
Permalink
What are you being spammed with? Do you have access to the shell as the rancid user?

Sent from handheld.

On Jun 20, 2013, at 12:19 PM, "James Shride" <***@yahoo.com<mailto:***@yahoo.com>> wrote:

Hi!

1. Linux Newb
2. Rancid Newb


Here is the problem:
We have had a working rancid build in place for a while. However we no longer have the person who admin'd it. After a recent config change to a switch, its spamming the notification. I never noticed this behavior before. Is this indicative of an error in the switch config, or do I have to acknowledge this rancid alert or something?


I am grateful for any guidance or advice.

Thanks!
Alan McKinnon
2013-06-21 10:33:30 UTC
Permalink
Post by James Shride
Hi!
1. Linux Newb
2. Rancid Newb
We have had a working rancid build in place for a while. However we
no longer have the person who admin'd it. After a recent config change
to a switch, its spamming the notification. I never noticed this
behavior before. Is this indicative of an error in the switch config, or
do I have to acknowledge this rancid alert or something?
I am grateful for any guidance or advice.
Most likely is that something in the switch's config is now cycling or
changing frequently and rancid doesn't know to ignore it.

I get these kinds of things all the time, I recall one case where an OS
upgrade made many routers report on the cooling fan's rpm, you can
imagine how much spam that would generate and how completely useless the
info is :-) My solution for that was to add extra data checks in the
code so that rancid would ignore it.

Send a copy of the diff mails you get to the list so we can see what
your switch is doing
--
Alan McKinnon
***@gmail.com
Alan McKinnon
2013-06-21 10:33:30 UTC
Permalink
Have someone fixed this?

Else this will add some more info for sup-2t:s

$ diff -c rancid.in_ORG-2.3.8 rancid
*** rancid.in_ORG-2.3.8 2012-01-31 23:55:13.000000000 +0100
--- rancid 2013-06-21 11:17:26.899859733 +0200
***************
*** 301,306 ****
--- 336,353 ----
}
$_ =3D <INPUT>;
}
+ if ($cpu =3D~ /M8572/) {
+ if (defined($cpu)) {
+ s/^ CPU://;
+ ProcessHistory("COMMENTS","keysort","A3", "!CPU: $cpu, =
$_");
+ }
+ LINE: while (<INPUT>) {
+ last LINE if /^\s*$/;
+ ProcessHistory("COMMENTS","keysort","A3", "!CPU: $_");
+ last LINE if /^\s*I-cache/;
+ }
+ undef ($cpu);
+ }
$_ =3D "" if (! /(cpu at |processor: |$cpu processor,)/i);
tr/\015//d;
s/implementation/impl/i;
***************

Yes it's multiple lines in "show version" for sup-2t.
Don't know if it safe to exit while loop on "I_cache" or "empty" line after=
.
Left both if something change.
Does this lines need a more strict match?


diff from one of our sup-2t:s
4c4,8
< !CPU: M8572
---
!CPU: M8572, MPC8572_E, Version: 2.1, (0x80E80021)
!CPU: CORE: E500, Version: 3.0, (0x80210030)
!CPU: CPU:1500MHz, CCB:600MHz, DDR:600MHz
!CPU: L1: D-cache 32 kB enabled
!CPU: I-cache 32 kB enabled
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: ***@chalmers.se
Chalmers tekniska h?gskola IT-service
H?rsalsv?gen 5 412 96 G?teborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------


------------------------------

Message: 18
Date: Fri, 21 Jun 2013 12:33:30 +0200
From: Alan McKinnon <***@gmail.com>
To: rancid-***@shrubbery.net
Subject: Re: [rancid] Help for total Rancid Newb / Linux Newb?
Message-ID: <***@gmail.com>
Content-Type: text/plain; charset=3DISO-8859-1
Hi!
1. Linux Newb
2. Rancid Newb
We have had a working rancid build in place for a while. However we
no longer have the person who admin'd it. After a recent config change
to a switch, its spamming the notification. I never noticed this
behavior before. Is this indicative of an error in the switch config, or
do I have to acknowledge this rancid alert or something?
I am grateful for any guidance or advice.
Most likely is that something in the switch's config is now cycling or
changing frequently and rancid doesn't know to ignore it.

I get these kinds of things all the time, I recall one case where an OS
upgrade made many routers report on the cooling fan's rpm, you can
imagine how much spam that would generate and how completely useless the
info is :-) My solution for that was to add extra data checks in the
code so that rancid would ignore it.

Send a copy of the diff mails you get to the list so we can see what
your switch is doing




--
Alan McKinnon
***@gmail.com



------------------------------

Message: 19
Date: Mon, 24 Jun 2013 09:49:41 +0200
From: Per-Olof Olsson <***@chalmers.se>
To: "rancid-***@shrubbery.net" <rancid-***@shrubbery.net>
Subject: [rancid] Error handler for Cisco switches in rancid.
Message-ID: <***@chalmers.se>
Content-Type: text/plain; charset=3D"ISO-8859-1"; format=3Dflowed

Hi

I don't think error handler is doing what is expected. (2.3.8)

After I added some extra debug, it shows that subroutines exit on
"pointer line" (lines like " ^ ") instead of error text lines.
For me it seems safer to use text lines for deciding how to exit.


rancid -d cisco-sw1
...
HIT COMMAND:cisco-sw1#dir /all sec-bootflash:
In DirSlotN: cisco-sw1#dir /all sec-bootflash:
SUB return(1) parsing line: ^

HIT COMMAND:cisco-sw1#dir /all sec-slot0:
In DirSlotN: cisco-sw1#dir /all sec-slot0:
SUB return(1) parsing line: ^
...

After replacing
< return(1) if (/^\s*\^\s*$/);
---
next if (/^\s*\^\s*$/);
...
HIT COMMAND:cisco-sw1#dir /all sec-bootflash:
In DirSlotN: cisco-sw1#dir /all sec-bootflash:
SUB return(1) parsing line: % Invalid input detected at '^' marker.

HIT COMMAND:cisco-sw1#dir /all sec-slot0:
In DirSlotN: cisco-sw1#dir /all sec-slot0:
SUB return(1) parsing line: % Invalid input detected at '^' marker.
...

I only have a limited set of Cisco switches to test this on so
it's possible that this not will work on all devices using rancid (device t=
ype=3Dcisco).
Some devices may depend on these "pointer lines" and is missing error handl=
er for text.


Extende debug code:

diff -c rancid.in_ORG rancid
...
***************
*** 2129,2141 ****
--- 2210,2238 ----
last TOP;
}
$rval =3D &{$commands{$cmd}};
+ $_last_line =3D $_;
delete($commands{$cmd});
+ if ($rval !=3D 0) {
+ print STDERR ("SUB return\($rval\) parsing line: $_last_line\n"=
) if ($debug);
+ }
if ($rval =3D=3D -1) {
$clean_run =3D 0;
+ print STDOUT ("$host: \"$cmd\" failed parsing line: $_last_line=
\n");
+ print STDERR ("$host: \"$cmd\" failed parsing line: $_last_line=
\n") if ($debug);
last TOP;
}
}
}
...


/Peo
----------------------------------------------------------
Per-Olof Olsson Email: ***@chalmers.se
Chalmers tekniska h?gskola IT-service
H?rsalsv?gen 5 412 96 G?teborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------


------------------------------

Message: 20
Date: Mon, 24 Jun 2013 16:25:43 -0500
From: "Hinote, Scotty (MSFC-IS40)[NICS]" <***@nasa.gov>
To: "'rancid-***@shrubbery.net'" <rancid-***@shrubbery.net>
Subject: [rancid] proper way to delete or remove a group using a
subversion repository
Message-ID:
<***@NDMSSCC08.ndc.nasa.gov>
Content-Type: text/plain; charset=3D"us-ascii"

Hi All,

I am using RANCID with Subversion and I have a couple of groups that are no=
longer being used. If I delete the unwanted group from the rancid.conf and=
move the group directory to another location to simulate deletion then exe=
cute a rancid-cvs and rancid-run, I still get a full copy of the removed di=
rectory when I perform a svn checkout. How do I properly remove the group f=
rom the main RANCID directory and from the Subversion repository so that it=
is no longer under version control? I did try to svn delete the group dire=
ctory but I am informed that "." is not a working copy. I am worried that j=
ust moving (deleting) the directory and taking no further steps will cause =
some issues in the future with the Subversion repository. I am also using s=
vnsync to store and offsite copy of the repository that I want to make sure=
is not corrupted by improperly removing a group directory.

Thank you,
Scotty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/2013062=
4/fe244c00/attachment.html>

------------------------------

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

End of Rancid-discuss Digest, Vol 32, Issue 4
*********************************************

Loading...