Per-Olof Olsson | 5 May 07:40 2014
Picon
Picon

[rancid] clogin can't login to more then one router.


clogin only work if one router is listed at command line.
(rancid 2.3.8 and 3.0 tested)

clogin -c "show term" router1 router2

output for second router:
--------------------------
can't read "autoenable": no such variable
    while executing
"if { $enable && $do_enapasswd && $autoenable == 0 && [llength $pswd] < 2 } {
        send_user -- "\nError: no enable password for $router in $password_file...."
    ("foreach" body line 28)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.
    set platform ""
    send_user ..."
    (file "/usr/local/rancid/bin/clogin" line 759)
----------------------------

Possible more settings need to be reset before login to each router.
Got it to work for my settings, by moving "set enable 0" inside foreach loop.

3.0 clogin diff.
*** 752,757 ****
--- 752,758 ----
  set prompt_match ""
  set enable 0
(Continue reading)

Michael T. Voity | 2 May 21:11 2014
Picon

[rancid] Setup issue

Hello,

I'm new to the RANCID realm.   Before posting to this list I have done 
my research and cannot quite seem to get the right answer to my issue.

I'm trying to get RANCID to work with my Cisco ASR9001 which has ios-xr -

In the log file i get these messages -

Trying to get all of the configs.
swick-uvm-gw2: missed cmd(s): dir /all disk1a:,admin show diag,dir /all 
slavedisk2:,dir /all sec-slot2:,dir /all disk1:,dir /all sec-nvram:,dir 
/all disk2:,dir /all sec-bootflash:,dir /all slaveslot2:,dir /all 
disk0:,dir /all compactflasha:,dir /all slaveslot0:,dir /all 
sec-slot1:,dir /all harddiska:,dir /all slavenvram:,dir /all 
sec-disk2:,dir /all sec-disk0:,dir /all harddiskb:,dir /all 
slavedisk1:,show controllers,show rpl maximum,dir /all slavedisk0:,show 
debug,dir /all bootflash:,dir /all sec-slot0:,dir /all sec-disk1:,dir 
/all disk0a:,dir /all slot2:,dir /all compactflash:,dir /all 
harddisk:,dir /all slot0:,admin show running,show vlan,dir /all 
slavebootflash:,dir /all slaveslot1:,dir /all nvram:,admin show 
inventory raw,show running-config,dir /all slot1:
swick-uvm-gw2: End of run not found
!
watt-uvm-gw3: missed cmd(s): dir /all disk1a:,admin show diag,dir /all 
slavedisk2:,dir /all sec-slot2:,dir /all disk1:,dir /all sec-nvram:,dir 
/all disk2:,dir /all sec-bootflash:,dir /all slaveslot2:,dir /all 
disk0:,dir /all compactflasha:,dir /all slaveslot0:,dir /all 
sec-slot1:,dir /all harddiska:,dir /all slavenvram:,dir /all 
sec-disk2:,dir /all sec-disk0:,dir /all harddiskb:,dir /all 
(Continue reading)

Howard Jones | 2 May 10:18 2014

[rancid] Rancid 3 documentation tweak

The README for RANCID 3.0 says that perl5 or greater is required to run 
RANCID. In fact, it's perl 5.10 or greater, which is significant for 
some. For example, current CentOS 6 (and I guess RHEL and Scientific 
Linux too) come with perl 5.8.8, so it requires a separate perl install 
just for RANCID. (installing it over the system perl leads to fighting 
between CPAN and yum)

Related: a configure option to specify the location of the perl 
interpreter would be handy!

Cheers,

Howie
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

heasley | 1 May 22:56 2014
Picon

Re: [rancid] Cisco ACS 5.5

