Mailing List Archive

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@BlackHelicopters.org, Twitter @mwlauthor
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
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@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
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@BlackHelicopters.org, Twitter @mwlauthor
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss