[rancid] Unable to Conduct Cisco Wireless Controller Backup

Piegorsch, Weylin William weylin at bu.edu
Thu Oct 18 03:17:56 UTC 2018


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 at 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 <removed>\n"); next;
         }

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

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


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

    Fri, Oct 12, 2018 at 03:36:20PM +0000, 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 <device>”.  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 <removed>\n"); next;
         }

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

         $linecnt++;



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20181018/bbec418e/attachment.html>


More information about the Rancid-discuss mailing list