Wed, Apr 30, 2014 at 09:13:28AM +0200, Pawe?? Rzepa:
> Hi,
> No, it doesn't hang. When I login into the device interactively it
> works. When I run a command it produces unpredictable results, imho
> depending on the chunks of output retrieved from the device.
> 
> This is the excerpt from clogin -d -c 'write term' output which I
> suppose is relevant to the issue:
> 
> expect: does "ip domain-name my.company.com\r\n!        \r\nno ipv6
> enable\r\n!        \r\ninterface GigabitEthernet 0\r\n  ip address
> 10.10.10.10 255.255.255.0\r\n  ipv6 address autoconfig\r\n  no ipv6
> enable\r\n!        \r\ninterface GigabitEthernet 1\r\n  shutdown\r\n
> ipv6 address autoconfig\r\n  no ipv6 enable\r\n!        \r\nip
> name-server 10.10.10.10 10.10.10.10 \r\n!        \r\nip
> default-gateway 10.10.10.10\r\n!        \r\nclock timezone
> Europe/Warsaw\r\n!        \r\nntp server
> 10.10.10.10\r\n!\u0008\nusername root password hash
> $1$p4MxVbAdp$asdfasdfasdfasd role admin \r\n!\u0008\nno
> max-ssh-sessions\r\n!\u0008\n" (spawn_id exp6) match regular
> expression "\u0008+"? yes
> expect: set expect_out(0,string) "\u0008"
> expect: set expect_out(spawn_id) "exp6"
> expect: set expect_out(buffer) "ip domain-name my.company.com\r\n!
>    \r\nno ipv6 enable\r\n!        \r\ninterface GigabitEthernet 0\r\n
> ip address 10.10.10.10 255.255.255.0\r\n  ipv6 address autoconfig\r\n
> no ipv6 enable\r\n!        \r\ninterface GigabitEthernet 1\r\n
> shutdown\r\n  ipv6 address autoconfig\r\n  no ipv6 enable\r\n!
> \r\nip name-server 10.10.10.10 10.10.10.10 \r\n!        \r\nip
> default-gateway 10.10.10.10\r\n!        \r\nclock timezone
(Continue reading)

heasley | 1 May 22:14 2014
Picon

Re: [rancid] System Up Time & Dell

Thu, May 01, 2014 at 01:23:52PM -0400, Gerhard Mourani:
> I'm using Rancid 3.0 to backup Dell switches using the 'smc' type and it
> work. But every time the script run, I receive the following diff.
> 
> - ! System Up Time (days,hour:min:sec):       02,11:30:13
> + ! System Up Time (days,hour:min:sec):       02,23:31:44

this should do it.

Index: bin/srancid.in
===================================================================
--- bin/srancid.in	(revision 2828)
+++ bin/srancid.in	(working copy)
 <at>  <at>  -215,7 +215,7  <at>  <at> 
 	s/[\b]+\s*[\b]*//g;

 	# Remove Uptime
-	/ Up time/ && next;
+	/ up time/i && next;

 	# filter temperature sensor info for Dell 6428 stacks
 	/Temperature Sensors:/ && next;
 <at>  <at>  -251,7 +251,7  <at>  <at> 
 	s/[\b]+\s*[\b]*//g;

 	# Remove Uptime
-	/ Up time/ && next;
+	/ up time/i && next;
 	ProcessHistory("COMMENTS","keysort","D1","! $_");
     }
(Continue reading)

Gerhard Mourani | 1 May 19:23 2014
Picon

[rancid] System Up Time & Dell

Hello,

I'm using Rancid 3.0 to backup Dell switches using the 'smc' type and it work. But every time the script run, I receive the following diff.

- ! System Up Time (days,hour:min:sec):       02,11:30:13
+ ! System Up Time (days,hour:min:sec):       02,23:31:44

Thanks,
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Gerhard Mourani | 1 May 19:21 2014
Picon

[rancid] (no subject)

Hello,

I'm using Rancid 3.0 to check FortiGate configuration changes and it is working except that I receive every time when the script is running, the following diff.

-     set password ENC ttKtc1dKyMz19Q6J7FQ6TLuM4ijBajn0gOgs8OvSaaExqFScZf1ngJTXpyHOrg8gdkcZLYKnTAWNGooEasQAYgnzwTq1siZvMrE37H1tQaBhDvenHB94CP7W+Esp/82LBKVA57xuaAVpehH0WCeFLIjdogE+N8yBfcmObOqBYewbTt9xRL/MG+XwQqtjHeyGC5tsrw==
+     set password ENC Ig68IRG3Y25jMaueDr6VTnROaGLp2DbwMKjK7AzIkDserF+TDqcdSOKof+vGSfBL52TPZGNN/JXsC6SRIZcBrPm2yE3ciRgkX9FxoNmN2WieUBr8GEaEdwD4HpHFe31D13Sc+k9tHLczdXOCYnGVFXMZNH2zaa6ZIzSIQuYPPaWBltJolkCcdEHQoUjQ4tB8imTGmw==

