i found the debug flag. here's the output during the loop:
(i will try to trace it down in the code and see if i can set a condition
for this...)
r204-sw1>
expect: does " ^\r\n% Invalid input detected at '^'
marker.\r\n\r\nr204-sw1>" (spawn_id exp6) match regular expression "^[^\n\r
*]*r204-sw1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"The system has unsaved changes"? no
"Would you like to save them now"? no
"(Profile|Configuration) changes have occurred.*"? no
"Do you wish to save your configuration changes"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " ^\r\n"
expect: continuing expect
expect: does "% Invalid input detected at '^' marker.\r\n\r\nr204-sw1>"
(spawn_id exp6) match regular expression "^[^\n\r
*]*r204-sw1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"The system has unsaved changes"? no
"Would you like to save them now"? no
"(Profile|Configuration) changes have occurred.*"? no
"Do you wish to save your configuration changes"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "% Invalid input detected at '^'
marker.\r\n\r\n"
expect: continuing expect
expect: does "r204-sw1>" (spawn_id exp6) match regular expression "^[^\n\r
*]*r204-sw1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? yes
expect: set expect_out(0,string) "r204-sw1>"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "r204-sw1>"
send: sending "exit\r" to { exp6 human_write: avg_arr=0.400000/0.400000
1/shape=1.428571 min=0.300000 max=5.000000
sighandler: handling signal(2)
async event handler: Tcl_Eval(exit 130)
write() failed to write anything - will sleep(1) and retry...
Post by Brian LamPost by Martin Barry$quoted_author = "Brian Lam" ;
Post by Brian LamThe expect / python script /usr/local/rancid/bin/clogin was looping
because
Post by Brian Lammy router doesn't like 'exit' and prefer 'quit'.
You can either modify the following to match the 'force10' platform (does
the newer one accept quit?)
the new f10 version accepts 'quit'
Post by Martin Barry# line 678
if { [ string compare "extreme" "$platform" ] } {
send -h "exit\r"
} else {
send -h "quit\r"
}
my version of rancid is 2.3.2
662,664c662
< if { [ string compare "force10" "$platform" ] } {
< send -h "quit\r"
< } elseif { [ string compare "extreme" "$platform" ] } {
---
Post by Martin Barryif { [ string compare "extreme" "$platform" ] } {
it's a case of fixing one thing and another breaks...
it looks like it's not looping anymore but it's not updating any of the f10
switches (the previous working f10 are not updated either). rancid log shows
(maybe because the output is different now, rancid end regex doesn't work
anymore?)
=====================================
Getting missed routers: round 1.
r103: End of run not found
end
r103-2: End of run not found
end
r205-sw1: End of run not found
end
ec1: End of run not found
end
ec2: End of run not found
end
r304: End of run not found
end
r304-2: End of run not found
end
=====================================
Post by Martin Barryor you could add a stanza in the next section to catch the error thrown when
sending 'exit' to old force10.
maybe i will target the stanza instead and have better luck. the loop
output is below. the first 'exit' works but the 2nd on throws an error '%
Invalid input detected at '^' marker.'
could you help point me to the right place where i can write an expect
regexp to capture this error and deal with it? many thanks. spend many hr
pulling my hair / debugging! :p btw, is their a debug flag that i can set
to get more debug outputs?
(looping output)
interface vlan 1
exit
exit
end
r204-sw1#exit
r204-sw1>exit
^
% Invalid input detected at '^' marker.
r204-sw1>exit
^
% Invalid input detected at '^' marker.
r204-sw1>exit
^
% Invalid input detected at '^' marker.
r204-sw1>exit
^
(looping...)
Post by Martin Barrycheers
Marty
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
brianclam2
--
Brian Lam | IT/Operations | Rockyou, Inc. | Phone: 408-425-9801 | AIM:
brianclam2