[rancid] Re: Failure with Extreme XOS 12.x

Joachim Jerberg Jensen joaje at dongenergy.dk
Thu Nov 29 08:27:58 UTC 2007


Wednesday, November 28, 2007 10:30 AM  Marc Müller wrote:
>> I have just been struggling with the same setup, and it required a few
>hacks to work.
>sounds like you've been succesfull...
>>
>>> It seems that xrancid tries to log in using a login/enable scheme and
>>> does not get the replies it expects. So no config gets written.
>>
>> Can you post what exactly happens?
>xrancid calls clogin - clogin logs in as an admin user and then tries to
>run an 'enable' cmd. Off course this returns not the expected results
>and the rancid script times out...
>
>Log output:
>Trying to get all of the configs.
>couldn't compile regular expression pattern: quantifier operand invalid
>   while executing
>"expect -nobrace -re {* tln-ch-zr([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {}
>-re {[
>^M]+} { exp_continue }"
>    invoked from within
>"expect {
>            -re $reprompt       {}
>            -re "\[\n\r]+"      { exp_continue }
>        }"
>    (procedure "run_commands" line 23)
>    invoked from within
>"run_commands $prompt $command"
>    ("foreach" body line 150)
>    invoked from within
>"foreach router [lrange $argv $i end] {
>    set router [string tolower $router]
>    # attempt at platform switching.
>    set platform ""
>    send_user ..."
>    (file "/home/rancid/bin/clogin" line 712)^M
>x.x.x.x: missed cmd(s): show configuration detail,show slot,show
>configuration,show version,show diag,show memory,show switch

I think this is the problem:

>x.x.x.x: End of run not found

It doesn't detect when the configuration is finished, so the $found_end = 1;
never becomes set.

Try to edit xrancid:

--
        # catch anything that wasnt match above.
        ProcessHistory("COMMENTS","keysort","H0","$_");
        # end of config
       #if (/^# End of configuration file/i) {
 ++     if (/^# Module vrrp configuration./i) {
            printf STDERR "    End WriteTerm: $_" if ($debug);
            $found_end = 1;
            return(0);
--
This will set $found_end=1 when it detects the part where VRRP is configured, which is the last part of the configuration.
It's a nasty hack, but it should work.

--
Joachim Jerberg Jensen

>
>Marc
>
> --
> Joachim Jerberg Jensen
>
>> Any help in fixing this would be appreciated
>>
>> regards,
>> Marc
>




More information about the Rancid-discuss mailing list