[rancid] Jerancid fails on E320 or 7.3 JunOSe code

Mark Loveley mloveley at plus.net
Mon Jan 8 11:32:40 UTC 2007


Hi

jerancid fails when running against an Juniper E320 or 7.3 JunOSe code.
The first issue seems to be due to the ShowEnv subroutine at the line
     return(-1) if (/auto-sync enabled/ && !/in sync/);

On a ERX-1440 running 6.1 code the relevant output of "show env all"  
is:-
---start output---
     srp redundancy: mode is file-system-synchronization        auto- 
sync
enabled, switch-on-error enabled
in sync
slots: ok
---end output --

So that line never matches due to the auto-sync and enabled lines  
being on different lines, and so rancid continues fine.

On a E320 running 7.3 code the relevant output of "show env all" is:-
---start output---
     srp redundancy: mode is high-availability, state active
         auto-sync enabled, switch-on-error enabled
         in sync
     slots: ok
---end output --

And so the auto-sync enabled matches but in sync is on a different  
line so it fails.
Any ideas on a quick and easy fix for that? for now I have commented  
the check in ShowEnv

The 2nd issue seems to be that juniper have changed the output for  
the dir command so that
the active/standby text now has a capital A in active.
---start output---

#dir

Active/standby file systems are synchronized.
---end output --

Changing the /active\/standby/ regex to be case insensitive fixes  
this, ie
     return(-1) if (/active\/standby/i && /not sync/);

Thanks
-- 
| Mark Loveley                Broadband Solutions for
| Network Engineer                  Home & Business @
| PlusNet plc.                           www.plus.net
+ ----- PlusNet - The smarter way to broadband ------





More information about the Rancid-discuss mailing list