From yann.moren at bluewin.ch Mon Sep 1 14:28:35 2014 From: yann.moren at bluewin.ch (yann.moren at bluewin.ch) Date: Mon, 1 Sep 2014 14:28:35 +0000 (GMT+00:00) Subject: [rancid] clogin issue Message-ID: <12549491.36962.1409581715187.JavaMail.webmail@bluewin.ch> Hi all, I've recently installed and configured Rancid on a server and i have a really boring issue when trying to run clogin "device name". When i try to test loging in, it may work 1 or 2 times but for a 3rd attempt i've got the following error: rancid at srv-rancid01:/var/lib/rancid/bin$ ./clogin aog_benin_petrol aog_benin_petrol spawn telnet aog_benin_petrol Trying 172.18.4.136... Connected to AOG_Benin_Petrol. Escape character is '^]'. !!! RESTRICTED AREA !!! !!!AUTHORIZED ACCESS ONLY!!! -----> Disconnect Now <----- User Access Verification Username: enable Password: % Authentication failed Username: vsat Password: % Authentication failed Username: vsat Password: % Authentication failed Connection closed by foreign host. Error: EOF received can not find channel named "exp6" while executing "send "\r"" ("foreach" body line 150) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] # attempt at platform switching. set platform "" send_user ..." (file "./clogin" line 758) It is sending the enable command before sending the username and password. Or maybe was it already sent but not received by the device. I tried to deactivate autoenable but no improvement. I have to say i'm lost. I tried to look into expect and use different package version as well as with Rancid with always the same result. The parsing seems not to work correctly. Could it be related to the latency? A majority of devices from which i want to get the configuration are over satellite links. Thanking you for support. Cheers Yann -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shaun.Krok at 888holdings.com Thu Sep 4 11:32:22 2014 From: Shaun.Krok at 888holdings.com (Shaun Krok) Date: Thu, 4 Sep 2014 11:32:22 +0000 Subject: [rancid] BIG IP v.11 multiple partitions and rancid Message-ID: <57FD84723C05BB4FA3BB5F66AC609F6406738614@XCH-IL-MB2.888holdings.corp> Hi I am busy to integrate Rancid into our network and have an issue with partitions on BIG IP LTM v11.x All works fine but Rancid does not backup all partitions ... I am using the script from GIT with TMSH commands This command work from bash : tmsh -q -c "cd /; list recursive" but does not from the script .. This is a snip from the forum where the issue was identified but is anyone aware if there is a fix : Thanks Shaun here is a working tmsh version in the rancid git repo. The only thing that doesn't work when adjusting the script to list all partition co config is a tmsh -q -c "cd /; list recursive" - it errors out due to extra double quotes required by the -c option. On Dec 6, 2012 8:57 PM, "Darius Seroka" > wrote: Shaun Krok Network Team Herzliya Business Park Herzliya Pituach 46140 Israel Telephone: +972 (0)732889406 Mobile: +972 (0)50 2424381 email:shaun.krok at 888holdings.com [Description: Description: Description: Description: Description: 888] [Description: Description: 888] This email message and its attachments are for the sole use of the intended recipient(s) and may not be shared with any other party. They may contain confidential information of 888 Holdings plc or its direct and indirect subsidiaries (together, the "888 Group") and are to be regarded as confidential information under any non-disclosure agreement. Any review, use, disclosure or distribution by persons or entities other than the intended recipient(s) is prohibited. Nothing in this message is capable of or intended to create any legally binding obligation. The 888 Group will only ever assume a legally binding obligation where recorded in a written agreement duly executed by the authorized signatories of the relevant 888 Group company. The 888 Group accepts no liability for any personal views expressed in this message. If you are not the intended recipient, please contact the sender by return and destroy all copies of the original message and its attachments. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 5415 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 13717 bytes Desc: image002.gif URL: From rowen121 at outlook.com Thu Sep 4 16:58:06 2014 From: rowen121 at outlook.com (Richard Owen) Date: Thu, 4 Sep 2014 17:58:06 +0100 Subject: [rancid] Fortigate 100 or 200 Message-ID: Anybody got Rancid working with Fortigate 100 or 200? I have the 200 working via ssh and running get config Thanks Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From frnkblk at iname.com Fri Sep 5 05:30:18 2014 From: frnkblk at iname.com (Frank Bulk) Date: Fri, 5 Sep 2014 00:30:18 -0500 Subject: [rancid] Fortigate 100 or 200 In-Reply-To: References: Message-ID: <000101cfc8ca$7adc9860$7095c920$@iname.com> Is that's 'fnrancid'? Been using it for many months now. Frank From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Richard Owen Sent: Thursday, September 04, 2014 11:58 AM To: Rancid-discuss at shrubbery.net Subject: [rancid] Fortigate 100 or 200 Anybody got Rancid working with Fortigate 100 or 200? I have the 200 working via ssh and running get config Thanks Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan.burgerhout at gmail.com Fri Sep 5 12:40:06 2014 From: nathan.burgerhout at gmail.com (Nathan Burgerhout) Date: Fri, 5 Sep 2014 14:40:06 +0200 Subject: [rancid] Two Cisco device's on one WAN IP Message-ID: Hello everyone, I hope that I'm in the right place to ask this. Recently I installed Rancid so that I can backup the Cisco devices from my customers. I have it working for one device. The second device can only be accessed by using SSH from the first Cisco to the second Cisco. Rancid Server at work --> Internet --> Cisco A --> Cisco B Is this possible to do? The example in the link below is for a network where the Rancid server is local which isn't the case for me, but it looks like I could use the usercmd method. http://www.shrubbery.net/pipermail/rancid-discuss/2008-September/003274.html Regards, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan.burgerhout at gmail.com Fri Sep 5 18:07:36 2014 From: nathan.burgerhout at gmail.com (Nathan Burgerhout) Date: Fri, 5 Sep 2014 20:07:36 +0200 Subject: [rancid] Two Cisco device's on one WAN IP In-Reply-To: <049a01cfc92e$b6f87ad0$24e97070$@softscape.ca> References: <049a01cfc92e$b6f87ad0$24e97070$@softscape.ca> Message-ID: Thank you Bob. I tried to do this, but it didn't work. It just stops at the point where it types the seconds SSH. The problem could be that my Cisco's authenticate through a Tacacs+ server. I'm going to try some more. At least I'm going in the right direction. --- Nathan 2014-09-05 19:27 GMT+02:00 Bob B : > Nathan, > > If it's any help, this is how we do it. We have many devices fitting this > exact scenario and it seems to work reasonably well. > > The configuration is a bit more involved in the .cloginrc file, but not > overly complicated. > > Bob. > > > > > -----Original Message----- > > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On > > Behalf Of Nathan Burgerhout > > Sent: Friday, September 05, 2014 8:40 AM > > To: rancid-discuss at shrubbery.net > > Subject: [rancid] Two Cisco device's on one WAN IP > > > > Hello everyone, > > > > > > I hope that I'm in the right place to ask this. > > > > Recently I installed Rancid so that I can backup the Cisco devices from > my > > customers. I have it working for one device. The second device can only > be > > accessed by using SSH from the first Cisco to the second Cisco. > > > > > > Rancid Server at work --> Internet --> Cisco A --> Cisco B > > > > > > Is this possible to do? The example in the link below is for a network > > where the Rancid server is local which isn't the case for me, but it > looks > > like I could use the usercmd method. > > > > http://www.shrubbery.net/pipermail/rancid-discuss/2008- > > September/003274.html > > > > > > Regards, > > > > Nathan > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rowen121 at outlook.com Fri Sep 5 22:30:06 2014 From: rowen121 at outlook.com (Richard Owen) Date: Fri, 5 Sep 2014 23:30:06 +0100 Subject: [rancid] Fortigate 100 or 200 In-Reply-To: <000101cfc8ca$7adc9860$7095c920$@iname.com> References: , <000101cfc8ca$7adc9860$7095c920$@iname.com> Message-ID: I think I may have found the problem! we're using a super old version 2.5 on the Fortigates, as someone has been to lazy to upgrade them, even though we had a subscription to all updates until last year!!! (I've only just joined and have been tasked of backing up all network enitities) once upgraded to 3.0, the features used in the fnrancid work perfectly. For now though I have hacked both the fnlogin and fnrancid to get it working. I've changed the command from "show full-configuration" to "get config" in fnrancid, and commented out the disable paging mechanisms but added 15 send "/r" at that point, so when a --press to continue, or q to quit-- is prompted, there's enough returns in the buffer to complete the paging of the config and therefore get a full backup. If anyone has experienced the same problem, it would great to know how you fixed it. Rich From: frnkblk at iname.com To: rowen121 at outlook.com; rancid-discuss at shrubbery.net Subject: RE: [rancid] Fortigate 100 or 200 Date: Fri, 5 Sep 2014 00:30:18 -0500 Is that?s ?fnrancid?? Been using it for many months now. Frank From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Richard Owen Sent: Thursday, September 04, 2014 11:58 AM To: Rancid-discuss at shrubbery.net Subject: [rancid] Fortigate 100 or 200 Anybody got Rancid working with Fortigate 100 or 200? I have the 200 working via ssh and running get config Thanks Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From rowen121 at outlook.com Sat Sep 6 17:26:53 2014 From: rowen121 at outlook.com (Richard Owen) Date: Sat, 6 Sep 2014 18:26:53 +0100 Subject: [rancid] Fortigate 100 or 200 In-Reply-To: <20140905233649.GD85298@shrubbery.net> References: , <000101cfc8ca$7adc9860$7095c920$@iname.com>, , <20140905233649.GD85298@shrubbery.net> Message-ID: I would but there EOL and just getting a backup incase they go bang. The only problem with upgrading, is that the config is completely different plus it gets wiped and not migrated when you upgrade the fortiOS :-( > Date: Fri, 5 Sep 2014 23:36:49 +0000 > From: heas at shrubbery.net > To: rowen121 at outlook.com > Subject: Re: [rancid] Fortigate 100 or 200 > > Fri, Sep 05, 2014 at 11:30:06PM +0100, Richard Owen: > > I think I may have found the problem! we're using a super old version 2.5 on the Fortigates, as someone has been to lazy to upgrade them, even though we had a subscription to all updates until last year!!! (I've only just joined and have been tasked of backing up all network enitities) once upgraded to 3.0, the features used in the fnrancid work perfectly. For now though I have hacked both the fnlogin and fnrancid to get it working. I've changed the command from "show full-configuration" to "get config" in fnrancid, and commented out the disable paging mechanisms but added 15 send "/r" at that point, so when a --press to continue, or q to quit-- is prompted, there's enough returns in the buffer to complete the paging of the config and therefore get a full backup. > > If anyone has experienced the same problem, it would great to know how you fixed it. > > > > save yourself the aggrevation and just upgrade them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob at softscape.ca Fri Sep 5 18:43:28 2014 From: bob at softscape.ca (Bob B) Date: Fri, 5 Sep 2014 14:43:28 -0400 Subject: [rancid] Two Cisco device's on one WAN IP In-Reply-To: References: <049a01cfc92e$b6f87ad0$24e97070$@softscape.ca> Message-ID: <04cf01cfc939$4a7cde90$df769bb0$@softscape.ca> Can you post your sanitized .cloginrc stanza? I'll compare it to what I have and see if anything stands out. BB > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On > Behalf Of Nathan Burgerhout > Sent: Friday, September 05, 2014 2:08 PM > To: Bob B; rancid-discuss at shrubbery.net > Subject: Re: [rancid] Two Cisco device's on one WAN IP > > Thank you Bob. > > > I tried to do this, but it didn't work. It just stops at the point where > it types the seconds SSH. The problem could be that my Cisco's > authenticate through a Tacacs+ server. I'm going to try some more. At > least I'm going in the right direction. > > > --- > Nathan > > > 2014-09-05 19:27 GMT+02:00 Bob B : > > > Nathan, > > If it's any help, this is how we do it. We have many devices fitting > this exact scenario and it seems to work reasonably well. > > The configuration is a bit more involved in the .cloginrc file, but > not overly complicated. > > Bob. > > > > > > -----Original Message----- > > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] > On > > Behalf Of Nathan Burgerhout > > Sent: Friday, September 05, 2014 8:40 AM > > To: rancid-discuss at shrubbery.net > > Subject: [rancid] Two Cisco device's on one WAN IP > > > > Hello everyone, > > > > > > I hope that I'm in the right place to ask this. > > > > Recently I installed Rancid so that I can backup the Cisco devices > from my > > customers. I have it working for one device. The second device can > only be > > accessed by using SSH from the first Cisco to the second Cisco. > > > > > > Rancid Server at work --> Internet --> Cisco A --> Cisco B > > > > > > Is this possible to do? The example in the link below is for a > network > > where the Rancid server is local which isn't the case for me, but > it looks > > like I could use the usercmd method. > > > > http://www.shrubbery.net/pipermail/rancid-discuss/2008- > > September/003274.html > > > > > > Regards, > > > > Nathan > > > > > From mgoeres at gmail.com Sat Sep 6 21:05:55 2014 From: mgoeres at gmail.com (Matt Goeres) Date: Sat, 6 Sep 2014 16:05:55 -0500 Subject: [rancid] Fortigate 100 or 200 In-Reply-To: References: <000101cfc8ca$7adc9860$7095c920$@iname.com> <20140905233649.GD85298@shrubbery.net> Message-ID: If they are Fortigate 100?s and 200?s not at least B or C models the devices aren?t even upgradable to 4.0 code I don?t think.? On September 6, 2014 at 12:27:19 PM, Richard Owen (rowen121 at outlook.com) wrote: I would but there EOL and just getting a backup incase they go bang. The only problem with upgrading, is that the config is completely different plus it gets wiped and not migrated when you upgrade the fortiOS :-( > Date: Fri, 5 Sep 2014 23:36:49 +0000 > From: heas at shrubbery.net > To: rowen121 at outlook.com > Subject: Re: [rancid] Fortigate 100 or 200 > > Fri, Sep 05, 2014 at 11:30:06PM +0100, Richard Owen: > > I think I may have found the problem! we're using a super old version 2.5 on the Fortigates, as someone has been to lazy to upgrade them, even though we had a subscription to all updates until last year!!! (I've only just joined and have been tasked of backing up all network enitities) once upgraded to 3.0, the features used in the fnrancid work perfectly. For now though I have hacked both the fnlogin and fnrancid to get it working. I've changed the command from "show full-configuration" to "get config" in fnrancid, and commented out the disable paging mechanisms but added 15 send "/r" at that point, so when a --press to continue, or q to quit-- is prompted, there's enough returns in the buffer to complete the paging of the config and therefore get a full backup. > > If anyone has experienced the same problem, it would great to know how you fixed it. > > > > save yourself the aggrevation and just upgrade them. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Mon Sep 8 16:19:02 2014 From: heas at shrubbery.net (heasley) Date: Mon, 8 Sep 2014 16:19:02 +0000 Subject: [rancid] Fortigate 100 or 200 In-Reply-To: References: <000101cfc8ca$7adc9860$7095c920$@iname.com> <20140905233649.GD85298@shrubbery.net> Message-ID: <20140908161902.GE61740@shrubbery.net> Sat, Sep 06, 2014 at 06:26:53PM +0100, Richard Owen: > I would but there EOL and just getting a backup incase they go bang. The only problem with upgrading, is that the config is completely different plus it gets wiped and not migrated when you upgrade the fortiOS :-( awesome product. you will need to add code to fnlogin to respond and strip the pager prompts. hlogin is a decent for an example of the more convoluted. > > Date: Fri, 5 Sep 2014 23:36:49 +0000 > > From: heas at shrubbery.net > > To: rowen121 at outlook.com > > Subject: Re: [rancid] Fortigate 100 or 200 > > > > Fri, Sep 05, 2014 at 11:30:06PM +0100, Richard Owen: > > > I think I may have found the problem! we're using a super old version 2.5 on the Fortigates, as someone has been to lazy to upgrade them, even though we had a subscription to all updates until last year!!! (I've only just joined and have been tasked of backing up all network enitities) once upgraded to 3.0, the features used in the fnrancid work perfectly. For now though I have hacked both the fnlogin and fnrancid to get it working. I've changed the command from "show full-configuration" to "get config" in fnrancid, and commented out the disable paging mechanisms but added 15 send "/r" at that point, so when a --press to continue, or q to quit-- is prompted, there's enough returns in the buffer to complete the paging of the config and therefore get a full backup. > > > If anyone has experienced the same problem, it would great to know how you fixed it. > > > > > > > save yourself the aggrevation and just upgrade them. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From n.arnold at gmail.com Mon Sep 8 10:47:32 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Mon, 8 Sep 2014 11:47:32 +0100 Subject: [rancid] HP Procurve - no config changes yet Rancid thinks there is Message-ID: Hi, I've got Rancid running for a lot of HP switches without issue. The only one I do have an issue with is my core switch. It's a HP Procurve 5412ZL. Rancid is set to run every hour and throughout the day. During the day it's quiet and not alerting me to anything (which is good as nothing in the config changes). However, during the night, it fires off email alerts telling me the config has changed. Looking at the email shows things like the following: aaa port-access authenticator D11 auth-vid 1 aaa port-access authenticato It almost looks like the switch can't output the config quick enough for Rancid and Rancid only gets half the config. It then thinks it's changed, logs it as a diff and fires off an email. I've spent weeks playing with the set up to try and fix this all to no avail. If anyone has any suggestions, I'd be happy to take them. Thanks in advance... Neil. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan.burgerhout at gmail.com Tue Sep 9 14:40:40 2014 From: nathan.burgerhout at gmail.com (Nathan Burgerhout) Date: Tue, 9 Sep 2014 16:40:40 +0200 Subject: [rancid] Two Cisco device's on one WAN IP In-Reply-To: <04cf01cfc939$4a7cde90$df769bb0$@softscape.ca> References: <049a01cfc92e$b6f87ad0$24e97070$@softscape.ca> <04cf01cfc939$4a7cde90$df769bb0$@softscape.ca> Message-ID: See below for the .cloginrc config that I use now. .cloginrc: # Customer_A SSH login # Router 01 add method Customer_A01 ssh telnet add user Customer_A01 {rancid} add password Customer_A01 {&g584g&agdf$VF$%*(#FHGFukt} {&^4g578$V784v78$*} # Router 02 behind router 01 add method Customer_A02 {usercmd} add user Customer_A02 {sadmin} add password Customer_A02 {SecretPassword} {SecretPassword} add usercmd Customer_A02 {/usr/lib/rancid/bin/clogin} {Customer_A01} {SecretPassword} add usercmd_chat Customer_A02 {>} {ssh 10.0.0.253} {3kopjes} {10.0.0.253} # General Login add user * {rancid} add password * {&g584g&agdf$VF$%*(#FHGFukt} {&^4g578$V784v78$*} add method * ssh telnet *J. Burgerhout* Krimpen aan den IJssel Tel. (06) 83080710 Web. www.xentux.com/jonathan 2014-09-05 20:43 GMT+02:00 Bob B : > Can you post your sanitized .cloginrc stanza? > > I'll compare it to what I have and see if anything stands out. > > BB > > > > > -----Original Message----- > > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On > > Behalf Of Nathan Burgerhout > > Sent: Friday, September 05, 2014 2:08 PM > > To: Bob B; rancid-discuss at shrubbery.net > > Subject: Re: [rancid] Two Cisco device's on one WAN IP > > > > Thank you Bob. > > > > > > I tried to do this, but it didn't work. It just stops at the point where > > it types the seconds SSH. The problem could be that my Cisco's > > authenticate through a Tacacs+ server. I'm going to try some more. At > > least I'm going in the right direction. > > > > > > --- > > Nathan > > > > > > 2014-09-05 19:27 GMT+02:00 Bob B : > > > > > > Nathan, > > > > If it's any help, this is how we do it. We have many devices > fitting > > this exact scenario and it seems to work reasonably well. > > > > The configuration is a bit more involved in the .cloginrc file, but > > not overly complicated. > > > > Bob. > > > > > > > > > > > -----Original Message----- > > > From: Rancid-discuss [mailto: > rancid-discuss-bounces at shrubbery.net] > > On > > > Behalf Of Nathan Burgerhout > > > Sent: Friday, September 05, 2014 8:40 AM > > > To: rancid-discuss at shrubbery.net > > > Subject: [rancid] Two Cisco device's on one WAN IP > > > > > > Hello everyone, > > > > > > > > > I hope that I'm in the right place to ask this. > > > > > > Recently I installed Rancid so that I can backup the Cisco > devices > > from my > > > customers. I have it working for one device. The second device > can > > only be > > > accessed by using SSH from the first Cisco to the second Cisco. > > > > > > > > > Rancid Server at work --> Internet --> Cisco A --> Cisco B > > > > > > > > > Is this possible to do? The example in the link below is for a > > network > > > where the Rancid server is local which isn't the case for me, but > > it looks > > > like I could use the usercmd method. > > > > > > http://www.shrubbery.net/pipermail/rancid-discuss/2008- > > > September/003274.html > > > > > > > > > Regards, > > > > > > Nathan > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From waynejagr at yahoo.com Wed Sep 10 13:52:34 2014 From: waynejagr at yahoo.com (Ben Sanders) Date: Wed, 10 Sep 2014 06:52:34 -0700 Subject: [rancid] Ignoring certain output in diffs Message-ID: <1410357154.24182.YahooMailNeo@web141604.mail.bf1.yahoo.com> Good Day, I am struggling trying to create a way to ignore lines in diff. I have Patton devices which I am using the Cisco module for as it seems to grab the configuration. Problem is every time you "show run" it generates a timestamp: example: #----------------------------------------------------------------# # # # SN4980/1E24V # # R6.6 2014-07-11 H323 RBS SIP # # 2014-09-10T09:50:34 # # SN/xxxxxxxxxx # # Generated configuration file # # # #----------------------------------------------------------------# Could someone lend a hand in ignoring the timestamp line?? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Douglas.Hughes at DEShawResearch.com Wed Sep 10 14:26:07 2014 From: Douglas.Hughes at DEShawResearch.com (Hughes, Doug) Date: Wed, 10 Sep 2014 14:26:07 +0000 Subject: [rancid] Ignoring certain output in diffs In-Reply-To: <1410357154.24182.YahooMailNeo@web141604.mail.bf1.yahoo.com> References: <1410357154.24182.YahooMailNeo@web141604.mail.bf1.yahoo.com> Message-ID: It's a bit of an FAQ.. Find the command callback in the crancid file for the command you are looking for.. (e.g. sub ShowVersion) Scroll down to the main while loop therein. Find a 'next if' line Add your own 'next if' line above or below that that will skip the thing you don't want. e.g. next if (/^# 20[0-9][0-9]-[01][0-9]-[0-2][0-9]T/); that'll match the thing you posted below and skip that date matching the regular expression. From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Ben Sanders Sent: Wednesday, September 10, 2014 9:53 AM To: rancid-discuss at shrubbery.net Subject: [rancid] Ignoring certain output in diffs Good Day, I am struggling trying to create a way to ignore lines in diff. I have Patton devices which I am using the Cisco module for as it seems to grab the configuration. Problem is every time you "show run" it generates a timestamp: example: #----------------------------------------------------------------# # # # SN4980/1E24V # # R6.6 2014-07-11 H323 RBS SIP # # 2014-09-10T09:50:34 # # SN/xxxxxxxxxx # # Generated configuration file # # # #----------------------------------------------------------------# Could someone lend a hand in ignoring the timestamp line?? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Thu Sep 11 22:27:47 2014 From: heas at shrubbery.net (heasley) Date: Thu, 11 Sep 2014 22:27:47 +0000 Subject: [rancid] HP Procurve - no config changes yet Rancid thinks there is In-Reply-To: References: Message-ID: <20140911222747.GK5154@shrubbery.net> Mon, Sep 08, 2014 at 11:47:32AM +0100, Neil Arnold: > Hi, > > I've got Rancid running for a lot of HP switches without issue. The only > one I do have an issue with is my core switch. It's a HP Procurve 5412ZL. > Rancid is set to run every hour and throughout the day. During the day it's > quiet and not alerting me to anything (which is good as nothing in the > config changes). However, during the night, it fires off email alerts > telling me the config has changed. Looking at the email shows things like > the following: > > aaa port-access authenticator D11 auth-vid 1 aaa > port-access authenticato > > It almost looks like the switch can't output the config quick enough for > Rancid and Rancid only gets half the config. It then thinks it's changed, > logs it as a diff and fires off an email. I've spent weeks playing with the > set up to try and fix this all to no avail. > > If anyone has any suggestions, I'd be happy to take them. is there any reason those lines would change, like folks unplugging their laptops? does it send logs to the vtys? From Wayne.Eisenberg at CarolinasIT.com Fri Sep 12 09:11:21 2014 From: Wayne.Eisenberg at CarolinasIT.com (Wayne Eisenberg) Date: Fri, 12 Sep 2014 09:11:21 +0000 Subject: [rancid] timeout problems with cisco switch/ap Message-ID: Hi, I'm using rancid 2.3.8 to monitor some devices and everything works well except at this one location behind a firewall. Rancid runs great against the firewall itself, and I have no problem reaching the switches and APs behind the firewall. I can login to the switches fine (either directly with ssh on the rancid box or with clogin), but any command I try to issue never seems to execute on the switch when using clogin. (I have no problems if I login with ssh from the rancid box. Response to issued commands is as quick as expected.) Example: ~~~~~~~~~~~~~~~~~~~~~~~~~ [rancid at xxxxxx rancid]$ bin/clogin switch1 spawn ssh -c 3des -x -l administrator -p 10001 switch1 ************************ Warning! Warning! Warning! ************************ This system is restricted to authorized users. Unauthorized ************************ Warning! Warning! Warning! ************************ Password: Switch1#sh ver Error: TIMEOUT reached [rancid at xxxxxx rancid]$ sh ver sh: ver: No such file or directory [rancid at xxxxxx rancid]$ ~~~~~~~~~~~~~~~~~~~~~~~~~ Changing the timeout in clogin to 90 seconds doesn't help. Any ideas? Thanks, Wayne ________________________________ The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Wayne.Eisenberg at CarolinasIT.com Fri Sep 12 10:41:00 2014 From: Wayne.Eisenberg at CarolinasIT.com (Wayne Eisenberg) Date: Fri, 12 Sep 2014 10:41:00 +0000 Subject: [rancid] timeout problems with cisco switch/ap In-Reply-To: References: Message-ID: I just love it when I solve my problem shortly after I ask for help. After using clogin -d, I saw it was expecting (no pun intended) that I was not in enabled mode when I was. Set autoenable to 1 in .clogin and life is good for the switches. Thanks for listening anyway. :) From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Wayne Eisenberg Sent: Friday, September 12, 2014 5:11 AM To: rancid-discuss at shrubbery.net Subject: [rancid] timeout problems with cisco switch/ap Hi, I'm using rancid 2.3.8 to monitor some devices and everything works well except at this one location behind a firewall. Rancid runs great against the firewall itself, and I have no problem reaching the switches and APs behind the firewall. I can login to the switches fine (either directly with ssh on the rancid box or with clogin), but any command I try to issue never seems to execute on the switch when using clogin. (I have no problems if I login with ssh from the rancid box. Response to issued commands is as quick as expected.) Example: ~~~~~~~~~~~~~~~~~~~~~~~~~ [rancid at xxxxxx rancid]$ bin/clogin switch1 spawn ssh -c 3des -x -l administrator -p 10001 switch1 ************************ Warning! Warning! Warning! ************************ This system is restricted to authorized users. Unauthorized ************************ Warning! Warning! Warning! ************************ Password: Switch1#sh ver Error: TIMEOUT reached [rancid at xxxxxx rancid]$ sh ver sh: ver: No such file or directory [rancid at xxxxxx rancid]$ ~~~~~~~~~~~~~~~~~~~~~~~~~ Changing the timeout in clogin to 90 seconds doesn't help. Any ideas? Thanks, Wayne ________________________________ The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.arnold at gmail.com Fri Sep 12 11:14:46 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Fri, 12 Sep 2014 12:14:46 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure Message-ID: Hi, I've got an issue with 3 HP Procurve switches. All are running a recent firmware version. The problem is that no config is being pulled from 3 HP switches. in my network, the others give up their config just fine. I've discovered the reason but I'm unsure of how to fix it. The issue is caused because rancid is issuing the following command to the switch after it logs on: ^[[46;148R I can see this by running /bin/clogin 10.100.20.149 and seeing that I get dropped to the following: HP_SWITCH_1# ^[[46;148R HP_SWITCH_1# So Rancid is issuing the manager username and password and then issuing ^[[46;148R which the switch doesn't understand, Rancid, having not received the config, disconnects and moves on. I can Telnet into these switches from Rancid just fine using the manager logon so I know it's not an issue there. I just can't understand why Rancid seems to be issuing this random string of characters after it logs onto these particular switches. Anyone have any ideas? Many thanks for any pointers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jethro.binks at strath.ac.uk Fri Sep 12 11:47:30 2014 From: jethro.binks at strath.ac.uk (Jethro R Binks) Date: Fri, 12 Sep 2014 12:47:30 +0100 (BST) Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: Try hlogin instead? Are they declared as type "hp" in your router.db? On Fri, 12 Sep 2014, Neil Arnold wrote: > Hi, > > I've got an issue with 3 HP Procurve switches. All are running a recent > firmware version. The problem is that no config is being pulled from 3 HP > switches. in my network, the others give up their config just fine. I've > discovered the reason but I'm unsure of how to fix it. > The issue is caused because rancid is issuing the following command to the > switch after it logs on: ^[[46;148R > > I can see this by running /bin/clogin 10.100.20.149 and seeing that I get > dropped to the following: > > HP_SWITCH_1# ^[[46;148R > HP_SWITCH_1# > > So Rancid is issuing the manager username and password and then issuing > ^[[46;148R which the switch doesn't understand, Rancid, having not received > the config, disconnects and moves on. I can Telnet into these switches from > Rancid just fine using the manager logon so I know it's not an issue there. > I just can't understand why Rancid seems to be issuing this random string > of characters after it logs onto these particular switches. > > Anyone have any ideas? > > Many thanks for any pointers. > . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. From jlewis at lewis.org Fri Sep 12 12:03:23 2014 From: jlewis at lewis.org (Jon Lewis) Date: Fri, 12 Sep 2014 08:03:23 -0400 (EDT) Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: On Fri, 12 Sep 2014, Neil Arnold wrote: > Hi, > > I've got an issue with 3 HP Procurve switches. All are running a recent > firmware version. The problem is that no config is being pulled from 3 HP > switches. in my network, the others give up their config just fine. I've > discovered the reason but I'm unsure of how to fix it. > The issue is caused because rancid is issuing the following command to the > switch after it logs on: ^[[46;148R > > I can see this by running /bin/clogin 10.100.20.149 and seeing that I get > dropped to the following: > > HP_SWITCH_1# ^[[46;148R > HP_SWITCH_1# > > So Rancid is issuing the manager username and password and then issuing > ^[[46;148R which the switch doesn't understand, Rancid, having not received I have similar problems with clogin and arista gear. In this case, it's solved by clearing the TERM environment variable before running clogin. ---------------------------------------------------------------------- Jon Lewis, MCP :) | I route | therefore you are _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ From n.arnold at gmail.com Fri Sep 12 13:36:33 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Fri, 12 Sep 2014 14:36:33 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: Hi Jethro, I've tried the hlogon too. No luck I'm afraid. John, this sounds like it could be the solution as the characters do look like terminal output. Can you explain how I would go about clearing the TERM environment and if this works, I'm assuming I would have to make a seperate cron job running clogin with these new parameters just for these problem switches? Thanks again for you help with this. On 12 September 2014 13:03, Jon Lewis wrote: > On Fri, 12 Sep 2014, Neil Arnold wrote: > > Hi, >> >> I've got an issue with 3 HP Procurve switches. All are running a recent >> firmware version. The problem is that no config is being pulled from 3 HP >> switches. in my network, the others give up their config just fine. I've >> discovered the reason but I'm unsure of how to fix it. >> The issue is caused because rancid is issuing the following command to the >> switch after it logs on: ^[[46;148R >> >> I can see this by running /bin/clogin 10.100.20.149 and seeing that I get >> dropped to the following: >> >> HP_SWITCH_1# ^[[46;148R >> HP_SWITCH_1# >> >> So Rancid is issuing the manager username and password and then issuing >> ^[[46;148R which the switch doesn't understand, Rancid, having not >> received >> > > I have similar problems with clogin and arista gear. In this case, it's > solved by clearing the TERM environment variable before running clogin. > > ---------------------------------------------------------------------- > Jon Lewis, MCP :) | I route > | therefore you are > _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Fri Sep 12 13:41:40 2014 From: heas at shrubbery.net (heasley) Date: Fri, 12 Sep 2014 13:41:40 +0000 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <20140912132610.1D6CD4B84@sea.shrubbery.net> Message-ID: <20140912134140.GA27668@shrubbery.net> Fri, Sep 12, 2014 at 08:03:23AM -0400, Jon Lewis: > On Fri, 12 Sep 2014, Neil Arnold wrote: > > I've got an issue with 3 HP Procurve switches. All are running a recent > > firmware version. The problem is that no config is being pulled from 3 HP > > switches. in my network, the others give up their config just fine. I've > > discovered the reason but I'm unsure of how to fix it. > > The issue is caused because rancid is issuing the following command to the > > switch after it logs on: ^[[46;148R > > > > I can see this by running /bin/clogin 10.100.20.149 and seeing that I get > > dropped to the following: > > > > HP_SWITCH_1# ^[[46;148R > > HP_SWITCH_1# > > > > So Rancid is issuing the manager username and password and then issuing > > ^[[46;148R which the switch doesn't understand, Rancid, having not received > > I have similar problems with clogin and arista gear. In this case, it's > solved by clearing the TERM environment variable before running clogin. the garbage text is from the switch, screen manipulation codes. certainly try hlogin first, but you can also try this patch. without one of these to poke, it is hard to figure out the fix. Index: bin/hrancid.in =================================================================== --- bin/hrancid.in (revision 2859) +++ bin/hrancid.in (working copy) @@ -61,6 +61,9 @@ $found_end = 0; # unused - hp lacks an end-of-config tag $timeo = 90; # hlogin timeout in seconds +# force a terminal type to work-around a problem seen with HP2910/J9145A +$ENV{'TERM'} = "vt100"; + my(@commandtable, %commands, @commands);# command lists my($aclsort) = ("ipsort"); # ACL sorting mode my($filter_commstr); # SNMP community string filtering From jlewis at lewis.org Fri Sep 12 14:50:34 2014 From: jlewis at lewis.org (Jon Lewis) Date: Fri, 12 Sep 2014 10:50:34 -0400 (EDT) Subject: [rancid] interactive after -x Message-ID: I recently had a desire to be able to use the rancid login scripts to run a series of commands on a large number of devices (altering their configs), and when finished with the -x command file, rather than exit, go interactive so that I could do some testing/verification before disconnecting. I didn't see that this functionality was offered in the versions we have installed, so I patched it into flogin and clogin. Assuming I didn't overlook this functionality already being present, I wonder if the patches might make it into a future version? My expect is pretty rusty, but it didn't take much to add a command line switch telling [fc]login to go interactive after running the -x commands file. ---------------------------------------------------------------------- Jon Lewis, MCP :) | I route | therefore you are _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ From jlewis at lewis.org Fri Sep 12 14:56:23 2014 From: jlewis at lewis.org (Jon Lewis) Date: Fri, 12 Sep 2014 10:56:23 -0400 (EDT) Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: With bash being my shell, I've just been doing TERM="" before using clogin on aristas. After seeing heasley's response, I did a little testing, and vt100 seems to work as well. My native TERM was "screen" since I like to use screen, it results in display similar to what you posted and an "n" spit out as if typed. On Fri, 12 Sep 2014, Neil Arnold wrote: > Hi Jethro, I've tried the hlogon too. No luck I'm afraid. > > John, this sounds like it could be the solution as the characters do look > like terminal output. Can you explain how I would go about clearing the > TERM environment and if this works, I'm assuming I would have to make a > seperate cron job running clogin with these new parameters just for these > problem switches? > > Thanks again for you help with this. > > > On 12 September 2014 13:03, Jon Lewis wrote: > >> On Fri, 12 Sep 2014, Neil Arnold wrote: >> >> Hi, >>> >>> I've got an issue with 3 HP Procurve switches. All are running a recent >>> firmware version. The problem is that no config is being pulled from 3 HP >>> switches. in my network, the others give up their config just fine. I've >>> discovered the reason but I'm unsure of how to fix it. >>> The issue is caused because rancid is issuing the following command to the >>> switch after it logs on: ^[[46;148R >>> >>> I can see this by running /bin/clogin 10.100.20.149 and seeing that I get >>> dropped to the following: >>> >>> HP_SWITCH_1# ^[[46;148R >>> HP_SWITCH_1# >>> >>> So Rancid is issuing the manager username and password and then issuing >>> ^[[46;148R which the switch doesn't understand, Rancid, having not >>> received >>> >> >> I have similar problems with clogin and arista gear. In this case, it's >> solved by clearing the TERM environment variable before running clogin. >> >> ---------------------------------------------------------------------- >> Jon Lewis, MCP :) | I route >> | therefore you are >> _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ >> > ---------------------------------------------------------------------- Jon Lewis, MCP :) | I route | therefore you are _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ From n.arnold at gmail.com Fri Sep 12 15:03:32 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Fri, 12 Sep 2014 16:03:32 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: Hi Jon, Ok, that makes sense. I've tried the following: TERM="" hlogin 10.100.20.149 Result: Logged in but can't issue any command and the following displayed in the console: ^[[36;116R TERM="" clogin 10.100.20.149 Result: Log in successful but ^[[36;116R is automatically issued to the switch (different to the original string but still stalls the config grab) On 12 September 2014 15:56, Jon Lewis wrote: > With bash being my shell, I've just been doing TERM="" before using clogin > on aristas. After seeing heasley's response, I did a little testing, and > vt100 seems to work as well. My native TERM was "screen" since I like to > use screen, it results in display similar to what you posted and an "n" > spit out as if typed. > > > On Fri, 12 Sep 2014, Neil Arnold wrote: > > Hi Jethro, I've tried the hlogon too. No luck I'm afraid. >> >> John, this sounds like it could be the solution as the characters do look >> like terminal output. Can you explain how I would go about clearing the >> TERM environment and if this works, I'm assuming I would have to make a >> seperate cron job running clogin with these new parameters just for these >> problem switches? >> >> Thanks again for you help with this. >> >> >> On 12 September 2014 13:03, Jon Lewis wrote: >> >> On Fri, 12 Sep 2014, Neil Arnold wrote: >>> >>> Hi, >>> >>>> >>>> I've got an issue with 3 HP Procurve switches. All are running a recent >>>> firmware version. The problem is that no config is being pulled from 3 >>>> HP >>>> switches. in my network, the others give up their config just fine. I've >>>> discovered the reason but I'm unsure of how to fix it. >>>> The issue is caused because rancid is issuing the following command to >>>> the >>>> switch after it logs on: ^[[46;148R >>>> >>>> I can see this by running /bin/clogin 10.100.20.149 and seeing that I >>>> get >>>> dropped to the following: >>>> >>>> HP_SWITCH_1# ^[[46;148R >>>> HP_SWITCH_1# >>>> >>>> So Rancid is issuing the manager username and password and then issuing >>>> ^[[46;148R which the switch doesn't understand, Rancid, having not >>>> received >>>> >>>> >>> I have similar problems with clogin and arista gear. In this case, it's >>> solved by clearing the TERM environment variable before running clogin. >>> >>> ---------------------------------------------------------------------- >>> Jon Lewis, MCP :) | I route >>> | therefore you are >>> _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ >>> >>> >> > ---------------------------------------------------------------------- > Jon Lewis, MCP :) | I route > | therefore you are > _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.arnold at gmail.com Fri Sep 12 14:41:28 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Fri, 12 Sep 2014 15:41:28 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <20140912134140.GA27668@shrubbery.net> References: <20140912132610.1D6CD4B84@sea.shrubbery.net> <20140912134140.GA27668@shrubbery.net> Message-ID: That didn't work I'm afraid. I appreciate that it's not a simple fix when, as you say, there isn't one you can test this on so appreciate your effort. Running hlogin now results in this: MPG_5406_G/F# ^[[42;118R The console is essentially now dead. I can issue commands such as deleting ^[[42;118R and entering show config and it does nothing. I'm tempted to just ignore these and go on without them but I know it's always going to be a nagging annoyance that I'll want to fix. Thanks, Neil. On 12 September 2014 14:41, heasley wrote: > Fri, Sep 12, 2014 at 08:03:23AM -0400, Jon Lewis: > > On Fri, 12 Sep 2014, Neil Arnold wrote: > > > I've got an issue with 3 HP Procurve switches. All are running a recent > > > firmware version. The problem is that no config is being pulled from 3 > HP > > > switches. in my network, the others give up their config just fine. > I've > > > discovered the reason but I'm unsure of how to fix it. > > > The issue is caused because rancid is issuing the following command to > the > > > switch after it logs on: ^[[46;148R > > > > > > I can see this by running /bin/clogin 10.100.20.149 and seeing that I > get > > > dropped to the following: > > > > > > HP_SWITCH_1# ^[[46;148R > > > HP_SWITCH_1# > > > > > > So Rancid is issuing the manager username and password and then issuing > > > ^[[46;148R which the switch doesn't understand, Rancid, having not > received > > > > I have similar problems with clogin and arista gear. In this case, it's > > solved by clearing the TERM environment variable before running clogin. > > the garbage text is from the switch, screen manipulation codes. certainly > try hlogin first, but you can also try this patch. without one of these > to poke, it is hard to figure out the fix. > > Index: bin/hrancid.in > =================================================================== > --- bin/hrancid.in (revision 2859) > +++ bin/hrancid.in (working copy) > @@ -61,6 +61,9 @@ > $found_end = 0; # unused - hp lacks an > end-of-config tag > $timeo = 90; # hlogin timeout in seconds > > +# force a terminal type to work-around a problem seen with HP2910/J9145A > +$ENV{'TERM'} = "vt100"; > + > my(@commandtable, %commands, @commands);# command lists > my($aclsort) = ("ipsort"); # ACL sorting mode > my($filter_commstr); # SNMP community string filtering > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From JHumes at acs.on.ca Fri Sep 12 19:06:12 2014 From: JHumes at acs.on.ca (Jason Humes) Date: Fri, 12 Sep 2014 19:06:12 +0000 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc Message-ID: Hi Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are coming up with new configs after every run due to rancid adding line breaks in some cases and in others it joins two lines of the config. Any thoughts on why this might be going on? I'm running Ubuntu 14.04. Thanks Jason From peo at chalmers.se Fri Sep 12 20:03:08 2014 From: peo at chalmers.se (Per-Olof Olsson) Date: Fri, 12 Sep 2014 22:03:08 +0200 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: <5413517C.60002@chalmers.se> Hello Have someone tested to extend the time, device and tty driver have to negotiate window size at login, before expect start to analyze text? Seems to work if I use "sleep 3" *** hlogin_ORG 2014-09-12 21:38:09.543395741 +0200 --- hlogin 2014-09-12 21:39:58.679120629 +0200 ... *************** *** 361,367 **** send_user "\nError: unknown connection method: $prog\n" return 1 } ! sleep 0.3 # This helps cleanup each expect clause. expect_after { --- 404,410 ---- send_user "\nError: unknown connection method: $prog\n" return 1 } ! sleep 3 # This helps cleanup each expect clause. expect_after { *************** ... clogin to HP-switches... Anyhow, tests using "sleep 3" seems to eliminate window size echo, even for clogin to HPs. /Peo Neil Arnold wrote 2014-09-12 17:03: > Hi Jon, > > Ok, that makes sense. I've tried the following: > > TERM="" hlogin 10.100.20.149 > Result: Logged in but can't issue any command and the following displayed in the console: ^[[36;116R > > TERM="" clogin 10.100.20.149 > Result: Log in successful but ^[[36;116R is automatically issued to the switch (different to the original string but still stalls > the config grab) > > > On 12 September 2014 15:56, Jon Lewis > wrote: > > With bash being my shell, I've just been doing TERM="" before using clogin on aristas. After seeing heasley's response, I did > a little testing, and vt100 seems to work as well. My native TERM was "screen" since I like to use screen, it results in > display similar to what you posted and an "n" spit out as if typed. > > > On Fri, 12 Sep 2014, Neil Arnold wrote: > > Hi Jethro, I've tried the hlogon too. No luck I'm afraid. > > John, this sounds like it could be the solution as the characters do look > like terminal output. Can you explain how I would go about clearing the > TERM environment and if this works, I'm assuming I would have to make a > seperate cron job running clogin with these new parameters just for these > problem switches? > > Thanks again for you help with this. > > > On 12 September 2014 13:03, Jon Lewis > wrote: > > On Fri, 12 Sep 2014, Neil Arnold wrote: > > Hi, > > > I've got an issue with 3 HP Procurve switches. All are running a recent > firmware version. The problem is that no config is being pulled from 3 HP > switches. in my network, the others give up their config just fine. I've > discovered the reason but I'm unsure of how to fix it. > The issue is caused because rancid is issuing the following command to the > switch after it logs on: ^[[46;148R > > I can see this by running /bin/clogin 10.100.20.149 and seeing that I get > dropped to the following: > > HP_SWITCH_1# ^[[46;148R > HP_SWITCH_1# > > So Rancid is issuing the manager username and password and then issuing > ^[[46;148R which the switch doesn't understand, Rancid, having not > received > > > I have similar problems with clogin and arista gear. In this case, it's > solved by clearing the TERM environment variable before running clogin. > > ------------------------------__------------------------------__---------- > Jon Lewis, MCP :) | I route > | therefore you are > _________ http://www.lewis.org/~jlewis/__pgp for PGP public key_________ > > > > ------------------------------__------------------------------__---------- > Jon Lewis, MCP :) | I route > | therefore you are > _________ http://www.lewis.org/~jlewis/__pgp for PGP public key_________ > > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From JHumes at acs.on.ca Fri Sep 12 20:10:32 2014 From: JHumes at acs.on.ca (Jason Humes) Date: Fri, 12 Sep 2014 20:10:32 +0000 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc Message-ID: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> Here is an example; Index: configs/ core4506 =================================================================== - -- configs/ core4506 (revision 198) @@ -446,9 +446,9 @@ !VLAN: Fa2/6, Fa2/7, Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 !VLAN: Fa2/20, Fa2/22, Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 !VLAN: Fa2/42, Fa2/43, Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 - !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 - !VLAN: Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 - !VLAN: Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 + !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 + !VLAN: Gi6/15, Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 + !VLAN: Gi6/36, Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 !VLAN: 2 Engineering active Fa1/29, Fa1/32, Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 !VLAN: Gi6/40 !VLAN: 3 EDM active Jason -----Original Message----- From: Jason Humes Sent: Friday, September 12, 2014 3:06 PM To: rancid-discuss at shrubbery.net Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc Hi Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are coming up with new configs after every run due to rancid adding line breaks in some cases and in others it joins two lines of the config. Any thoughts on why this might be going on? I'm running Ubuntu 14.04. Thanks Jason From alan.mckinnon at gmail.com Fri Sep 12 20:41:24 2014 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Fri, 12 Sep 2014 22:41:24 +0200 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> Message-ID: <54135A74.7080101@gmail.com> On 12/09/2014 22:10, Jason Humes wrote: > Here is an example; > > Index: configs/ core4506 > =================================================================== > - -- configs/ core4506 (revision 198) > @@ -446,9 +446,9 @@ > !VLAN: Fa2/6, Fa2/7, Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 > !VLAN: Fa2/20, Fa2/22, Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 > !VLAN: Fa2/42, Fa2/43, Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 > - !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 > - !VLAN: Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 > - !VLAN: Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > + !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 > + !VLAN: Gi6/15, Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 > + !VLAN: Gi6/36, Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > !VLAN: 2 Engineering active Fa1/29, Fa1/32, Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 > !VLAN: Gi6/40 > !VLAN: 3 EDM active > > > Jason > > -----Original Message----- > From: Jason Humes > Sent: Friday, September 12, 2014 3:06 PM > To: rancid-discuss at shrubbery.net > Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc > > Hi > Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are coming up with new configs after every run due to rancid adding line breaks in some cases and in others it joins two lines of the config. > > Any thoughts on why this might be going on? I'm running Ubuntu 14.04. > > Thanks Jason, That doesn't look like "adding linebreaks, joining lines" to me, it looks like the device is simply not sorting the list so the order ir seemingly random. Sort the list in the main processing loop before outputting it. The code for prefix lists has some clues of how to approach this (but the final implementation will be very different) -- Alan McKinnon alan.mckinnon at gmail.com From ler762 at gmail.com Sat Sep 13 17:07:11 2014 From: ler762 at gmail.com (Lee) Date: Sat, 13 Sep 2014 13:07:11 -0400 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> Message-ID: looks like there was a change - Gi5/14 was added to vlan 1 lee On 9/12/14, Jason Humes wrote: > Here is an example; > > Index: configs/ core4506 > =================================================================== > - -- configs/ core4506 (revision 198) > @@ -446,9 +446,9 @@ > !VLAN: Fa2/6, Fa2/7, > Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 > !VLAN: Fa2/20, Fa2/22, > Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 > !VLAN: Fa2/42, Fa2/43, > Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 > - !VLAN: Gi3/5, Gi3/6, > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 > - !VLAN: Gi6/18, Gi6/19, > Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 > - !VLAN: Gi6/37, Gi6/38, > Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > + !VLAN: Gi3/5, Gi3/6, > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 > + !VLAN: Gi6/15, Gi6/18, > Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 > + !VLAN: Gi6/36, Gi6/37, > Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > !VLAN: 2 Engineering active Fa1/29, Fa1/32, > Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 > !VLAN: Gi6/40 > !VLAN: 3 EDM active > > > Jason > > -----Original Message----- > From: Jason Humes > Sent: Friday, September 12, 2014 3:06 PM > To: rancid-discuss at shrubbery.net > Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding > linebreaks, joining lines, etc > > Hi > Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are > coming up with new configs after every run due to rancid adding line breaks > in some cases and in others it joins two lines of the config. > > Any thoughts on why this might be going on? I'm running Ubuntu 14.04. > > Thanks > > > Jason > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From heas at shrubbery.net Mon Sep 15 17:39:49 2014 From: heas at shrubbery.net (heasley) Date: Mon, 15 Sep 2014 17:39:49 +0000 Subject: [rancid] interactive after -x In-Reply-To: References: Message-ID: <20140915173949.GD11854@shrubbery.net> Fri, Sep 12, 2014 at 10:50:34AM -0400, Jon Lewis: > I recently had a desire to be able to use the rancid login scripts to run > a series of commands on a large number of devices (altering their > configs), and when finished with the -x command file, rather than exit, go > interactive so that I could do some testing/verification before > disconnecting. > > I didn't see that this functionality was offered in the versions we have > installed, so I patched it into flogin and clogin. Assuming I didn't > overlook this functionality already being present, I wonder if the patches > might make it into a future version? My expect is pretty rusty, but it > didn't take much to add a command line switch telling [fc]login to go > interactive after running the -x commands file. sure. brownie points if you update all the login scripts and the documentation. From heas at shrubbery.net Mon Sep 15 18:27:04 2014 From: heas at shrubbery.net (heasley) Date: Mon, 15 Sep 2014 18:27:04 +0000 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: Message-ID: <20140915182704.GN11854@shrubbery.net> Fri, Sep 12, 2014 at 10:56:23AM -0400, Jon Lewis: > With bash being my shell, I've just been doing TERM="" before using clogin > on aristas. After seeing heasley's response, I did a little testing, and > vt100 seems to work as well. My native TERM was "screen" since I like to > use screen, it results in display similar to what you posted and an "n" > spit out as if typed. OT, but is screen a terminal type? doesnt it just pass everything on to whatever the terminal happens to be? or emulate something well-known? From daniel.schmidt at wyo.gov Mon Sep 15 18:30:32 2014 From: daniel.schmidt at wyo.gov (Daniel Schmidt) Date: Mon, 15 Sep 2014 12:30:32 -0600 Subject: [rancid] HP Procurve - no config changes yet Rancid thinks there is In-Reply-To: <20140911222747.GK5154@shrubbery.net> References: <20140911222747.GK5154@shrubbery.net> Message-ID: Lower PAR_COUNT maybe On Thu, Sep 11, 2014 at 4:27 PM, heasley wrote: > Mon, Sep 08, 2014 at 11:47:32AM +0100, Neil Arnold: > > Hi, > > > > I've got Rancid running for a lot of HP switches without issue. The only > > one I do have an issue with is my core switch. It's a HP Procurve 5412ZL. > > Rancid is set to run every hour and throughout the day. During the day > it's > > quiet and not alerting me to anything (which is good as nothing in the > > config changes). However, during the night, it fires off email alerts > > telling me the config has changed. Looking at the email shows things like > > the following: > > > > aaa port-access authenticator D11 auth-vid 1 aaa > > port-access authenticato > > > > It almost looks like the switch can't output the config quick enough for > > Rancid and Rancid only gets half the config. It then thinks it's changed, > > logs it as a diff and fires off an email. I've spent weeks playing with > the > > set up to try and fix this all to no avail. > > > > If anyone has any suggestions, I'd be happy to take them. > > is there any reason those lines would change, like folks unplugging their > laptops? does it send logs to the vtys? > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Mon Sep 15 18:45:44 2014 From: heas at shrubbery.net (heasley) Date: Mon, 15 Sep 2014 18:45:44 +0000 Subject: [rancid] HP Procurve - no config changes yet Rancid thinks there is In-Reply-To: References: <20140911222747.GK5154@shrubbery.net> Message-ID: <20140915184544.GO11854@shrubbery.net> Mon, Sep 15, 2014 at 12:30:32PM -0600, Daniel Schmidt: > Lower PAR_COUNT maybe Neil responded privately saying that a switch o/s upgrade made the problem disappear. > On Thu, Sep 11, 2014 at 4:27 PM, heasley wrote: > > > Mon, Sep 08, 2014 at 11:47:32AM +0100, Neil Arnold: > > > Hi, > > > > > > I've got Rancid running for a lot of HP switches without issue. The only > > > one I do have an issue with is my core switch. It's a HP Procurve 5412ZL. > > > Rancid is set to run every hour and throughout the day. During the day > > it's > > > quiet and not alerting me to anything (which is good as nothing in the > > > config changes). However, during the night, it fires off email alerts > > > telling me the config has changed. Looking at the email shows things like > > > the following: > > > > > > aaa port-access authenticator D11 auth-vid 1 aaa > > > port-access authenticato > > > > > > It almost looks like the switch can't output the config quick enough for > > > Rancid and Rancid only gets half the config. It then thinks it's changed, > > > logs it as a diff and fires off an email. I've spent weeks playing with > > the > > > set up to try and fix this all to no avail. > > > > > > If anyone has any suggestions, I'd be happy to take them. > > > > is there any reason those lines would change, like folks unplugging their > > laptops? does it send logs to the vtys? From heas at shrubbery.net Mon Sep 15 19:18:59 2014 From: heas at shrubbery.net (heasley) Date: Mon, 15 Sep 2014 19:18:59 +0000 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <20140915191822.C8F245033@sea.shrubbery.net> <5413517C.60002@chalmers.se> Message-ID: <20140915191859.GQ11854@shrubbery.net> Fri, Sep 12, 2014 at 10:03:08PM +0200, Per-Olof Olsson: > Hello > > Have someone tested to extend the time, device and tty driver have to negotiate > window size at login, before expect start to analyze text? > > Seems to work if I use "sleep 3" ESC[row,colR appears to be the response to Esc[6n. So, does this fix it? Index: bin/hpuifilter.c =================================================================== --- bin/hpuifilter.c (revision 2859) +++ bin/hpuifilter.c (working copy) @@ -537,7 +537,7 @@ filter(char *buf, int len) { static regmatch_t pmatch[1]; -#define N_REG 16 /* number of regexes in reg[][] */ +#define N_REG 17 /* number of regexes in reg[][] */ #define N_CRs 2 /* number of CR replacements */ static regex_t preg[N_REG]; static char reg[N_REG][50] = { /* vt100/220 escape codes */ @@ -556,7 +556,10 @@ "\x1B\\[\\?25l", /* vi */ "\x1B\\[K", /* ce */ "\x1B\\[7m", /* mr - ansi */ + "\x1B\\[6n", /* u7 - ansi */ + "\x1B\\[[0-9]+;[0-9]+R", /* E[6n reply */ + "\x07", /* bell */ /* replace these with CR */ From peterjackson1610 at gmail.com Mon Sep 15 18:30:05 2014 From: peterjackson1610 at gmail.com (Peter Jackson) Date: Mon, 15 Sep 2014 14:30:05 -0400 Subject: [rancid] Panrancid with PAN 6.0 In-Reply-To: References: Message-ID: Chip, did you get RANCID working with PAN 6? I had the same or similar issue as you and we are running HA. I had updated to Doug's latest version of panrancid but was on an old version of panlogin (that set 'pager off'). After I updated panlogin RANCID works as expected. On Wed, Jun 18, 2014 at 1:27 PM, Chip Pleasants wrote: > I can open a ticket, but I'm concerned that I can not show them an example > of it broke besides the script. They may work with me if can't show its > broke manually. Thanks again Doug for assistance. > > -Chip > On Jun 18, 2014 1:14 PM, "Hughes, Doug" > wrote: > >> EatCommand just takes care of registering and aligning for the next >> command since that command doesn?t produce any ouput, but you still need to >> do something with what echoes back to expect. >> >> >> >> Your below panlogin to firewallv5 worked perfectly. >> >> You can see it repeating each word and building until cli scripting-mode >> is on, and then everything after that works ok. >> >> >> >> Yet it didn?t work for firewallv6. This seems like a bug. I?d open a case >> with support.paloaltonetworks.com to see what?s going on. Something >> weird is causing the cli scripting-mode on to fail. >> >> >> >> >> >> *From:* Chip Pleasants [mailto:wpleasants at gmail.com] >> *Sent:* Wednesday, June 18, 2014 12:12 PM >> *To:* Hughes, Doug >> *Cc:* rancid-discuss at shrubbery.net >> *Subject:* Re: [rancid] Panrancid with PAN 6.0 >> >> >> >> I think I see what you are talking about now. Here are the two examples. >> One from a version 6 and one from a version 5. Now the odd part is when >> I perform this test manually turning on 'set cli scripting-mode on' it >> doesn't auto-complete on versions 6.0.2 or 5.0.11. Would there be >> a difference with the EatCommand portion of the script? Thanks for taking >> the time to work with me Doug. >> >> >> >> >> >> [rancid at cmh1vlobs01 rancid]$ /usr/libexec/rancid/panrancid -d >> FIREWALLV5.domain.com >> >> executing panlogin -t 90 -c"set cli scripting-mode on;set cli pager >> off;show system info;show config running" FIREWALLV5.domain.com >> >> line: FIREWALLV5.domain.com >> >> line: rancid at FIREWALLV5(active)> >> >> line: rancid at FIREWALLV5(active)> set rancid at FIREWALLV5(active)> set cli >> rancid at FIREWALLV5(active)> set cli scripting-mode rancid at FIREWALLV5(active)> >> set cli scripting-mode on >> >> PROMPT MATCH: rancid at FIREWALLV5\(active\)[#>] >> >> HIT COMMAND:rancid at FIREWALLV5(active)> set rancid at FIREWALLV5(active)> >> set cli rancid at FIREWALLV5(active)> set cli scripting-mode >> rancid at FIREWALLV5(active)> set cli scripting-mode on >> >> >> >> COMMAND is: set cli scripting-mode on|EatCommand >> >> HIT COMMAND:rancid at FIREWALLV5(active)> set cli pager off >> >> >> >> COMMAND is: set cli pager off|EatCommand >> >> HIT COMMAND:rancid at FIREWALLV5(active)> show system info >> >> >> >> COMMAND is: show system info|ShowInfo >> >> In ShowInfo:: rancid at FIREWALLV5(active)> show system info >> >> HIT COMMAND:rancid at FIREWALLV5(active)> show config running >> >> >> >> COMMAND is: show config running|ShowConfig >> >> In ShowConfig: rancid at FIREWALLV5(active)> show config running >> >> line: >> >> exiting >> >> [rancid at cmh1vlobs01 rancid]$ >> >> >> >> >> >> >> >> [rancid at cmh1vlobs01 rancid]$ /usr/libexec/rancid/panrancid -d >> FIREWALLV6.domain.com >> >> executing panlogin -t 90 -c"set cli scripting-mode on;set cli pager >> off;show system info;show config running" FIREWALLV6.domain.com >> >> line: FIREWALLV6.domain.com >> >> line: rancid at FIREWALLV6(active)> >> >> line: rancid at FIREWALLV6(active)> set rancid at FIREWALLV6(active)> set cli >> rancid at FIREWALLV6(active)> set cli scripting-mode rancid at FIREWALLV6(active)> >> set cli scripting-mode on >> >> PROMPT MATCH: rancid at FIREWALLV6\(active\)[#>] >> >> HIT COMMAND:rancid at FIREWALLV6(active)> set rancid at FIREWALLV6(active)> >> set cli rancid at FIREWALLV6(active)> set cli scripting-mode >> rancid at FIREWALLV6(active)> set cli scripting-mode on >> >> >> >> COMMAND is: set cli scripting-mode on|EatCommand >> >> HIT COMMAND:rancid at FIREWALLV6(active)> set rancid at FIREWALLV6(active)> >> set cli rancid at FIREWALLV6(active)> set cli pager rancid at FIREWALLV6(active)> >> set cli pager off >> >> >> >> COMMAND is: set cli pager off|EatCommand >> >> HIT COMMAND:rancid at FIREWALLV6(active)> show rancid at FIREWALLV6(active)> >> show system rancid at FIREWALLV6(active)> show system info >> >> >> >> COMMAND is: show system info|ShowInfo >> >> In ShowInfo:: rancid at FIREWALLV6(active)> show rancid at FIREWALLV6(active)> >> show system rancid at FIREWALLV6(active)> show system info >> >> FIREWALLV6.domain.com: missed cmd(s): show config running >> >> FIREWALLV6.domain.com: missed cmd(s): show config running >> >> FIREWALLV6.domain.com: End of run not found >> >> FIREWALLV6.domain.com: End of run not found >> >> # >> >> [rancid at cmh1vlobs01 rancid]$ ! >> >> >> >> >> >> >> >> -Chip >> >> >> >> >> >> On Wed, Jun 18, 2014 at 11:35 AM, Hughes, Doug < >> Douglas.Hughes at deshawresearch.com> wrote: >> >> It doesn?t look like it is from your very first debugging output: >> >> COMMAND is: show system info|ShowInfo >> In ShowInfo:: rancid at FIREWALL(active)> show rancid at FIREWALL(active)> >> show system rancid at FIREWALL(active)> show system info >> >> >> if scripting-mode was on, we wouldn?t see the stuff in red. (html mode on >> to read). The fact that the extra prompts show up indicates that it is >> intercepting the spaces and attempting to do ?helpful command completion?. >> >> >> >> >> >> >> >> *From:* Chip Pleasants [mailto:wpleasants at gmail.com] >> *Sent:* Wednesday, June 18, 2014 8:52 AM >> >> >> *To:* Hughes, Doug >> *Cc:* rancid-discuss at shrubbery.net >> *Subject:* Re: [rancid] Panrancid with PAN 6.0 >> >> >> >> It doesn't appear to be a bug, because I think its operating as you >> describe. When I turn on 'set cli scripting-mode on' it doesn't >> autocomplete on versions 6.0.2 or 5.0.11. Any other thoughts what could be >> going on? >> >> >> >> Thanks, >> >> Chip >> >> >> >> >> >> >> >> >> >> On Tue, Jun 17, 2014 at 3:34 PM, Hughes, Doug < >> Douglas.Hughes at deshawresearch.com> wrote: >> >> Hrm. Yes, I had it correct the first time. (oof, busy day) >> >> ?on? is needed to prevent this ?feature?: >> >> line: rancid at FIREWALL(active)> set rancid at FIREWALL(active)> set cli >> rancid at FIREWALL(active)> set cli pager rancid at FIREWALL(active)> set cli >> pager off >> >> After each space, it does essentially a rewrite of the line as it tried >> to ?auto-correct? you from typing the wrong thing. This gets in the way of >> parsing with expect quite heavily, so I attempt to disable it as soon as >> possible. If set cli scripting-mode on does not cause this to stop (and it >> looks like it doesn?t), then that appears to be a bug. You can also see >> this by using type script: >> >> Here?s how it looks at the command line: >> Drdgpfs0002:/tmp$ script >> drdgpfs0002:/tmp$ ssh -l admin paloalto.en >> admin at paloalto.en's password: >> Last login: Tue Jun 17 15:05:06 2014 from drdbcntl.en.desres.deshaw.com >> Welcome admin. >> admin at paloalto.en> set cli scripting-mode on >> admin at paloalto.en> set cli ? >> >> Invalid syntax. >> admin at paloalto.en> exit >> >> >> Here's how it looks in the corresponding typescript file: >> i Script started on Tue 17 Jun 2014 03:25:13 PM EDT >> drdgpfs0002:/tmp$ ssh -l admin paloalto >> admin at paloalto.en's password: ^M >> Last login: Tue Jun 17 15:05:06 2014 from drdbcntl.en.desres.deshaw.com >> ^M^M >> Welcome admin.^M >> admin at paloalto.en> set ^M^[[Kadmin at paloalto.en> set cli >> ^M^[[Kadmin at paloalto.en> >> set cli scripting-mode ^M^[[Kadmin at paloalto.en> set cli scripting-mode >> on^M >> admin at paloalto.en> set cli ?^M >> ^M >> Invalid syntax.^M >> admin at paloalto.en> exit^M >> Connection to paloalto.en closed.^M^M >> drdgpfs0002:/tmp$ exit^M^M >> exit^M >> >> Script done on Tue 17 Jun 2014 03:25:34 PM EDT >> >> If 'set cli scripting-mode on' doesn't disable the 'space' feature, then >> the rest of the expect is very iffy at best and difficult to manage >> >> Here's another way to confirm the behavior >> >> Type config >> >> If it autocompletes to 'configure', then cli scripting-mode is not on and >> results *will* vary. >> Disabling the pager is also important since it disables the --more-- when >> show config is running. >> >> I am running 6.0.2 but no HA on PA-3020 and PA-2050 >> >> >> >> >> From: Chip Pleasants [mailto:wpleasants at gmail.com] >> >> Sent: Tuesday, June 17, 2014 3:21 PM >> >> To: Hughes, Doug >> Cc: rancid-discuss at shrubbery.net >> Subject: Re: [rancid] Panrancid with PAN 6.0 >> >> Tried it on both versions. Seems like they both yield the same result. >> Doesn't the script turn cli scripting-mode on? Or do we don't really care >> that's its on or off? >> >> >> >> >> user at FIREWALLV6(active)> set cli scripting-mode off >> user at FIREWALLV6(active)> set cli scripting-mode >> off off >> on on >> >> user at FIREWALLV6(active)> set cli scripting-mode >> >> >> >> >> >> >> user at FIREWALLV5(active)> set cli scripting-mode off >> user at FIREWALLV5(active)> set cli scripting-mode >> off off >> on on >> >> user at FIREWALLV5(active)> set cli scripting-mode >> >> >> >> -Chip >> >> >> On Tue, Jun 17, 2014 at 3:10 PM, Hughes, Doug < >> Douglas.Hughes at deshawresearch.com> wrote: >> Sorry, I meant ?off?, you need to set it to off and then try the ? test. >> >> From: Chip Pleasants [mailto:wpleasants at gmail.com] >> Sent: Tuesday, June 17, 2014 2:48 PM >> >> To: Hughes, Doug >> Cc: rancid-discuss at shrubbery.net >> Subject: Re: [rancid] Panrancid with PAN 6.0 >> >> Here's what I get. I get the same result from a version 5.x PA. I removed >> the "set cli scripting-mode on" from the script to test. Version 5.x PA >> works and version 6.x PA end up with the same result. >> >> >> user at FIREWALL(active)> set cli scripting-mode on >> user at FIREWALL(active)> set cli scripting-mode ? >> ? is not one of >> >> Invalid syntax. >> user at FIREWALL(active)> >> >> >> >> line: rancid at FIREWALL(active)> set rancid at FIREWALL(active)> set cli >> rancid at FIREWALL(active)> set cli pager rancid at FIREWALL(active)> set cli >> pager off >> PROMPT MATCH: rancid at FIREWALL\(active\)[#>] >> HIT COMMAND:rancid at FIREWALL(active)> set rancid at FIREWALL(active)> set >> cli rancid at FIREWALL(active)> set cli pager rancid at FIREWALL(active)> set >> cli pager off >> >> COMMAND is: set cli pager off|EatCommand >> HIT COMMAND:rancid at FIREWALL(active)> show rancid at FIREWALL(active)> show >> system rancid at FIREWALL(active)> show system info >> >> COMMAND is: show system info|ShowInfo >> In ShowInfo:: rancid at FIREWALL(active)> show rancid at FIREWALL(active)> >> show system rancid at FIREWALL(active)> show system info >> FIREWALL.dswinc.net: missed cmd(s): show config running >> FIREWALL.dswinc.net: missed cmd(s): show config running >> FIREWALL.dswinc.net: End of run not found >> FIREWALL.dswinc.net: End of run not found >> # >> [rancid at server rancid]$ >> >> >> >> >> On Tue, Jun 17, 2014 at 2:28 PM, Hughes, Doug < >> Douglas.Hughes at deshawresearch.com> wrote: >> Ah, you are running in HA mode I see. That could be throwing things off, >> but I think I fixed that in 2013 sometime. >> (I don?t run any in HA) >> >> It looks to me like ?set cli scripting-mode on? is failing >> >> To confirm this, login to the PA at command line, then type set cli >> scripting-mode on >> >> Now type ?set cli scripting-mode ?? >> >> If you get any sort of command completion, the cli scripting mode setting >> is not working and needs to be turned into a PA bug report. That is what it >> looks like it is happening by looking at the command staggering for >> subsequent lines. >> >> From: Chip Pleasants [mailto:wpleasants at gmail.com] >> Sent: Tuesday, June 17, 2014 1:39 PM >> To: Hughes, Doug >> Cc: rancid-discuss at shrubbery.net >> Subject: Re: [rancid] Panrancid with PAN 6.0 >> >> Thanks Doug. I am running the most recent version, but for grins I >> replaced them anyway. Still seeing the issue on two sets. The others seem >> to work fine. Anything I provide that help find the trouble? >> >> -Chip >> >> >> On Mon, Jun 16, 2014 at 4:37 PM, Hughes, Doug < >> Douglas.Hughes at deshawresearch.com> wrote: >> Yes, it?s working for me. Are you using the latest? (attached) >> >> >> From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On >> Behalf Of Chip Pleasants >> Sent: Monday, June 16, 2014 2:01 PM >> To: rancid-discuss at shrubbery.net >> Subject: [rancid] Panrancid with PAN 6.0 >> >> Does anyone have Panrancid working with PAN version 6.0.2? I have four >> sets running PAN version 5.0.11 without an issues. Once I upgraded one set >> the script times out. Below is a debug. Let me know if you have any >> questions. >> >> Cheers, >> >> Chip >> >> >> [rancid at cmh1vlobs01 rancid]$ /usr/libexec/rancid/panrancid -d >> cmh1-z4-f01.domain.com >> executing panlogin -t 90 -c"set cli scripting-mode on;set cli pager >> off;show system info;show config running" cmh1-z4-f01.domain.com >> line: cmh1-z4-f01.domain.com >> line: spawn ssh -c 3des -x -l rancid cmh1-z4-f01.domain.com >> line: NOTICE TO USERS >> line: This is an official computer system and is the property of POOP >> Incorporated. >> line: It is for authorized users only. Unauthorized users are >> prohibited. >> line: Users (authorized or unauthorized) have no explicit or implicit >> expectation of >> line: privacy. Any or all uses of this system may be subject to one or >> more of the >> line: following actions: interception, monitoring, recording, >> auditing, inspection and >> line: disclosing to security personnel and law enforcement personnel, >> as well as >> line: authorized officials of other agencies, both domestic and >> foreign. By using this >> line: system, the user consents to these actions. Unauthorized or >> improper use of >> line: this system may result in administrative disciplinary action and >> civil and criminal >> line: penalties. By accessing this system you indicate your awareness >> of and >> line: consent to these terms and conditions of use. Discontinue access >> immediately >> line: if you do not agree to the conditions stated in this notice. >> line: >> line: Password: >> line: Last login: Mon Jun 16 08:00:00 2014 from cmh1vlobs01.domain.com >> line: Welcome rancid. >> line: >> line: rancid at CMH1-Z4-F01(active)> >> line: rancid at CMH1-Z4-F01(active)> >> line: rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> set >> cli rancid at CMH1-Z4-F01(active)> set cli scripting-mode rancid at CMH1-Z4-F01(active)> >> set cli scripting-mode on >> PROMPT MATCH: rancid at CMH1-Z4-F01\(active\)[#>] >> HIT COMMAND:rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> >> set cli rancid at CMH1-Z4-F01(active)> set cli scripting-mode >> rancid at CMH1-Z4-F01(active)> set cli scripting-mode on >> >> COMMAND is: set cli scripting-mode on|EatCommand >> HIT COMMAND:rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> >> set cli rancid at CMH1-Z4-F01(active)> set cli pager rancid at CMH1-Z4-F01(active)> >> set cli pager off >> >> COMMAND is: set cli pager off|EatCommand >> HIT COMMAND:rancid at CMH1-Z4-F01(active)> show rancid at CMH1-Z4-F01(active)> >> show system rancid at CMH1-Z4-F01(active)> show system info >> >> COMMAND is: show system info|ShowInfo >> In ShowInfo:: rancid at CMH1-Z4-F01(active)> show rancid at CMH1-Z4-F01(active)> >> show system rancid at CMH1-Z4-F01(active)> show system info >> cmh1-z4-f01.domain.com : missed cmd(s): show config running >> cmh1-z4-f01.domain.com : missed cmd(s): show config running >> cmh1-z4-f01.domain.com : End of run not found >> cmh1-z4-f01.domain.com : End of run not found >> >> >> >> >> >> >> >> > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Mon Sep 15 19:59:37 2014 From: heas at shrubbery.net (heasley) Date: Mon, 15 Sep 2014 19:59:37 +0000 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> Message-ID: <20140915195937.GX11854@shrubbery.net> Sat, Sep 13, 2014 at 01:07:11PM -0400, Lee: > looks like there was a change - Gi5/14 was added to vlan 1 Correct. the catalyst do not seem to be consistent with how they order ports in the list when the list changes, but do not seem to change the order otherwise. > lee > > On 9/12/14, Jason Humes wrote: > > Here is an example; are you doing vtp? > > Index: configs/ core4506 > > =================================================================== > > - -- configs/ core4506 (revision 198) > > @@ -446,9 +446,9 @@ > > !VLAN: Fa2/6, Fa2/7, > > Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 > > !VLAN: Fa2/20, Fa2/22, > > Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 > > !VLAN: Fa2/42, Fa2/43, > > Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 > > - !VLAN: Gi3/5, Gi3/6, > > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 > > - !VLAN: Gi6/18, Gi6/19, > > Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 > > - !VLAN: Gi6/37, Gi6/38, > > Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > > + !VLAN: Gi3/5, Gi3/6, > > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 > > + !VLAN: Gi6/15, Gi6/18, > > Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 > > + !VLAN: Gi6/36, Gi6/37, > > Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > > !VLAN: 2 Engineering active Fa1/29, Fa1/32, > > Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 > > !VLAN: Gi6/40 > > !VLAN: 3 EDM active > > > > > > Jason > > > > -----Original Message----- > > From: Jason Humes > > Sent: Friday, September 12, 2014 3:06 PM > > To: rancid-discuss at shrubbery.net > > Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding > > linebreaks, joining lines, etc > > > > Hi > > Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are > > coming up with new configs after every run due to rancid adding line breaks > > in some cases and in others it joins two lines of the config. > > > > Any thoughts on why this might be going on? I'm running Ubuntu 14.04. > > > > Thanks > > > > > > Jason > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From wpleasants at gmail.com Mon Sep 15 20:18:13 2014 From: wpleasants at gmail.com (Chip Pleasants) Date: Mon, 15 Sep 2014 16:18:13 -0400 Subject: [rancid] Panrancid with PAN 6.0 In-Reply-To: References: Message-ID: Just found out what it was the day. Apparently the local on account on the firewalls changed roles, which disabled the set commands. I'm a bonehead. I swear I could run the commands manually after the upgrade. Thanks for checking in with me. -Chip On Jun 16, 2014 2:01 PM, "Chip Pleasants" wrote: > Does anyone have Panrancid working with PAN version 6.0.2? I have four > sets running PAN version 5.0.11 without an issues. Once I upgraded one set > the script times out. Below is a debug. Let me know if you have any > questions. > > Cheers, > > Chip > > > [rancid at cmh1vlobs01 rancid]$ /usr/libexec/rancid/panrancid -d > cmh1-z4-f01.domain.com > executing panlogin -t 90 -c"set cli scripting-mode on;set cli pager > off;show system info;show config running" cmh1-z4-f01.domain.com > line: cmh1-z4-f01.domain.com > line: spawn ssh -c 3des -x -l rancid cmh1-z4-f01.domain.com > line: NOTICE TO USERS > line: This is an official computer system and is the property of POOP > Incorporated. > line: It is for authorized users only. Unauthorized users are > prohibited. > line: Users (authorized or unauthorized) have no explicit or implicit > expectation of > line: privacy. Any or all uses of this system may be subject to one or > more of the > line: following actions: interception, monitoring, recording, auditing, > inspection and > line: disclosing to security personnel and law enforcement personnel, as > well as > line: authorized officials of other agencies, both domestic and foreign. > By using this > line: system, the user consents to these actions. Unauthorized or > improper use of > line: this system may result in administrative disciplinary action and > civil and criminal > line: penalties. By accessing this system you indicate your awareness > of and > line: consent to these terms and conditions of use. Discontinue access > immediately > line: if you do not agree to the conditions stated in this notice. > line: > line: Password: > line: Last login: Mon Jun 16 08:00:00 2014 from cmh1vlobs01.domain.com > line: Welcome rancid. > line: > line: rancid at CMH1-Z4-F01(active)> > line: rancid at CMH1-Z4-F01(active)> > line: rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> set cli > rancid at CMH1-Z4-F01(active)> set cli scripting-mode rancid at CMH1-Z4-F01(active)> > set cli scripting-mode on > PROMPT MATCH: rancid at CMH1-Z4-F01\(active\)[#>] > HIT COMMAND:rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> > set cli rancid at CMH1-Z4-F01(active)> set cli scripting-mode > rancid at CMH1-Z4-F01(active)> set cli scripting-mode on > > COMMAND is: set cli scripting-mode on|EatCommand > HIT COMMAND:rancid at CMH1-Z4-F01(active)> set rancid at CMH1-Z4-F01(active)> > set cli rancid at CMH1-Z4-F01(active)> set cli pager rancid at CMH1-Z4-F01(active)> > set cli pager off > > COMMAND is: set cli pager off|EatCommand > HIT COMMAND:rancid at CMH1-Z4-F01(active)> show rancid at CMH1-Z4-F01(active)> > show system rancid at CMH1-Z4-F01(active)> show system info > > COMMAND is: show system info|ShowInfo > In ShowInfo:: rancid at CMH1-Z4-F01(active)> show rancid at CMH1-Z4-F01(active)> > show system rancid at CMH1-Z4-F01(active)> show system info > cmh1-z4-f01. domain.com > : missed cmd(s): show config running > cmh1-z4-f01. domain.com > : missed cmd(s): show config running > cmh1-z4-f01. domain.com > : End of run not found > cmh1-z4-f01. domain.com > : End of run not found > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hank at kilmer.org Mon Sep 15 21:49:45 2014 From: hank at kilmer.org (Hank Kilmer) Date: Mon, 15 Sep 2014 17:49:45 -0400 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <20140915182704.GN11854@shrubbery.net> References: <20140915182704.GN11854@shrubbery.net> Message-ID: <22E7D2DB-69AD-46D8-859D-050DA5E805D7@kilmer.org> On Sep 15, 2014, at 2:27 PM, heasley wrote: > Fri, Sep 12, 2014 at 10:56:23AM -0400, Jon Lewis: >> With bash being my shell, I've just been doing TERM="" before using clogin >> on aristas. After seeing heasley's response, I did a little testing, and >> vt100 seems to work as well. My native TERM was "screen" since I like to >> use screen, it results in display similar to what you posted and an "n" >> spit out as if typed. > > OT, but is screen a terminal type? doesnt it just pass everything on to > whatever the terminal happens to be? or emulate something well-known? Depends on the system. Freebsd has a screen entry in /etc/termcap (or at least used to). -Hank From n.arnold at gmail.com Tue Sep 16 10:02:13 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Tue, 16 Sep 2014 11:02:13 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <5413517C.60002@chalmers.se> References: <5413517C.60002@chalmers.se> Message-ID: I should have mentioned that I tried clogin after changing the sleep time to 3 as I use clogin for all my other HP switches and have had the most success with clogin. I have just tried the hlogin script with the amended sleep entry. The script will log onto the switch and then output terminal garbage, if I then press any keys like the arrow keys, etc, more garbage is echoed back to the screen. This tells me that it has entered a terminal mode but one which the switch doesn't recognise. As I say, clogin is much more successful and despite issuing a random terminal letter/symbol/number sequence as soon as it logs on, I am still left with a logged in and responsive terminal. On 12 September 2014 21:03, Per-Olof Olsson wrote: > Hello > > Have someone tested to extend the time, device and tty driver have to > negotiate > window size at login, before expect start to analyze text? > > Seems to work if I use "sleep 3" > > *** hlogin_ORG 2014-09-12 21:38:09.543395741 +0200 > --- hlogin 2014-09-12 21:39:58.679120629 +0200 > ... > *************** > *** 361,367 **** > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 0.3 > > # This helps cleanup each expect clause. > expect_after { > --- 404,410 ---- > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 3 > > # This helps cleanup each expect clause. > expect_after { > *************** > ... > > clogin to HP-switches... > Anyhow, tests using "sleep 3" seems to eliminate window size echo, even > for clogin to HPs. > > > /Peo > > > Neil Arnold wrote 2014-09-12 17:03: > >> Hi Jon, >> >> Ok, that makes sense. I've tried the following: >> >> TERM="" hlogin 10.100.20.149 >> Result: Logged in but can't issue any command and the following displayed >> in the console: ^[[36;116R >> >> TERM="" clogin 10.100.20.149 >> Result: Log in successful but ^[[36;116R is automatically issued to the >> switch (different to the original string but still stalls >> the config grab) >> >> >> On 12 September 2014 15:56, Jon Lewis > jlewis at lewis.org>> wrote: >> >> With bash being my shell, I've just been doing TERM="" before using >> clogin on aristas. After seeing heasley's response, I did >> a little testing, and vt100 seems to work as well. My native TERM >> was "screen" since I like to use screen, it results in >> display similar to what you posted and an "n" spit out as if typed. >> >> >> On Fri, 12 Sep 2014, Neil Arnold wrote: >> >> Hi Jethro, I've tried the hlogon too. No luck I'm afraid. >> >> John, this sounds like it could be the solution as the characters >> do look >> like terminal output. Can you explain how I would go about >> clearing the >> TERM environment and if this works, I'm assuming I would have to >> make a >> seperate cron job running clogin with these new parameters just >> for these >> problem switches? >> >> Thanks again for you help with this. >> >> >> On 12 September 2014 13:03, Jon Lewis > jlewis at lewis.org>> wrote: >> >> On Fri, 12 Sep 2014, Neil Arnold wrote: >> >> Hi, >> >> >> I've got an issue with 3 HP Procurve switches. All are >> running a recent >> firmware version. The problem is that no config is being >> pulled from 3 HP >> switches. in my network, the others give up their config >> just fine. I've >> discovered the reason but I'm unsure of how to fix it. >> The issue is caused because rancid is issuing the >> following command to the >> switch after it logs on: ^[[46;148R >> >> I can see this by running /bin/clogin 10.100.20.149 and >> seeing that I get >> dropped to the following: >> >> HP_SWITCH_1# ^[[46;148R >> HP_SWITCH_1# >> >> So Rancid is issuing the manager username and password >> and then issuing >> ^[[46;148R which the switch doesn't understand, Rancid, >> having not >> received >> >> >> I have similar problems with clogin and arista gear. In this >> case, it's >> solved by clearing the TERM environment variable before >> running clogin. >> >> ------------------------------__---------------------------- >> --__---------- >> Jon Lewis, MCP :) | I route >> | therefore you are >> _________ http://www.lewis.org/~jlewis/__pgp < >> http://www.lewis.org/~jlewis/pgp> for PGP public key_________ >> >> >> >> ------------------------------__---------------------------- >> --__---------- >> Jon Lewis, MCP :) | I route >> | therefore you are >> _________ http://www.lewis.org/~jlewis/__pgp < >> http://www.lewis.org/~jlewis/pgp> for PGP public key_________ >> >> >> >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> >> > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.arnold at gmail.com Tue Sep 16 09:55:50 2014 From: n.arnold at gmail.com (Neil Arnold) Date: Tue, 16 Sep 2014 10:55:50 +0100 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: <5413517C.60002@chalmers.se> References: <5413517C.60002@chalmers.se> Message-ID: Apologies for the late reply. Changing it to a 3 second timeout didn't seem to have any effect although when I tried clogin 10.100.20.151, I was expecting to have to wait for the said 3 seconds before timing out. Instead it immediately logged on and issued the terminal garbage again. I feel bad asking for the help as being in the jobs we're all in, there's nothing worse than trying to diagnose an issue that you can't replicate yourself! I also patched the switch to the latest firmware release but this had no effect either. It's very odd as none of the other switches have this issue, only these random 3. Neil. On 12 September 2014 21:03, Per-Olof Olsson wrote: > Hello > > Have someone tested to extend the time, device and tty driver have to > negotiate > window size at login, before expect start to analyze text? > > Seems to work if I use "sleep 3" > > *** hlogin_ORG 2014-09-12 21:38:09.543395741 +0200 > --- hlogin 2014-09-12 21:39:58.679120629 +0200 > ... > *************** > *** 361,367 **** > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 0.3 > > # This helps cleanup each expect clause. > expect_after { > --- 404,410 ---- > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 3 > > # This helps cleanup each expect clause. > expect_after { > *************** > ... > > clogin to HP-switches... > Anyhow, tests using "sleep 3" seems to eliminate window size echo, even > for clogin to HPs. > > > /Peo > > > Neil Arnold wrote 2014-09-12 17:03: > >> Hi Jon, >> >> Ok, that makes sense. I've tried the following: >> >> TERM="" hlogin 10.100.20.149 >> Result: Logged in but can't issue any command and the following displayed >> in the console: ^[[36;116R >> >> TERM="" clogin 10.100.20.149 >> Result: Log in successful but ^[[36;116R is automatically issued to the >> switch (different to the original string but still stalls >> the config grab) >> >> >> On 12 September 2014 15:56, Jon Lewis > jlewis at lewis.org>> wrote: >> >> With bash being my shell, I've just been doing TERM="" before using >> clogin on aristas. After seeing heasley's response, I did >> a little testing, and vt100 seems to work as well. My native TERM >> was "screen" since I like to use screen, it results in >> display similar to what you posted and an "n" spit out as if typed. >> >> >> On Fri, 12 Sep 2014, Neil Arnold wrote: >> >> Hi Jethro, I've tried the hlogon too. No luck I'm afraid. >> >> John, this sounds like it could be the solution as the characters >> do look >> like terminal output. Can you explain how I would go about >> clearing the >> TERM environment and if this works, I'm assuming I would have to >> make a >> seperate cron job running clogin with these new parameters just >> for these >> problem switches? >> >> Thanks again for you help with this. >> >> >> On 12 September 2014 13:03, Jon Lewis > jlewis at lewis.org>> wrote: >> >> On Fri, 12 Sep 2014, Neil Arnold wrote: >> >> Hi, >> >> >> I've got an issue with 3 HP Procurve switches. All are >> running a recent >> firmware version. The problem is that no config is being >> pulled from 3 HP >> switches. in my network, the others give up their config >> just fine. I've >> discovered the reason but I'm unsure of how to fix it. >> The issue is caused because rancid is issuing the >> following command to the >> switch after it logs on: ^[[46;148R >> >> I can see this by running /bin/clogin 10.100.20.149 and >> seeing that I get >> dropped to the following: >> >> HP_SWITCH_1# ^[[46;148R >> HP_SWITCH_1# >> >> So Rancid is issuing the manager username and password >> and then issuing >> ^[[46;148R which the switch doesn't understand, Rancid, >> having not >> received >> >> >> I have similar problems with clogin and arista gear. In this >> case, it's >> solved by clearing the TERM environment variable before >> running clogin. >> >> ------------------------------__---------------------------- >> --__---------- >> Jon Lewis, MCP :) | I route >> | therefore you are >> _________ http://www.lewis.org/~jlewis/__pgp < >> http://www.lewis.org/~jlewis/pgp> for PGP public key_________ >> >> >> >> ------------------------------__---------------------------- >> --__---------- >> Jon Lewis, MCP :) | I route >> | therefore you are >> _________ http://www.lewis.org/~jlewis/__pgp < >> http://www.lewis.org/~jlewis/pgp> for PGP public key_________ >> >> >> >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> >> > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peo at chalmers.se Tue Sep 16 20:47:28 2014 From: peo at chalmers.se (Per-Olof Olsson) Date: Tue, 16 Sep 2014 22:47:28 +0200 Subject: [rancid] Rancid submits random characters after logon - causes config read failure In-Reply-To: References: <5413517C.60002@chalmers.se> Message-ID: <5418A1E0.1030908@chalmers.se> Sorry. Worked from home. Tested again from office and 3s sleep was not to any help at all. I see ^[[__;__R almost every login. But first, restart from the beginning: --------------------------------------- > I can see this by running /bin/clogin 10.100.20.149 and seeing that I get > dropped to the following: > > HP_SWITCH_1# ^[[46;148R > HP_SWITCH_1# > > So Rancid is issuing the manager username and password and then issuing > ^[[46;148R which the switch doesn't understand, Rancid, having not received > the config, disconnects and moves on. I can Telnet into these switches from > Rancid just fine using the manager logon so I know it's not an issue there. > I just can't understand why Rancid seems to be issuing this random string > of characters after it logs onto these particular switches. Please check that you have added "add autoenable 1" in your .cloginrc, for your 3 new switches. I think you try to login directly to manager level. If missing "autoenable" login will hang on first prompter and time out. test hlogin with hlogin... ---------------------------------- Back to ^[[__;__R characters. I will say it's a timing problem in some new HP-switches (2910,2920). The switch don't turn of echo, when waiting for window size answer, in a safe way. Have talked to HP-support in Sweden about this so they know about this. clogin can't be used for HP's. It's not using any filter at all. hpuifilter will block window size request "ESC[6n" so I think it's not a problem in batch mode. It's just interactive mode that shows this extra characters because it not using hpuifilter. Yes I have added some fixes to my hlogin, but have't seen any problem running backup on switches that show extra character in interactive mode. We don't use to run hlogin in interactive mode often, but if, just ignore extra characters. My ideas what to do: 1. Add hpuifilter in interactive mode and lose some nice terminal settings. As it was in some previous versions of hlogin. 2. Create new version of hpuifilter (or option switch to hpuifilter) that just remove "\x1B\\[[0-9]+;[0-9]+R", and use it in interactive mode. 3. Add hlogin option, to hide login and banner part, up to interactive prompt. Just don't show those characters. 4. Or simple, just ignore it and wait until HP do some fixes. Neil Arnold wrote 2014-09-16 12:02: > I should have mentioned that I tried clogin after changing the sleep time to 3 as I use clogin for all my other HP switches and > have had the most success with clogin. I have just tried the hlogin script with the amended sleep entry. The script will log onto > the switch and then output terminal garbage, if I then press any keys like the arrow keys, etc, more garbage is echoed back to the > screen. This tells me that it has entered a terminal mode but one which the switch doesn't recognise. As I say, clogin is much > more successful and despite issuing a random terminal letter/symbol/number sequence as soon as it logs on, I am still left with a > logged in and responsive terminal. > > > On 12 September 2014 21:03, Per-Olof Olsson > wrote: > > Hello > > Have someone tested to extend the time, device and tty driver have to negotiate > window size at login, before expect start to analyze text? > > Seems to work if I use "sleep 3" > > *** hlogin_ORG 2014-09-12 21:38:09.543395741 +0200 > --- hlogin 2014-09-12 21:39:58.679120629 +0200 > ... > *************** > *** 361,367 **** > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 0.3 > > # This helps cleanup each expect clause. > expect_after { > --- 404,410 ---- > send_user "\nError: unknown connection method: $prog\n" > return 1 > } > ! sleep 3 > > # This helps cleanup each expect clause. > expect_after { > *************** > ... > > clogin to HP-switches... > Anyhow, tests using "sleep 3" seems to eliminate window size echo, even for clogin to HPs. > > > /Peo > ... /Peo ---------------------------------------------------------- Per-Olof Olsson Email: peo at chalmers.se Chalmers tekniska h?gskola IT-service Arvid Hedvalls backe 6 412 96 G?teborg Tel: 031/772 6738 Fax: 031/772 8680 ---------------------------------------------------------- From peo at chalmers.se Tue Sep 16 21:17:35 2014 From: peo at chalmers.se (Per-Olof Olsson) Date: Tue, 16 Sep 2014 23:17:35 +0200 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> Message-ID: <5418A8EF.9030205@chalmers.se> Hello Have seen diffs like this when vtp trunks change up/down state. Formating is done by IOS for "show vlan", so it will be hard to fix splited lines in rancid. You are not alone to dislike diffs like this. In many IOS versions it posible turn of all line wrapping by setting "terminal length 0". I think it's one way of make diffs from "show vlan" more readable. Jason Humes wrote 2014-09-12 22:10: > Here is an example; > > Index: configs/ core4506 > =================================================================== > - -- configs/ core4506 (revision 198) > @@ -446,9 +446,9 @@ > !VLAN: Fa2/6, Fa2/7, Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 > !VLAN: Fa2/20, Fa2/22, Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 > !VLAN: Fa2/42, Fa2/43, Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 > - !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 > - !VLAN: Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 > - !VLAN: Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > + !VLAN: Gi3/5, Gi3/6, Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 > + !VLAN: Gi6/15, Gi6/18, Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 > + !VLAN: Gi6/36, Gi6/37, Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 > !VLAN: 2 Engineering active Fa1/29, Fa1/32, Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 > !VLAN: Gi6/40 > !VLAN: 3 EDM active > > > Jason > > -----Original Message----- > From: Jason Humes > Sent: Friday, September 12, 2014 3:06 PM > To: rancid-discuss at shrubbery.net > Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc > > Hi > Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are coming up with new configs after every run due to rancid adding line breaks in some cases and in others it joins two lines of the config. > > Any thoughts on why this might be going on? I'm running Ubuntu 14.04. > > Thanks > > > Jason > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > /Peo ---------------------------------------------------------- Per-Olof Olsson Email: peo at chalmers.se Chalmers tekniska h?gskola IT-service Arvid Hedvalls backe 6 412 96 G?teborg Tel: 031/772 6738 Fax: 031/772 8680 ---------------------------------------------------------- From mgoeres at gmail.com Tue Sep 16 20:51:46 2014 From: mgoeres at gmail.com (Matt Goeres) Date: Tue, 16 Sep 2014 15:51:46 -0500 Subject: [rancid] Fortigate Fnlogin / Fnrancid Sending Premature Exit and showing up in diffs In-Reply-To: References: Message-ID: Anyone have any clue on this? I still haven?t been able to figure it out.? On August 15, 2014 at 10:41:41 AM, Matthew Goeres (mgoeres at gmail.com) wrote: Hello, We have an issue with nearly all of our Fortigate firewalls where we get an extra exit in the config randomly somewhere in the config. I can't seem to put any rhyme or reason to why it is occurring and can't seem to figure out where in the script it decides it is done running the command table and to send the exit to close the shell. Line 382 is an example of the exit. 376: set tab-id 1 377: set column 1 378: next 379: edit 4 380: set widget-type sysres 381: set tab-id 1 382: exit 383: set column 2 384: set time-period 0 385: set chart-color 0 386: next 387: edit 5 388: set widget-type sessions 389: set tab-id 1 390: set column 2 391: next Line 262 is another example here: 255: next 256: edit "port8" 257: set vdom "MGMT" 258: set mode dhcp 259: set allowaccess ping https ssh fgfm 260: set type physical 261: set defaultgw enable 262: exit 263: next 264: edit "AuthLink0" 265: set vdom "root" 266: set ip 169.254.255.1 255.255.255.252 267: set allowaccess ping 268: set type vdom-link 269: next Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From ler762 at gmail.com Wed Sep 17 02:01:22 2014 From: ler762 at gmail.com (Lee) Date: Tue, 16 Sep 2014 22:01:22 -0400 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <20140915195937.GX11854@shrubbery.net> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> <20140915195937.GX11854@shrubbery.net> Message-ID: On 9/15/14, heasley wrote: > Sat, Sep 13, 2014 at 01:07:11PM -0400, Lee: >> looks like there was a change - Gi5/14 was added to vlan 1 > > Correct. the catalyst do not seem to be consistent with how they order > ports in the list when the list changes, really? Not that I've paid all that much attention to it, but the list always seems to be in ascending order. At least for cat6500s... Lee >> lee >> >> On 9/12/14, Jason Humes wrote: >> > Here is an example; > > are you doing vtp? > >> > Index: configs/ core4506 >> > =================================================================== >> > - -- configs/ core4506 (revision 198) >> > @@ -446,9 +446,9 @@ >> > !VLAN: Fa2/6, Fa2/7, >> > Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 >> > !VLAN: Fa2/20, >> > Fa2/22, >> > Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 >> > !VLAN: Fa2/42, >> > Fa2/43, >> > Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 >> > - !VLAN: Gi3/5, Gi3/6, >> > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 >> > - !VLAN: Gi6/18, >> > Gi6/19, >> > Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 >> > - !VLAN: Gi6/37, >> > Gi6/38, >> > Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 >> > + !VLAN: Gi3/5, Gi3/6, >> > Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 >> > + !VLAN: Gi6/15, >> > Gi6/18, >> > Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 >> > + !VLAN: Gi6/36, >> > Gi6/37, >> > Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 >> > !VLAN: 2 Engineering active Fa1/29, >> > Fa1/32, >> > Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 >> > !VLAN: Gi6/40 >> > !VLAN: 3 EDM active >> > >> > >> > Jason >> > >> > -----Original Message----- >> > From: Jason Humes >> > Sent: Friday, September 12, 2014 3:06 PM >> > To: rancid-discuss at shrubbery.net >> > Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding >> > linebreaks, joining lines, etc >> > >> > Hi >> > Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices >> > are >> > coming up with new configs after every run due to rancid adding line >> > breaks >> > in some cases and in others it joins two lines of the config. >> > >> > Any thoughts on why this might be going on? I'm running Ubuntu 14.04. >> > >> > Thanks >> > >> > >> > Jason >> > >> > _______________________________________________ >> > Rancid-discuss mailing list >> > Rancid-discuss at shrubbery.net >> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> > >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From ler762 at gmail.com Wed Sep 17 02:15:57 2014 From: ler762 at gmail.com (Lee) Date: Tue, 16 Sep 2014 22:15:57 -0400 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <5418A8EF.9030205@chalmers.se> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> <5418A8EF.9030205@chalmers.se> Message-ID: On 9/16/14, Per-Olof Olsson wrote: > Hello > > Have seen diffs like this when vtp trunks change up/down state. Doesn't need to be vtp. We have lots of blade servers & their switch ports are configured as trunks (_without_ vlan 1 on the trunk). When the server people move the blade to another slot, shut the server down, etc. the switch port goes down & a "show vlan" says the port is on vlan 1 :( Lee > Formating is done by IOS for "show vlan", so it will be hard to fix splited > lines in rancid. > You are not alone to dislike diffs like this. > In many IOS versions it posible turn of all line wrapping by setting > "terminal length 0". > I think it's one way of make diffs from "show vlan" more readable. > > > > Jason Humes wrote 2014-09-12 22:10: >> Here is an example; >> >> Index: configs/ core4506 >> =================================================================== >> - -- configs/ core4506 (revision 198) >> @@ -446,9 +446,9 @@ >> !VLAN: Fa2/6, Fa2/7, >> Fa2/8, Fa2/10, Fa2/11, Fa2/13, Fa2/14, Fa2/15, Fa2/16, Fa2/17, Fa2/19 >> !VLAN: Fa2/20, Fa2/22, >> Fa2/23, Fa2/24, Fa2/29, Fa2/32, Fa2/33, Fa2/34, Fa2/40, Fa2/41 >> !VLAN: Fa2/42, Fa2/43, >> Fa2/44, Fa2/45, Fa2/46, Fa2/47, Fa2/48, Te3/1, Te3/2, Gi3/3, Gi3/4 >> - !VLAN: Gi3/5, Gi3/6, >> Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/34, Gi6/5, Gi6/15 >> - !VLAN: Gi6/18, Gi6/19, >> Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35, Gi6/36 >> - !VLAN: Gi6/37, Gi6/38, >> Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 >> + !VLAN: Gi3/5, Gi3/6, >> Te4/1, Te4/2, Gi4/3, Gi4/4, Gi4/5, Gi4/6, Gi5/14, Gi5/34, Gi6/5 >> + !VLAN: Gi6/15, Gi6/18, >> Gi6/19, Gi6/20, Gi6/22, Gi6/23, Gi6/24, Gi6/28, Gi6/34, Gi6/35 >> + !VLAN: Gi6/36, Gi6/37, >> Gi6/38, Gi6/39, Gi7/7, Gi7/8, Gi7/9, Gi7/10, Gi7/11, Gi7/12 >> !VLAN: 2 Engineering active Fa1/29, Fa1/32, >> Fa1/35, Fa1/44, Fa1/45, Fa1/47, Fa2/18, Gi5/15, Gi5/33, Gi6/32 >> !VLAN: Gi6/40 >> !VLAN: 3 EDM active >> >> >> Jason >> >> -----Original Message----- >> From: Jason Humes >> Sent: Friday, September 12, 2014 3:06 PM >> To: rancid-discuss at shrubbery.net >> Subject: RANCID is incorrectly parsing my Cisco IOS Firewall, adding >> linebreaks, joining lines, etc >> >> Hi >> Recently upgraded to RANCID 3.1 and I'm finding all our Cisco devices are >> coming up with new configs after every run due to rancid adding line >> breaks in some cases and in others it joins two lines of the config. >> >> Any thoughts on why this might be going on? I'm running Ubuntu 14.04. >> >> Thanks >> >> >> Jason >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> > > > /Peo > ---------------------------------------------------------- > Per-Olof Olsson Email: peo at chalmers.se > Chalmers tekniska h?gskola IT-service > Arvid Hedvalls backe 6 412 96 G?teborg > Tel: 031/772 6738 Fax: 031/772 8680 > ---------------------------------------------------------- > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From john.kougoulos at gmail.com Wed Sep 17 16:06:45 2014 From: john.kougoulos at gmail.com (John Kougoulos) Date: Wed, 17 Sep 2014 18:06:45 +0200 Subject: [rancid] Fortigate Fnlogin / Fnrancid Sending Premature Exit and showing up in diffs In-Reply-To: References: Message-ID: Hi, Which version do you run on fortigates? I get similar things on version 4 but not in version 5 Regards, John On Sep 17, 2014 1:44 AM, "Matt Goeres" wrote: > Anyone have any clue on this? I still haven?t been able to figure it out. > > > On August 15, 2014 at 10:41:41 AM, Matthew Goeres (mgoeres at gmail.com) > wrote: > > Hello, > > We have an issue with nearly all of our Fortigate firewalls where we get > an extra exit in the config randomly somewhere in the config. > > I can't seem to put any rhyme or reason to why it is occurring and can't > seem to figure out where in the script it decides it is done running the > command table and to send the exit to close the shell. > > Line 382 is an example of the exit. > > 376: set tab-id 1 377: set column 1 378: next 379: edit 4 380: set widget-type sysres 381: set tab-id 1 382: exit 383: set column 2 384: set time-period 0 385: set chart-color 0 386: next 387: edit 5 388: set widget-type sessions 389: set tab-id 1 390: set column 2 391: next > > Line 262 is another example here: > > 255: next 256: edit "port8" 257: set vdom "MGMT" 258: set mode dhcp 259: set allowaccess ping https ssh fgfm 260: set type physical 261: set defaultgw enable 262: exit 263: next 264: edit "AuthLink0" 265: set vdom "root" 266: set ip 169.254.255.1 255.255.255.252 267: set allowaccess ping 268: set type vdom-link 269: next > > Thanks, > > Matt > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From JHildebrand at newgistics.com Thu Sep 18 18:40:42 2014 From: JHildebrand at newgistics.com (Josh Hildebrand) Date: Thu, 18 Sep 2014 18:40:42 +0000 Subject: [rancid] Cisco WLC support for Rancid 3.1 Message-ID: <89352296B2077B4FACCBD13133C3B11401B1ABCCAA@EXMAIL2.corpdom1.com> I've been running rancid 2.3.6 for a good number of years.. I am finally migrating the config over to another newer OS and decided I should probably start w/ the latest 3.1 version of RANCID.. Though, I have a few "hacks" added in over the years.. one of which is for Cisco wireless controllers (WLC) using ciscowlc, wlclogin, and wlcrancid.. I'm curious what the appropriate method is for implementing that into the newer rancid 3.1's /etc/rancid.types.conf style for add-ons? Also, I'd love to understand why WLC support isn't in RANCID natively by now.. I have a few other "mods" for things I need to reimplement too.. but this should give me a better understanding of how to do it. My other major mod is for apclogin and apcrancid, which uses FTP to collect config.ini's from APC UPS's and PDU's.. Thanks! Confidentiality Notice: This email and any attachments accompanying this electronic transmission may contain confidential and privileged information. The information is intended for the sole use of the intended recipient(s) and entity named above. If you are not the intended recipient, you are hereby notified that any further distribution, disclosure, copying, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately and destroy all copies of the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Tue Sep 23 15:31:17 2014 From: heas at shrubbery.net (heasley) Date: Tue, 23 Sep 2014 15:31:17 +0000 Subject: [rancid] RANCID is incorrectly parsing my Cisco IOS Firewall, adding linebreaks, joining lines, etc In-Reply-To: <5418A8EF.9030205@chalmers.se> References: <844839bb5706469ba89a61648811d7e9@ACSMAIL.acs.local> <5418A8EF.9030205@chalmers.se> Message-ID: <20140923153117.GC3998@shrubbery.net> Tue, Sep 16, 2014 at 11:17:35PM +0200, Per-Olof Olsson: > Hello > > Have seen diffs like this when vtp trunks change up/down state. > > Formating is done by IOS for "show vlan", so it will be hard to fix splited lines in rancid. > You are not alone to dislike diffs like this. > In many IOS versions it posible turn of all line wrapping by setting "terminal length 0". > I think it's one way of make diffs from "show vlan" more readable. > The code should not save show vlan output if the switch is not doing VTP transparent, which is why I was asking if VTP was being used. another option, for rancid 3.0, is just comment-out the show vlan command. yet another option, for formatting, is to break-up each port member into an individual line. less compact, but more easily read diffs From matt.arguin at oanda.com Tue Sep 23 18:56:45 2014 From: matt.arguin at oanda.com (Matthew Arguin) Date: Tue, 23 Sep 2014 14:56:45 -0400 Subject: [rancid] ASR 1001-X and Rancid 2.3.6 Message-ID: <5421C26D.1080703@oanda.com> lookign for a little insight. I have a pair of ASR1001-X's in my rancid config... had missed, previously, that there was a router type of cisco-xr and was getting a diff EVERY run of rancid on my primary router and sometimes on my secondary. changed the router type to the cisco-xr (it was only just on cisco) and noticed that in the RANCID release notes for 2.3.2 there is this: "rancid: filter filesize and date of tracelogs dir on IOS-XE" so i was hoping that by just changing the 'cisco' to 'cisco-xr' i would fix the issue as i did confirm in the two lastest diff's that it is the tracelogs dir causing the problem. however, it persists. i am running 2.3.6: -sh-3.2$ /usr/local/rancid/bin/rancid -V rancid 2.3.6 i must be missing something... -matt From matt.arguin at oanda.com Tue Sep 23 19:40:11 2014 From: matt.arguin at oanda.com (Matthew Arguin) Date: Tue, 23 Sep 2014 15:40:11 -0400 Subject: [rancid] ASR 1001-X and Rancid 2.3.6 Message-ID: <5421CC9B.2050501@oanda.com> looking for a little insight. I have a pair of ASR1001-X's in my rancid config... had missed, previously, that there was a router type of cisco-xr and was getting a diff EVERY run of rancid on my primary router and sometimes on my secondary. changed the router type to the cisco-xr (it was only just on cisco) and noticed that in the RANCID release notes for 2.3.2 there is this: "rancid: filter filesize and date of tracelogs dir on IOS-XE" so i was hoping that by just changing the 'cisco' to 'cisco-xr' i would fix the issue as i did confirm in the two lastest diff's that it is the tracelogs dir causing the problem. however, it persists. i am running 2.3.6: -sh-3.2$ /usr/local/rancid/bin/rancid -V rancid 2.3.6 i must be missing something... -matt From JHildebrand at newgistics.com Tue Sep 23 23:59:29 2014 From: JHildebrand at newgistics.com (Josh Hildebrand) Date: Tue, 23 Sep 2014 23:59:29 +0000 Subject: [rancid] Cisco WLC support for Rancid 3.1 Message-ID: <89352296B2077B4FACCBD13133C3B11401B1AD0E45@EXMAIL2.corpdom1.com> Is there any documentation on the etc/rancid.types.conf usage? From: Josh Hildebrand Sent: Thursday, September 18, 2014 1:41 PM To: 'rancid-discuss at shrubbery.net' Subject: Cisco WLC support for Rancid 3.1 I've been running rancid 2.3.6 for a good number of years.. I am finally migrating the config over to another newer OS and decided I should probably start w/ the latest 3.1 version of RANCID.. Though, I have a few "hacks" added in over the years.. one of which is for Cisco wireless controllers (WLC) using ciscowlc, wlclogin, and wlcrancid.. I'm curious what the appropriate method is for implementing that into the newer rancid 3.1's /etc/rancid.types.conf style for add-ons? Also, I'd love to understand why WLC support isn't in RANCID natively by now.. I have a few other "mods" for things I need to reimplement too.. but this should give me a better understanding of how to do it. My other major mod is for apclogin and apcrancid, which uses FTP to collect config.ini's from APC UPS's and PDU's.. Thanks! Confidentiality Notice: This email and any attachments accompanying this electronic transmission may contain confidential and privileged information. The information is intended for the sole use of the intended recipient(s) and entity named above. If you are not the intended recipient, you are hereby notified that any further distribution, disclosure, copying, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately and destroy all copies of the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Wed Sep 24 09:03:47 2014 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Wed, 24 Sep 2014 11:03:47 +0200 Subject: [rancid] ASR 1001-X and Rancid 2.3.6 In-Reply-To: <5421CC9B.2050501@oanda.com> References: <5421CC9B.2050501@oanda.com> Message-ID: <542288F3.8090104@gmail.com> On 23/09/2014 21:40, Matthew Arguin wrote: > looking for a little insight. I have a pair of ASR1001-X's in my rancid > config... had missed, previously, that there was a router type of > cisco-xr and was getting a diff EVERY run of rancid on my primary router > and sometimes on my secondary. changed the router type to the cisco-xr > (it was only just on cisco) and noticed that in the RANCID release notes > for 2.3.2 there is this: > > "rancid: filter filesize and date of tracelogs dir on IOS-XE" > > so i was hoping that by just changing the 'cisco' to 'cisco-xr' i would > fix the issue as i did confirm in the two lastest diff's that it is the > tracelogs dir causing the problem. however, it persists. > > i am running 2.3.6: > > -sh-3.2$ /usr/local/rancid/bin/rancid -V > rancid 2.3.6 > > i must be missing something... Matt, At my previous employer I found the ASR platform was a touch strange to deal with. IIRC the 9k runs XR and most other models run XE. So the 1k works best configured in router.db as "cisco". What I did was specify the type according to the actual OS running on the device which solved most problems, and then deal with the changing lines separately. Please post samples of the diff output you get so we can be sure, but I strongly suspect it's a simple case of tracelog lines need to be redacted out (the information is rather useless actually and no need to store it). Fixing it is as simple as a line of perl like this in the sub that deals with that output: next if (/some regex/); Check the web archives for the past 6 months, there's a bunch of patches I posted that dealt with this and other similar problems for me. You might find them useful. If possible you might want to upgrade to 2.3.8.p4 just to stay current. Or go straight to 3.1 but that requires tweaking your config files -- Alan McKinnon alan.mckinnon at gmail.com From heas at shrubbery.net Wed Sep 24 18:14:10 2014 From: heas at shrubbery.net (heasley) Date: Wed, 24 Sep 2014 18:14:10 +0000 Subject: [rancid] Cisco WLC support for Rancid 3.1 In-Reply-To: <89352296B2077B4FACCBD13133C3B11401B1AD0E45@EXMAIL2.corpdom1.com> References: <89352296B2077B4FACCBD13133C3B11401B1AD0E45@EXMAIL2.corpdom1.com> Message-ID: <20140924181410.GA46711@shrubbery.net> Tue, Sep 23, 2014 at 11:59:29PM +0000, Josh Hildebrand: > Is there any documentation on the etc/rancid.types.conf usage? man rancid.types.conf > From: Josh Hildebrand > Sent: Thursday, September 18, 2014 1:41 PM > To: 'rancid-discuss at shrubbery.net' > Subject: Cisco WLC support for Rancid 3.1 > > I've been running rancid 2.3.6 for a good number of years.. I am finally migrating the config over to another newer OS and decided I should probably start w/ the latest 3.1 version of RANCID.. Though, I have a few "hacks" added in over the years.. one of which is for Cisco wireless controllers (WLC) using ciscowlc, wlclogin, and wlcrancid.. > > I'm curious what the appropriate method is for implementing that into the newer rancid 3.1's /etc/rancid.types.conf style for add-ons? yes, see the dell entry as an example. > Also, I'd love to understand why WLC support isn't in RANCID natively by now.. i have no way to test it and no clear indication that its stable, which potentially leaves me supporting something I can not easily debug. > I have a few other "mods" for things I need to reimplement too.. but this should give me a better understanding of how to do it. My other major mod is for apclogin and apcrancid, which uses FTP to collect config.ini's from APC UPS's and PDU's.. > > Thanks! > > > Confidentiality Notice: This email and any attachments accompanying this electronic transmission may contain confidential and privileged information. The information is intended for the sole use of the intended recipient(s) and entity named above. If you are not the intended recipient, you are hereby notified that any further distribution, disclosure, copying, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately and destroy all copies of the original message. > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From heas at shrubbery.net Wed Sep 24 18:22:56 2014 From: heas at shrubbery.net (heasley) Date: Wed, 24 Sep 2014 18:22:56 +0000 Subject: [rancid] ASR 1001-X and Rancid 2.3.6 In-Reply-To: <542288F3.8090104@gmail.com> References: <5421CC9B.2050501@oanda.com> <542288F3.8090104@gmail.com> Message-ID: <20140924182256.GA47057@shrubbery.net> Wed, Sep 24, 2014 at 11:03:47AM +0200, Alan McKinnon: > If possible you might want to upgrade to 2.3.8.p4 just to stay current. > Or go straight to 3.1 but that requires tweaking your config files please, i do not want to support anything earlier. and, more filtering of files was added in later versions. From dan.w.anderson at gmail.com Wed Sep 24 21:09:13 2014 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Wed, 24 Sep 2014 17:09:13 -0400 Subject: [rancid] "upgrade" to 3.1 breaks par? Message-ID: I "upgraded" by installation from 2.3.8 to 3.1 this morning. By upgrade, I mean "back up, rm -rf etc bin var share lib, make install" and I keep getting par syntax errors in the logs: Trying to get all of the configs. usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] ===================================== Getting missed routers: round 1. usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] ===================================== Getting missed routers: round 2. usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] ===================================== Getting missed routers: round 3. usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] ===================================== Getting missed routers: round 4. usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] I ended up moving the par binary out of the way and restoring the perl version from 2.3.8 and it seems to have resolved my issue for now, but it's not really an ideal fix. I chucked an "echo" after the call to par in control_rancid and got this: par -q -n 5 -c 'rancid-fe "{}"' /usr/local/rancid/var/home/routers.up I haven't spent a lot of time on this at the moment, but I thought I would see if anyone else has run across this (I didn't see anything in the archives for the last few months) and might have an easy fix. -- Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Thu Sep 25 14:12:56 2014 From: heas at shrubbery.net (John Heasley) Date: Thu, 25 Sep 2014 09:12:56 -0500 Subject: [rancid] "upgrade" to 3.1 breaks par? In-Reply-To: References: Message-ID: <86277C20-2509-4AAA-906E-AB11D59D32B8@shrubbery.net> Am Sep 24, 2014 um 4:09 PM schrieb Dan Anderson : > > I "upgraded" by installation from 2.3.8 to 3.1 this morning. By upgrade, I mean "back up, rm -rf etc bin var share lib, make install" and I keep getting par syntax errors in the logs: > > Trying to get all of the configs. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] > > ===================================== > > Getting missed routers: round 1. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] > > ===================================== > > Getting missed routers: round 2. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] > > ===================================== > > Getting missed routers: round 3. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] > > ===================================== > > Getting missed routers: round 4. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] > > > > > > I ended up moving the par binary out of the way and restoring the perl version from 2.3.8 and it seems to have resolved my issue for now, but it's not really an ideal fix. > > I chucked an "echo" after the call to par in control_rancid and got this: > > par -q -n 5 -c 'rancid-fe "{}"' /usr/local/rancid/var/home/routers.up > > > > I haven't spent a lot of time on this at the moment, but I thought I would see if anyone else has run across this (I didn't see anything in the archives for the last few months) and might have an easy fix. > Another user had a problem like this; they were on some embedded platform version of linux. I had no manner of helping them. What are you using? > -- > Dan > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.w.anderson at gmail.com Thu Sep 25 15:07:07 2014 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Thu, 25 Sep 2014 11:07:07 -0400 Subject: [rancid] "upgrade" to 3.1 breaks par? In-Reply-To: <86277C20-2509-4AAA-906E-AB11D59D32B8@shrubbery.net> References: <86277C20-2509-4AAA-906E-AB11D59D32B8@shrubbery.net> Message-ID: It's a Raspberry Pi running Raspian. I can get you access to the box if you'd like it. On Thu, Sep 25, 2014 at 10:12 AM, John Heasley wrote: > Am Sep 24, 2014 um 4:09 PM schrieb Dan Anderson >: > > I "upgraded" by installation from 2.3.8 to 3.1 this morning. By upgrade, I > mean "back up, rm -rf etc bin var share lib, make install" and I keep > getting par syntax errors in the logs: > > Trying to get all of the configs. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [ file>] > > ===================================== > > Getting missed routers: round 1. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [ file>] > > ===================================== > > Getting missed routers: round 2. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [ file>] > > ===================================== > > Getting missed routers: round 3. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [ file>] > > ===================================== > > Getting missed routers: round 4. > > usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [ file>] > > > > I ended up moving the par binary out of the way and restoring the perl > version from 2.3.8 and it seems to have resolved my issue for now, but it's > not really an ideal fix. > > I chucked an "echo" after the call to par in control_rancid and got this: > > par -q -n 5 -c 'rancid-fe "{}"' /usr/local/rancid/var/home/routers.up > > > I haven't spent a lot of time on this at the moment, but I thought I would > see if anyone else has run across this (I didn't see anything in the > archives for the last few months) and might have an easy fix. > > > Another user had a problem like this; they were on some embedded platform > version of linux. I had no manner of helping them. What are you using? > > -- > Dan > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > -- Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Thu Sep 25 19:02:10 2014 From: heas at shrubbery.net (Heasley) Date: Thu, 25 Sep 2014 14:02:10 -0500 Subject: [rancid] "upgrade" to 3.1 breaks par? In-Reply-To: References: <86277C20-2509-4AAA-906E-AB11D59D32B8@shrubbery.net> Message-ID: <4FEE6068-409D-4367-AA3E-E15F8557D4A8@shrubbery.net> Am 25.09.2014 um 10:07 schrieb Dan Anderson : > > It's a Raspberry Pi running Raspian. I can get you access to the box if you'd like it. Iirc, thats what that user had, so yes please. > >> On Thu, Sep 25, 2014 at 10:12 AM, John Heasley wrote: >>> Am Sep 24, 2014 um 4:09 PM schrieb Dan Anderson : >>> >>> I "upgraded" by installation from 2.3.8 to 3.1 this morning. By upgrade, I mean "back up, rm -rf etc bin var share lib, make install" and I keep getting par syntax errors in the logs: >>> >>> Trying to get all of the configs. >>> >>> usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] >>> >>> ===================================== >>> >>> Getting missed routers: round 1. >>> >>> usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] >>> >>> ===================================== >>> >>> Getting missed routers: round 2. >>> >>> usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] >>> >>> ===================================== >>> >>> Getting missed routers: round 3. >>> >>> usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] >>> >>> ===================================== >>> >>> Getting missed routers: round 4. >>> >>> usage: par [-dfiqx] [-n #] [-p n] [-l logfile] [-c command] [] >>> >>> >>> >>> >>> >>> I ended up moving the par binary out of the way and restoring the perl version from 2.3.8 and it seems to have resolved my issue for now, but it's not really an ideal fix. >>> >>> I chucked an "echo" after the call to par in control_rancid and got this: >>> >>> par -q -n 5 -c 'rancid-fe "{}"' /usr/local/rancid/var/home/routers.up >>> >>> >>> >>> I haven't spent a lot of time on this at the moment, but I thought I would see if anyone else has run across this (I didn't see anything in the archives for the last few months) and might have an easy fix. >>> >> >> Another user had a problem like this; they were on some embedded platform version of linux. I had no manner of helping them. What are you using? >> >>> -- >>> Dan >>> _______________________________________________ >>> Rancid-discuss mailing list >>> Rancid-discuss at shrubbery.net >>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > -- > Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Fri Sep 26 16:50:36 2014 From: heas at shrubbery.net (heasley) Date: Fri, 26 Sep 2014 16:50:36 +0000 Subject: [rancid] "upgrade" to 3.1 breaks par? In-Reply-To: Message-ID: <20140926165035.GA42290@shrubbery.net> Thu, Sep 25, 2014 at 11:07:07AM -0400, Dan Anderson: > It's a Raspberry Pi running Raspian. I can get you access to the box if > you'd like it. This patch fixes the issue. Thanks for the help, Dan. Index: bin/hpuifilter.c =================================================================== --- bin/hpuifilter.c (revision 2872) +++ bin/hpuifilter.c (working copy) @@ -109,6 +109,8 @@ #include #if HAVE_UTIL_H # include +#elif HAVE_LIBUTIL_H +# include #endif #define BUFSZ (LINE_MAX * 2) @@ -141,13 +143,13 @@ { extern char *optarg; extern int optind; - char ch, - hbuf[BUFSZ], /* hlogin buffer */ + char hbuf[BUFSZ], /* hlogin buffer */ ptyname[FILENAME_MAX + 1], tbuf[BUFSZ], /* telnet/ssh buffer */ tbufstr[5] = {ESC, '\x07', '\r', '\n', '\0'}; int bytes, /* bytes read/written */ devnull, + i, rval = EX_OK, ptym, /* master pty */ ptys; /* slave pty */ @@ -167,8 +169,8 @@ if (strrchr(progname, '.') != NULL) *(strrchr(progname, '.')) = '\0'; - while ((ch = getopt(argc, argv, "dhvt:")) != -1 ) - switch (ch) { + while ((i = getopt(argc, argv, "dhvt:")) != -1 ) + switch (i) { case 'd': debug++; break; Index: bin/par.c =================================================================== --- bin/par.c (revision 2872) +++ bin/par.c (working copy) @@ -138,7 +138,6 @@ { extern char *optarg; extern int optind; - char ch; time_t t; int i, line; @@ -167,8 +166,8 @@ } else errfp = stderr; - while ((ch = getopt(argc, argv, "defhiqxvc:e:l:n:p:")) != -1 ) - switch (ch) { + while ((i = getopt(argc, argv, "defhiqxvc:e:l:n:p:")) != -1 ) + switch (i) { case 'c': /* command to run */ c_opt = optarg; break; @@ -912,7 +911,7 @@ /* first line might be a command */ if (*line == 1) { - switch ((buf[0] = fgetc(*F))) { + switch ((e = fgetc(*F))) { case EOF: goto ERR; break; @@ -933,7 +932,7 @@ } break; default: - ungetc(buf[0], *F); + ungetc(e, *F); if (*cmd == NULL && c_opt != NULL) if ((e = line_split(c_opt, cmd))) { /* XXX: is strerror(e) right? */ Index: bin/clogin.in =================================================================== --- bin/clogin.in (revision 2872) +++ bin/clogin.in (working copy) @@ -656,7 +656,7 @@ for {set i 0} {$i < $num_commands} { incr i} { send -- "[subst -nocommands [lindex $commands $i]]\r" expect { - -re "\b+" { exp_continue } + -re "^\b+" { exp_continue } -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)" } -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)" Index: bin/fnlogin.in =================================================================== --- bin/fnlogin.in (revision 2872) +++ bin/fnlogin.in (working copy) @@ -455,6 +455,10 @@ expect -re $prompt; send -- "end\r" expect -re $prompt; +# see http://www.shrubbery.net/pipermail/rancid-discuss/2011-July/005787.html + # this is the only way i see to get rid of more prompts in o/p..grrrrr + log_user 0 + set sep "\\1\u001" regsub -all {([^\\])\;} $command "$sep" esccommand set sep "\u001" @@ -466,10 +470,12 @@ -re "$prompt" { send "\r" sleep 0.5 } - -gl "--More--" { send " " + -gl "--More--\[^\n\r]*" { send " " exp_continue - -re "\[\n\r]+" { exp_continue } } + -re "\[^\r\n]*\[\n\r]+" { send_user -- "$expect_out(buffer)" + exp_continue + } } } expect { @@ -586,8 +592,12 @@ } } elseif { $do_script } { # Disable output paging. + send "config global\r" + expect -re $prompt {} send "config system console\r" + expect -re $prompt {} send "set output standard\r" + expect -re $prompt {} send "end\r" expect -re $prompt {} source $sfile Index: bin/hlogin.in =================================================================== --- bin/hlogin.in (revision 2872) +++ bin/hlogin.in (working copy) @@ -565,6 +565,8 @@ } exp_continue } + -re "^More: \[^\n\r]* line:" { catch {send " "} + exp_continue } -re "^<-+ More -+>\[^\n\r]*" { catch {send " "} exp_continue } -re "^-+ MORE -+\[^\n\r]*" { catch {send " "} Index: bin/jlogin.in =================================================================== --- bin/jlogin.in (revision 2872) +++ bin/jlogin.in (working copy) @@ -301,6 +301,7 @@ send_user "\nError: telnet failed: $reason\n" return 1 } +stty cols 132 } elseif ![string compare $prog "ssh"] { # ssh to the router & try to login with or without an identfile. # We use two calls to spawn since spawn does not seem to parse @@ -318,6 +319,7 @@ send_user "\nError: $sshcmd failed: $reason\n" return 1 } +stty cols 132 } elseif ![string compare $prog "rsh"] { send_error "\nError: unsupported method: rsh\n" if { $progs == 0 } { Index: bin/nxrancid.in =================================================================== --- bin/nxrancid.in (revision 2872) +++ bin/nxrancid.in (working copy) @@ -313,7 +313,17 @@ s/ +$//; # Drop trailing ' ' next if (/Fan Zone Speed:/); - next if (/INTAKE/); + if (/(control temperature|monitor temperature)/i) { + ProcessHistory("COMMENTS","","","!Env: $_"); + while () { + if (/(.*\s+\d+\s+\d+\s+)(\d+)(.*$)/) { + $_ = sprintf("%s%-". length($2)."s%s\n", $1, "", $3); + } + ProcessHistory("COMMENTS","","","!Env: $_"); + last if (/^\s*$/); + } + next; + } ProcessHistory("COMMENTS","","","!Env: $_"); } ProcessHistory("COMMENTS","","","!\n"); @@ -334,6 +344,7 @@ return(-1) if (/\% Permission denied/); return(-1) if (/command authorization failed/i); + s/ +$//; # Drop trailing ' ' # Cut out CurTemp - drop the 2nd to last field. #-------------------------------------------------------------------- #Module Sensor MajorThresh MinorThres CurTemp Status @@ -340,10 +351,21 @@ # (Celsius) (Celsius) (Celsius) #5 Outlet1 (s1) 125 125 33 Ok #5 QEng1Sn1(s10) 115 105 39 Ok - s/^(.+\s)(\S+\s+)(\S+\s*)$/$1$3/; - - s/ +$//; # Drop trailing ' ' - ProcessHistory("COMMENTS","","","!Env: $_"); + if (/(control temperature|monitor temperature)/i) { + ProcessHistory("COMMENTS","","","!Env: $_"); + while () { + if (/(.*\s+\d+\s+\d+\s+)(\d+)(.*$)/) { + $_ = sprintf("%s%-". length($2)."s%s\n", $1, "", $3); + } + ProcessHistory("COMMENTS","","","!Env: $_"); + last if (/^\s*$/); + } + next; + } else { + s/^(.+\s)(\S+\s+)(\S+\s*)$/$1$3/; + s/ +$//; # Drop trailing ' ' + ProcessHistory("COMMENTS","","","!Env: $_"); + } } ProcessHistory("COMMENTS","","","!\n"); return(0); From Wayne.Eisenberg at CarolinasIT.com Fri Sep 26 23:10:16 2014 From: Wayne.Eisenberg at CarolinasIT.com (Wayne Eisenberg) Date: Fri, 26 Sep 2014 23:10:16 +0000 Subject: [rancid] getting websvn to work Message-ID: Hello again, I'm trying to get websvn to work with rancid 3.1, and not having a lot of success. I compiled rancid for svn, ran 'rancid-run', and I see a different folder structure under var/CVS than I saw when it was compiled for cvs. So I *think* svn is working ok with rancid (but I don't know how to confirm that). I installed websvn into a subdirectory in apache, and I guess it's ok because when I go to it, it tells me I haven't added a repository yet. So I go to the config.php file, use the addRepository line to point to var/CVS, restart httpd, and now when I go to the index.php page, it's completely blank. Take out the addRepository line, back to the default page again. So what am I missing? How do I find the problem? I thought websvn was supposed to be pretty easy to use. Thanks in advance, Wayne ________________________________ The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Wayne.Eisenberg at CarolinasIT.com Sun Sep 28 20:56:32 2014 From: Wayne.Eisenberg at CarolinasIT.com (Wayne Eisenberg) Date: Sun, 28 Sep 2014 20:56:32 +0000 Subject: [rancid] getting websvn to work In-Reply-To: <54265F40.2000103@gmail.com> References: <54265F40.2000103@gmail.com> Message-ID: Thanks guys. It was permissions - the user that httpd was running as was not part of the group that owns the var/CVS folder (or any other part of the rancid tree. Once I made it a part of the group and restarted apache, all worked well. Now to figure out how to read/understand an SVN repository (as opposed to a CVS repository). From: Herbert Mutz [mailto:mutz.online at gmail.com] Sent: Saturday, September 27, 2014 2:55 AM To: Wayne Eisenberg Subject: Re: [rancid] getting websvn to work Hello Wayne, do you use apache ? I noticed after my last apache upgrade that the webfolder has been changed from /var/www to /var/www/html. I also had some minor problems with user rights and websvn, did you check those ? Other than that i just configured websvn through dpkg reconfigure and didn't add any lines to config.php have a nice day michael Am 27.09.2014 um 01:10 schrieb Wayne Eisenberg: Hello again, I'm trying to get websvn to work with rancid 3.1, and not having a lot of success. I compiled rancid for svn, ran 'rancid-run', and I see a different folder structure under var/CVS than I saw when it was compiled for cvs. So I *think* svn is working ok with rancid (but I don't know how to confirm that). I installed websvn into a subdirectory in apache, and I guess it's ok because when I go to it, it tells me I haven't added a repository yet. So I go to the config.php file, use the addRepository line to point to var/CVS, restart httpd, and now when I go to the index.php page, it's completely blank. Take out the addRepository line, back to the default page again. So what am I missing? How do I find the problem? I thought websvn was supposed to be pretty easy to use. Thanks in advance, Wayne ________________________________ The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: