Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: RANCID: Users

Set per-host timeout in .cloginrc?

 

 

RANCID users RSS feed   Index | Next | Previous | View Threaded


mwlucas at blackhelicopters

Apr 26, 2012, 2:11 PM

Post #1 of 3 (682 views)
Permalink
Set per-host timeout in .cloginrc?

Hi,

I have a Mikrotik that runs export very slowly. It has several
full-route BGP peers in IPv4 and IPv6, filtering rules, and so on, so
this isn't terribly surprising.

The default rancid timeout is 90 seconds.

Is it possible to change the timeout in .cloginrc for just this
particular host, or do I need to edit mtlogin?

==ml

--
Michael W. Lucas
http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/
Latest book: SSH Mastery http://www.michaelwlucas.com/nonfiction/ssh-mastery
mwlucas [at] BlackHelicopters, Twitter @mwlauthor
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss [at] shrubbery
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


heas at shrubbery

Apr 26, 2012, 3:04 PM

Post #2 of 3 (625 views)
Permalink
Re: Set per-host timeout in .cloginrc? [In reply to]

Thu, Apr 26, 2012 at 05:11:06PM -0400, Michael W. Lucas:
> Hi,
>
> I have a Mikrotik that runs export very slowly. It has several
> full-route BGP peers in IPv4 and IPv6, filtering rules, and so on, so
> this isn't terribly surprising.
>
> The default rancid timeout is 90 seconds.
>
> Is it possible to change the timeout in .cloginrc for just this
> particular host, or do I need to edit mtlogin?

cloginrc timeout knob is supposed to provide this, but its missing in
mtlogin. this patch should do it.

Index: bin/mtlogin.in
===================================================================
--- bin/mtlogin.in (revision 2457)
+++ bin/mtlogin.in (working copy)
@@ -71,7 +71,7 @@
# tracks if we receive them on the command line.
set do_passwd 1
# Sometimes routers take awhile to answer (the default is 10 sec)
-set timeout 45
+set timeoutdflt 45

# Find the user in the ENV, or use the unix userid.
if {[ info exists env(CISCO_USER) ]} {
@@ -177,7 +177,7 @@
-T* {
if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
incr i
- set timeout [ lindex $argv $i ]
+ set timeoutdflt [ lindex $argv $i ]
}
# Command file
} -x* -
@@ -466,6 +466,12 @@
set autoenable 1
set enable 0

+ # device timeout
+ set timeout [find timeout $router]
+ if { [llength $timeout] == 0 } {
+ set timeout $timeoutdflt
+ }
+
# Figure out passwords
if { $do_passwd } {
set pswd [find password $router]

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss [at] shrubbery
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


mwlucas at blackhelicopters

Apr 30, 2012, 8:06 AM

Post #3 of 3 (630 views)
Permalink
Re: Set per-host timeout in .cloginrc? [In reply to]

Patch works. Timeout is successfully set, changes checked in.

Thank you!

==ml

On Thu, Apr 26, 2012 at 03:04:26PM -0700, heasley wrote:
> Thu, Apr 26, 2012 at 05:11:06PM -0400, Michael W. Lucas:
> > Hi,
> >
> > I have a Mikrotik that runs export very slowly. It has several
> > full-route BGP peers in IPv4 and IPv6, filtering rules, and so on, so
> > this isn't terribly surprising.
> >
> > The default rancid timeout is 90 seconds.
> >
> > Is it possible to change the timeout in .cloginrc for just this
> > particular host, or do I need to edit mtlogin?
>
> cloginrc timeout knob is supposed to provide this, but its missing in
> mtlogin. this patch should do it.
>
> Index: bin/mtlogin.in
> ===================================================================
> --- bin/mtlogin.in (revision 2457)
> +++ bin/mtlogin.in (working copy)
> @@ -71,7 +71,7 @@
> # tracks if we receive them on the command line.
> set do_passwd 1
> # Sometimes routers take awhile to answer (the default is 10 sec)
> -set timeout 45
> +set timeoutdflt 45
>
> # Find the user in the ENV, or use the unix userid.
> if {[ info exists env(CISCO_USER) ]} {
> @@ -177,7 +177,7 @@
> -T* {
> if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
> incr i
> - set timeout [ lindex $argv $i ]
> + set timeoutdflt [ lindex $argv $i ]
> }
> # Command file
> } -x* -
> @@ -466,6 +466,12 @@
> set autoenable 1
> set enable 0
>
> + # device timeout
> + set timeout [find timeout $router]
> + if { [llength $timeout] == 0 } {
> + set timeout $timeoutdflt
> + }
> +
> # Figure out passwords
> if { $do_passwd } {
> set pswd [find password $router]

--
Michael W. Lucas
http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/
Latest book: SSH Mastery http://www.michaelwlucas.com/nonfiction/ssh-mastery
mwlucas [at] BlackHelicopters, Twitter @mwlauthor
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss [at] shrubbery
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

RANCID users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.