[rancid] Re: Has anybody solved the extreme "unsaved changes" bug?
David Young
david at prophecy.net.nz
Sun May 2 19:58:02 UTC 2010
Hi John,
We are using rancid 2.3.3, with expect 5.43
I believe this is the problem:
I run "xrancid -d myswitch.local":
executing clogin -t 90 -c "show version;show memory;show diag;show
switch;show slot;show configuration detail;show configuration"
myswitch.local
couldn't compile regular expression pattern: quantifier operand invalid
while executing
"expect -nobrace -re {* myswitch.local([^#>\r\n]+)?[#>](\([^)\r\n]+\))?}
{} -re {[
]+} { exp_continue }"
invoked from within
"expect {
-re $reprompt {}
-re "\[\n\r]+" { exp_continue }
}"
(procedure "run_commands" line 21)
invoked from within
"run_commands $prompt $command"
("foreach" body line 155)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/usr/bin/clogin" line 722)
I tried to run the two prompt variations within expect itself, not sure
if the second result is what I _should_ be getting, but certainly the
asterisk makes a difference:
expect1.2> expect -nobrace -re {*
myswitch.local([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {} -re "\[\n\r]+" {
exp_continue }
couldn't compile regular expression pattern: quantifier operand invalid
while executing
"expect -nobrace -re {* myswitch.local([^#>\r\n]+)?[#>](\([^)\r\n]+\))?}
{} -re "\[\n\r]+" { exp_continue }"
expect1.3> expect -nobrace -re{
myswitch.local([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {} -re "\[\n\r]+" {
exp_continue }
+>
I have attached the output of clogin -d -c 'show version' myswitch.local
(I have obfuscated the switch name and IP). It seems to die abruptly,
the last line outputted is "expect: set expect_out(buffer) "\tmirroring
multin"
Thanks for the assistance!
David
On 23/04/10 11:49 AM, john heasley wrote:
> Fri, Apr 23, 2010 at 10:21:42AM +1200, David Young:
>> Hi all,
>>
>> I refer to this issue:
>>
>> http://www.shrubbery.net/pipermail/rancid-discuss/2009-January/003614.html
>>
>> It seems that running RANCID against an extreme switch puts it into an
>> "unsaved" state (maybe because of the clipaging?), and so while the
>> first run is successful, any subsequent runs fail because of the
>> asterisk in the prompt...
>>
>> i.e.:
>>
>>>> "expect -nobrace -re {* 300e48-x.([^#>\r\n]+)?[#>](\([^)\r\n]+\))?}
>> {} -re {[
>>>> ^M]+} { exp_continue }"
>
> this should work; it used to. we have one for testing but its not up yet.
> send the o/p of clogin -d -s 'show version' host >log 2>&1. that should
> identify the issue.
>
> i'd first make sure that you're using expect >= 5.43 and rancid 2.3.3.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rancid_log.txt
Url: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20100503/7d82a1e1/attachment.txt
More information about the Rancid-discuss
mailing list