Discussion:
[rancid] clogin goes out of phase with extreme switches
Nicolai Langfeldt
2013-02-23 06:52:18 UTC
Permalink
Hi,

Our rancid version is 2.3.8.

We have a large number of extreme switches. xrancid has a tendency to
fail, quite reliably for a few of them (and then suddenly it works again
on a switch to switch basis).

The problem lies in clogin which fires off commands prematurely. Here
follows some clogin -d output with some annotations to make it clearer
to me what happens.

clogin has logged in and sent the clipaging commands without problem.
The first commands have been sent also no problem. In this instance, at
the fifth prompt everything goes south. It appears that it's always on
the fifth prompt that stuff breaks (*mumble* at least with this switch).

expect: does "fs1.skatt.5 # show diag\r\n\r" (spawn_id exp6) match
regular expression "\u0008+"? (No Gate, R\
E only) gate=yes re=no
"^[^\n\r *]*.? ?fs1.skatt.[0-9]+ #"? Gate "*fs1?skatt* #"? gate=yes re=yes

******* The prompt remains in buffer, a prompt match is found at once
and the next command is send prematurely. Only how is the match buffer
advanced the right way:

expect: set expect_out(0,string) "fs1.skatt.5 #"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "fs1.skatt.5 #"
fs1.skatt.5 #

***** send: sending "show switch\r" to { exp6 }

Gate keeper glob pattern for '^H+' is ''. Not usable, disabling the
performance booster.
Gate keeper glob pattern for '^[^
*]*.? ?fs1.skatt.[0-9]+ #' is '*fs1?skatt* #'. Activating booster.
Gate keeper glob pattern for '^[^
]*.? ?fs1.skatt.[0-9]+ #.' is '*fs1?skatt* #?'. Activating booster.
Gate keeper glob pattern for '^--More--[
]+' is '--More--*'. Activating booster.
Gate keeper glob pattern for '[^
]*[
]+' is ''. Not usable, disabling the performance booster.
Gate keeper glob pattern for '[^
]*Press <SPACE> to cont[^
]*' is '*Press <SPACE> to cont*'. Activating booster.
Gate keeper glob pattern for '^ *--More--[^
]*' is '*--More--*'. Activating booster.
Gate keeper glob pattern for '^<-+ More -+>[^
]*' is ''. Not usable, disabling the performance booster.

******* Here we're out of phase. We start seeing the output of the "show
diag" command sent before "show switch"

expect: does " show diag\r\n\r" (spawn_id exp6) match regular expression
"\u0008+"? (No Gate, RE only) gate=\
yes re=no

Loading...