[rancid] Re: ERX bugs in Rancid?
Mark Loveley
mloveley at plus.net
Thu Jul 5 08:35:23 UTC 2007
On 17 Jun 2007, at 20:24, john heasley wrote:
> Fri, Jun 15, 2007 at 04:11:13PM +0200, Neil Orley:
>> Hello,
>>
>> I've just commmented in this line 266 in the clogin file, and now
>> it seems
>> to work fine with the ERX1440 :
>
> Could you provide more information? What is the actually output of
> the
> dir command?
For me the problem is in both the commands "show env all" and "dir".
I have been seeing diffs like this for a long time. The differences
for "show env all" are:-
! power: A ok, B ok
- ! *** srp redundancy: mode is file-system-synchronization
auto-sync
+ ! srp redundancy: mode is file-system-synchronization auto-sync
! enabled, switch-on-error enabled
- ! out of sync (file system)
+ ! in sync
! slots: ok
! power: A ok, B ok
! srp redundancy: mode is file-system-synchronization auto-
sync
! enabled, switch-on-error enabled
- ! in sync
+ ! sync in progress
! slots: ok
! power: A ok, B ok
! srp redundancy: mode is high-availability, state active
! auto-sync enabled, switch-on-error enabled
- ! sync in progress
+ ! in sync
! slots: ok
! online: 0 1 7 11 13
And for "dir" are:-
- !Flash: *** Active/standby file systems are not synchronized. ***
- !Flash: Active System Controller:
+ !Flash: active/standby file systems are synchronized
!Flash:
unshared in
!Flash: file size size date
(GMT) use
!Flash: --------------------- --------- ---------
------------------- ---
!Flash: XXXXXXXXXXXXXXXXXXXXX 296984 296984 09/30/2005
03:55:22 !
@@ -107,9 +106,8 @@
!Flash: XXXXXXXXXXXXXXXXXXXXX 154139239 137984153 07/29/2005
03:21:34 !
!Flash: XXXXXXXXXXXXXXXXXXXXX 154263057 138107971 09/30/2005
03:52:32 !
!Flash: XXXXXXXXXXXXXXXXXXXXX 91388 91388 09/30/2005
03:55:50
!Flash: Capacity = 1025482752, Bytes Free = 660847516, Reserved =
68157440
- !Flash: Standby System Controller file system is currently
unavailable.
- !Flash: *** Active/standby file systems are being synchronized. ***
+ !Flash: Active/standby file systems are synchronized.
!Flash: unshared
!Flash: file size size
date (GMT)
!Flash: ---------------------------- --------- ---------
-------------------
- !Flash: Active/standby file systems are synchronized.
- !Flash:
unshared in
- !Flash: file size size date
(GMT) use
- !Flash: ------------------------ --------- ---------
------------------- ---
- !Flash: disk0:reboot.hty 10624 10624
02/16/2007 04:36:36
- !Flash: disk0:system.log 171 171
02/16/2007 04:26:18
- !Flash: disk0:XXXXXXXXXX.rel 123538358 122344440
01/26/2007 12:45:58
- !Flash: disk0:XXXXXXXXXX.rel 117722882 116528964
02/16/2007 04:02:28 !
- !Flash: standby-disk0:reboot.hty 14144 14144
02/16/2007 04:33:00
- !Flash: standby-disk0:system.log 882 882
01/29/2007 08:18:20
- !Flash: Disk capacity
- !Flash: -------------
- !Flash: Capacity Free Reserved
- !Flash: Device (bytes) (bytes) (bytes)
- !Flash: -------------- ---------- --------- --------
- !Flash: disk0: 1047674880 756345387 68157440
- !Flash: standby-disk0: 1047674880 756218546 68157440
+ !Flash: *** Active/standby file systems are being synchronized. ***
+ !Flash:
unshared in
+ !Flash: file size size date
(GMT) use
+ !Flash: -------------------- --------- ---------
------------------- ---
+ !Flash: disk0:reboot.hty 10624 10624 02/16/2007
04:36:36
+ !Flash: disk0:system.log 171 171 02/16/2007
04:26:18
+ !Flash: disk0:XXXXXXXXXX.rel 123538358 122344440 01/26/2007
12:45:58
+ !Flash: disk0:XXXXXXXXXX.rel 117722882 116528964 02/16/2007
04:02:28 !
+ !Flash: Disk capacity
+ !Flash: -------------
+ !Flash: Capacity Free Reserved
+ !Flash: Device (bytes) (bytes) (bytes)
+ !Flash: ------ ---------- --------- --------
+ !Flash: disk0: 1047674880 756345387 68157440
I have stopped the uninteresting diffs by making chahges to jerancid
as below.
In sub DirSlotN making the following string compare case insensitive
obviously helps. As at some point Juniper changed the case in the
active/standby text.
return(-1) if (/active\/standby/i && /not sync/);
In sub ShowEnv these changes have worked for me, it may not be the
best way of doing this.
sub ShowEnv {
print STDERR " In ShowEnv: $_" if ($debug);
my $autoSyncEna = 0; # assume auto-sync is disabled
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
next if (/^Please wait/i);
return(-1) if (/command authorization failed/i);
# is autoSync enabled?
$autoSyncEna =1 if (/enabled, switch-on-error
enabled/); # fileSync mode (text has wrapped)
$autoSyncEna =1 if (/auto-sync
enabled/); # HA mode
# fail if the RP is amid the auto-sync process
return(-1) if (($autoSyncEna == 1) && (/out of sync \(file
system\)/)); # fileSync mode
return(-1) if (($autoSyncEna == 1) && (/sync in
progress/)); # HA mode
# return(-1) if (/auto-sync enabled/ && !/in sync/);
The last line in the above output is commented as it is not valid on
my ERX's as "in sync" and "auto-sync enabled" appear on multiple
lines or split across multiple lines (you can see that in the above
diff's).
These changes appear to have stopped the uninteresting diffs for me.
HTH
Mark
--
| Mark Loveley Broadband Solutions for
| Network Engineer home and business
| PlusNet PLC @www.plus.net
| Registered Office: Internet House, 2 Tenter Street, Sheffield, S1 4BY
| Registered in England no: 3279013
+ ------------ PlusNet - The smarter way to broadband ----------------+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20070705/3cce7008/attachment.html
More information about the Rancid-discuss
mailing list