Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup

2018-10-17 Thread Piegorsch, Weylin William
Thanks.  I just tried, and got the same "end of run not found."  Then I 
realized I wasn’t merely cutting/pasting from one location to another, but also 
the specific logout text test changed; once I updated to what you showed, it 
worked perfectly.  Also - the lines I had were at different indexes, and 
different offsets between old/new locations where the commands moved.  For 
reference, diff below not to my .in file (I don’t have the original install 
makefiles), but against the production library file.

Lest I forget – Muchos mahalo for the help on this the past few months working 
through things.

Weylin

[rancid@nsgv-prod-59 ~]$ diff -u lib/rancid/ciscowlc.pm-original-3.4.1 
lib/rancid/ciscowlc.pm
--- lib/rancid/ciscowlc.pm-original-3.4.1   2016-08-01 22:57:39.636366474 
-0400
+++ lib/rancid/ciscowlc.pm  2018-10-15 02:12:48.334651972 -0400
@@ -90,10 +90,6 @@

 TOP: while(<$INPUT>) {
 tr/\015//d;
-   if (/^.*logout$/)  {
-   $clean_run = 1;
-   last;
-   }
 if (/^Error:/) {
 print STDOUT ("$host wlogin error: $_");
 print STDERR ("$host wlogin error: $_") if ($debug);
@@ -126,6 +122,10 @@
 last TOP;
 }
 }
+if (/^.*logout(\s*connection.*closed.*)?$/i)  {
+$clean_run = 1;
+last;
+}
 }
 }

@@ -140,6 +140,7 @@
 tr/\015//d;
 tr/\020//d;

+   last if (/^$prompt/);
 next if (/^\s*rogue ap classify/);
 next if (/^\s*rogue adhoc alert/);

@@ -165,7 +166,6 @@
 ProcessHistory("","","","!$1 \n"); next;
 }

-   last if (/^$prompt/);
 next if (/^(\s*|\s*$cmd\s*)$/);

 $linecnt++;
[rancid@nsgv-prod-59 ~]$


-Original Message-
From: heasley 
Date: Friday, October 12, 2018 at 8:38 PM
To: Weylin Piegorsch 
Cc: "rancid-discuss@shrubbery.net" 
Subject: Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup

Fri, Oct 12, 2018 at 03:36:20PM +, Piegorsch, Weylin William:
> ...with the exception of “if (!$clean_run || !$found_end)”.  For some 
reason I don’t understand, I keep getting “End of run not found”. I’ve attached 
.raw and .new files following an execution of “NOPIPE=YES rancid -d -t 
cisco-wlc5 ”.  I’m guessing it’s somehow related to how the session 
closes, but that’s a 100% guess. Any idea how I can resolve?

the device isnt echoing the \r\n at the logout.  i think this will fix it:

Index: lib/ciscowlc.pm.in
===
--- lib/ciscowlc.pm.in  (revision 3875)
+++ lib/ciscowlc.pm.in  (working copy)
@@ -42,10 +42,6 @@

 TOP: while(<$INPUT>) {
 tr/\015//d;
-   if (/^.*logout(\s*Connection.*closed.*)?$/)  {
-   $clean_run = 1;
-   last;
-   }
 if (/^Error:/) {
 print STDOUT ("$host wlogin error: $_");
 print STDERR ("$host wlogin error: $_") if ($debug);
@@ -78,6 +74,10 @@
 last TOP;
 }
 }
+   if (/^.*logout(\s*connection.*closed.*)?$/i) {
+   $clean_run = 1;
+   last;
+   }
 }
 }

@@ -91,6 +91,7 @@
 while (<$INPUT>) {
 tr/\015//d;
 tr/\020//d;
+   last if (/^$prompt/);

 next if (/^\s*rogue ap classify/);
 next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
@@ -118,7 +119,6 @@
 ProcessHistory("","","","!$1 \n"); next;
 }

-   last if (/^$prompt/);
 next if (/^(\s*|\s*$cmd\s*)$/);

 $linecnt++;



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


Re: [rancid] Rancid not updating

2018-10-17 Thread heasley
Wed, Oct 17, 2018 at 02:40:50PM +, Larry Larsen:
> I agree with your analysis on refused, host key and time outs.  I was going 
> to work on them one by one as it went along.  Hopefully someone knows 
> something about CVS.

that is addressed in the rancid FAQ.

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