Thanks,
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Paweł Rzepa | 29 Apr 13:57 2014
Picon

[rancid] Cisco ACS 5.5

Hi,
I use rancid to download configuration from Cisco ACS. I have adopted
rancid a little and finally got it working. After recent upgrade to
5.5 it stopped gathering configuration.
Investigation showed that the reason was exp_continue in proc
run_commands for -re "\b+" :
proc run_commands { prompt command } {
    global do_saveconfig in_proc platform
...
    for {set i 0} {$i < $num_commands} { incr i} {
    send -- "[subst -nocommands [lindex $commands $i]]\r"
    expect {
#       -re "\b+"               { exp_continue }       --------------
MUST HAVE DISABLED IT
        -re "^\[^\n\r *]*$reprompt"     { send_user -- "$expect_out(buffer)"
                        }
        -re "^\[^\n\r]*$reprompt."      { send_user -- "$expect_out(buffer)"
                          exp_continue
                        }
    ...........

Now I got all the configuration lines, but '\b' is here. How can I
remove all occurrences of '\b' from the buffer before it is printed
out?

Regards,
Pawel Rzepa
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Tom Harbert | 29 Apr 02:58 2014

[rancid] Ubuntu Linux collection / llogin & lrancid

Hello,

Has anyone had any success configuring RANCID to collect configuration files from an Ubuntu Linux server?  I have a couple configured with BIRD and acting as routers.  I want to incorporate them into the existing configuration management solution to backup and monitor items such as:

- /etc/network/interfaces
- /etc/bird/bird.conf
- /etc/shorewall/*

I have read the following posts about llogin and lrancid and hacked the scripts as best I could.  I can get llogin to connect and auth however I believe I am still getting a timeout error due to the prompt.


host.domain llogin error: Error: TIMEOUT reached

I was hoping to be able to just change the prompt to "$ " however no dice.  If anyone has any experience or an alternative way of a accomplishing this please let me know.  I thought I might explore just a cron job which scp's the relevant files and does a diff however it would be cleaner to have it all integrated into RANCID.

Thanks!
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Roman Hochuli | 28 Apr 10:34 2014
Picon

[rancid] Cisco licenses

Hello All

Did anyone ever considered to add 'sh license' for Cisco devices?

If so: how to handle devices that do not care about this command? Simply
ignore the lacking/erroring output?

Or better take care to only run this code on selected devices that a
known to support it. And if so how: what would be the best way to apply
that kind of filter (if possible at all in RANCID)?

-- 
Best regards,
Roman Hochuli
Operations Manager

nexellent ag
Saegereistrasse 33
CH-8152 Glattbrugg

Phone:       +41 44 872 20 00
Fax:         +41 44 872 20 01
URL:         www.nexellent.ch
X-NCC-RegID: ch.nexellent

Imagination is the one weapon in the war
against reality.
                    -- Jules de Gaultier

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Brown, David M JR | 25 Apr 22:32 2014

[rancid] Rancid and Git

To whom it may concern,

 

Apparently this has been brought up a bunch of times.

 

Original Git Patch…

http://www.shrubbery.net/pipermail/rancid-discuss/2007-March/002152.html

 

Another mention of the git patch…

http://www.shrubbery.net/pipermail/rancid-discuss/2008-December/003529.html

 

More poking about git…

http://www.shrubbery.net/pipermail/rancid-discuss/2010-April/004865.html

 

And yet even more poking around git…

http://www.shrubbery.net/pipermail/rancid-discuss/2013-May/006830.html

 

The final mention of git support in rancid talks about a rancid fork (essentially) rancid-git whose sole purpose is to support git in rancid https://github.com/dotwaffle/rancid-git.

 

So, I’d really like to know the answer as to why Git isn’t supported in Rancid yet? Most of the patches seem okay and discussion about them seems to have just stopped. The discussion has no mention of whether the patch was going to be supported or not.

 

So I’d really like an answer to why Git is not supported in Rancid.

 

Thanks,

- David Brown

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Gmane