Mailing List Archive

jerancid for ERX's with "service manual-commit"?
Hi there,
Does anyone have experience with using jerancid (under rancid v2.3.1) on
Juniper ERX devices with the "service manual-commit" feature? Use of
this feature on JunOSe 5-1-1 effectively makes the command "show
configuration" non-functional, instead replacing it with "show
running-configuration".

I altered bin/jerancid to issue "show running-configuration exclude
interface atm" instead of "show configuration". I also tried it without
the "exclude interface atm" piece and with a 1200 second timeout (there
are *a lot* of pre-provisioned atm sub-interfaces in our configs).

clogin to the devices works just fine, even with the command set that
jerancid is attempting to run, a la:

*****************
clogin -t 90 -c "show version;show redundancy;show boot;show environment
all;dir;show hardware;show run e i a" somesite-erx1
somesite-erx1
spawn telnet somesite-erx1

[blah blah output blah]

somesite-erx1>exit
Logging out.
Connection closed by foreign host.
*****************

but jerancid's debug output always indicates the following:

*****************
jerancid -d somesite-erx1
executing clogin -t 90 -c"show version;show redundancy;show boot;show
environment all;dir;show hardware;show run e i a" somesite-erx1
PROMPT MATCH: somesite-erx1#
HIT COMMAND:somesite-erx1#show version
In ShowVersion: somesite-erx1#show version
HIT COMMAND:somesite-erx1#show redundancy
In ShowRedundancy: somesite-erx1#show redundancy
HIT COMMAND:somesite-erx1#show boot
In ShowBoot: somesite-erx1#show boot
HIT COMMAND:somesite-erx1#show environment all
In ShowEnv: somesite-erx1#show environment all
HIT COMMAND:somesite-erx1#dir
In DirSlotN: somesite-erx1#dir
somesite-erx1: missed cmd(s): show run e i a,show hardware
somesite-erx1: missed cmd(s): show run e i a,show hardware
somesite-erx1: End of run not found
somesite-erx1: End of run not found
!
*****************

I've googled and searched the mailing list archives, but haven't found a
whole lot related to the ERX support in rancid. I'm a fair newbie to
both Tcl/Tk (brand new) and Perl (not quite so new), so I'm hoping that
someone might be able to point me in the right direction.

Thanks in Advance,
Todd Williamson
jerancid for ERX's with "service manual-commit"? [ In reply to ]
On Fri, Sep 03, 2004 at 12:04:50PM -0700, Williamson, Todd wrote:
> I altered bin/jerancid to issue "show running-configuration exclude
> interface atm" instead of "show configuration". I also tried it without
> the "exclude interface atm" piece and with a 1200 second timeout (there
> are *a lot* of pre-provisioned atm sub-interfaces in our configs).
>
> but jerancid's debug output always indicates the following:
>
> *****************
> jerancid -d somesite-erx1
> executing clogin -t 90 -c"show version;show redundancy;show boot;show
> environment all;dir;show hardware;show run e i a" somesite-erx1
> PROMPT MATCH: somesite-erx1#
> HIT COMMAND:somesite-erx1#show version
> In ShowVersion: somesite-erx1#show version
> HIT COMMAND:somesite-erx1#show redundancy
> In ShowRedundancy: somesite-erx1#show redundancy
> HIT COMMAND:somesite-erx1#show boot
> In ShowBoot: somesite-erx1#show boot
> HIT COMMAND:somesite-erx1#show environment all
> In ShowEnv: somesite-erx1#show environment all
> HIT COMMAND:somesite-erx1#dir
> In DirSlotN: somesite-erx1#dir
> somesite-erx1: missed cmd(s): show run e i a,show hardware
> somesite-erx1: missed cmd(s): show run e i a,show hardware

Try replacing the 'show run e i a' with the full command - 'show
running-configuration exclude interface atm' and see what happens.

Also try running this
NOPIPE=YES jerancid -d somesite-erx1

This will leave a somesite-erx1.raw file with the actual command
output so you can see the exact stuff that the perl code in jerancid
is trying to match against.
--asp
jerancid for ERX's with "service manual-commit"? [ In reply to ]
Andrew Partan wrote:

> On Fri, Sep 03, 2004 at 12:04:50PM -0700, Williamson, Todd wrote:
>
>>I altered bin/jerancid to issue "show running-configuration exclude
>>interface atm" instead of "show configuration". I also tried it without
>>the "exclude interface atm" piece and with a 1200 second timeout (there
>>are *a lot* of pre-provisioned atm sub-interfaces in our configs).
>>
>>but jerancid's debug output always indicates the following:

Think this is related to the same problem I'm seeing which is jerancid
b0rking when coming across things not 'in sync'

I commented out the following lines in jerancid and everything works fine:-
# fail if the RP is amid the auto-sync process
# return(-1) if (/auto-sync enabled/ && !/in sync/);
# fail if the RP is amid the auto-sync process
# return(-1) if (/active\/standby/ && !/not sync/);

I haven't supplied a patch as yet as I saw this as a kludge until I
could find out from Juniper what its all about ;)

HTH

--

Mark Cooper
http://pvrhw.goldfish.org/ - Open Source PVR Hardware Database
jerancid for ERX's with "service manual-commit"? [ In reply to ]
> -----Original Message-----
> From: Mark Cooper
> Subject: Re: jerancid for ERX's with "service manual-commit"?
>
> Think this is related to the same problem I'm seeing which is
> jerancid
> b0rking when coming across things not 'in sync'
>
> I commented out the following lines in jerancid and
> everything works fine:-
> # fail if the RP is amid the auto-sync process
> # return(-1) if (/auto-sync enabled/ && !/in sync/);
> # fail if the RP is amid the auto-sync process
> # return(-1) if (/active\/standby/ && !/not sync/);
>
> I haven't supplied a patch as yet as I saw this as a kludge until I
> could find out from Juniper what its all about ;)

that's just about what i changed to get it working. i altered the sync
test case and changed the configuration command a bit for use with
"service manual-commit" ("show config" doesn't work in this case); the
"exclude interface atm" piece is there to keep the clogin sessions from
timing out and cull the cruft from the config (lots of pre-prov'ed ATM
subinterfaces):

prodeng01:rancid$ diff jerancid.old jerancid
266c266
< return(-1) if (/active\/standby/ && !/not sync/);
---
> return(-1) if (/active\/standby/ && /not sync/);
545c545
< 'show configuration' => "WriteTerm"
---
> 'show running-configuration exclude interface atm' =>
"WriteTerm"
556c556
< "show configuration"
---
> "show running-configuration exclude interface atm"


everything has been working fine since removing the negation of the
negative ;)

i'd love to help out (rancid makes my life so much easier :) if there's
any assistance i can offer with respect to e-series testing, please
contact me off-list.

thanks,
todd

>
> HTH
>
> --
>
> Mark Cooper
> http://pvrhw.goldfish.org/ - Open Source PVR Hardware Database
>

todd