[rancid] Extra spaces being randomly added - and seen as config changes

Daniel Schmidt daniel.schmidt at wyo.gov
Fri Jan 4 20:48:03 UTC 2013


Have seen the vlan thing on Cisco.  With no time to upgrade or try to
write a proper fix, I slapped on a couple of things together and called it
good.  (Heas says these are fixed in 2.3.8 though)  Again, none of this
was done well, it was more: "Well, that works.  Onto the next problem."
You are welcome to try the cobbles below.


diff -U 4 control_rancid.bak control_rancid
--- control_rancid.bak  2011-11-22 10:15:36.000000000 -0700
+++ control_rancid      2011-11-22 10:19:51.000000000 -0700
@@ -42,8 +42,12 @@
 #
 # control_rancid $GROUP
 #

+# #*@& sort locale!!
+LC_COLLATE="POSIX"
+export LC_COLLATE
+
 # print a usage message to stderr
 pr_usage() {
     echo "usage: $0 [-V] [-r device_name] [-m mail rcpt] group" >&2;
 }

Clogin:

623         } else {
624             send "terminal length 0\r"
625             expect -re $prompt  {}
626             send "terminal width 80\r"
627         }

-----Original Message-----
From: rancid-discuss-bounces at shrubbery.net
[mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of heasley
Sent: Wednesday, January 02, 2013 10:24 AM
To: Aaron Wasserott
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Extra spaces being randomly added - and seen as
config changes

Tue, Jan 01, 2013 at 02:29:02PM -0800, Aaron Wasserott:
> I am running RANCID 2.3.8 on Ubuntu 12.04.1 LTS, Precise Pangolin,
kernel 3.2.0-35-generic x86_64.
>
> I am seeing some odd behavior when running rancid against Cisco and
Mikrotik devices. The output will sometimes have extra spaces - or line
breaks maybe? - that is then seen as a config change when it's not. Two
examples below. The first from a Mikrotik router and the second a Cisco
router.
>
> In the first example an extra space was seen after "sensitive source=" .
In the second example the ports listed in the VLAN output break across two
lines, but sometimes only one. In this second example, I have noticed it
will go back and forth. Sometimes the ports are listed all on one line,
sometimes two. I have many Mikrotiks with many lines of configs, so I
haven't checked to see if there is a recurring issue with the same line or
not.
>
> -----------------
>
> - add name=startup-tone
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
source=":for t1 from=1 to=10 step=1 do={\r\n   :for t2 from=300 to=1800
step=40 do={\r \n     :beep frequency=\$t2 length=11ms;\r \n     :delay
11ms;\r \n   }\r \n }\r \n"
> + add name=startup-tone
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
source=": for t1 from=1 to=10 step=1 do={\r \n   :for t2 from=300 to=1800
step=40 do={\r \n     :beep frequency=\$t2 length=11ms;\r \n     :delay
11ms;\r \n   }\r \n }\r \n"

I suspect this is the device.  try mtlogin -c 'export' device in a loop
and look for the change.  the mtlogin code looks ok to me, but i dont have
one of these for testing.

> - !VLAN: 1    default                          active    Fa2, Fa3, Fa4,
Fa5, Fa6, Fa7
> - !VLAN:                                                 Fa8, Fa9
> + !VLAN: 1    default                          active    Fa2, Fa3, Fa4,
Fa5, Fa6, Fa7, Fa8, Fa9
>
> -----------------

this is the device itself, which i thought was due to the terminal width.
but
2.3.8 should have the change that sets the width.  unless the use that
runs rancid does not have permission to alter the terminal width, i havent
an idea why this would be occuring.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

E-Mail to and from me, in connection with the transaction 
of public business, is subject to the Wyoming Public Records 
Act and may be disclosed to third parties.



More information about the Rancid-discuss mailing list