[1532] in Moira

home help back first fref pref prev next nref lref last post

lies, damn lies, and DCM error messages

daemon@ATHENA.MIT.EDU (Dan Winship)
Thu Apr 20 09:51:54 2000

Date: Thu, 20 Apr 2000 09:51:51 -0400 (EDT)
Message-Id: <200004201351.JAA25606@x15-cruise-basselope.mit.edu>
From: Dan Winship <danw@MIT.EDU>
To: moiradev@mit.edu

People have this tendency to believe the dcm when it tells them that
some random remote server's disk is full, even though the message only
contains 2 bits of entropy.

This patch tries to fix two problems: first, it makes the error
message say what it knows and not make any guesses about it. Second,
it fixes some incorrect uses of the error codes in the .sh scripts.

Admittedly, a side effect of the latter patch is that the "disk full"
guess is more likely to be correct...

Index: lib/mr_et.et
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/lib/mr_et.et,v
retrieving revision 1.22
diff -c -r1.22 mr_et.et
*** mr_et.et	1999/12/30 17:28:50	1.22
--- mr_et.et	2000/04/20 13:41:43
***************
*** 172,178 ****
  	"Failure setting user quota"
  
  ec	MR_HESFILE,
! 	"Failure updating hesiod file (probably disk full)"
  
  ec	MR_MISSINGFILE,
  	"Did not receive file for update"
--- 172,178 ----
  	"Failure setting user quota"
  
  ec	MR_HESFILE,
! 	"Unable to copy hesiod file into nameserver directory"
  
  ec	MR_MISSINGFILE,
  	"Did not receive file for update"
***************
*** 184,190 ****
  	"name daemon failed to start"
  
  ec	MR_TARERR,
! 	"Tar of update file failed (disk full?)"
  
  ec	MR_PROTO,
  	"Failed to put prototype files in new locker"
--- 184,190 ----
  	"name daemon failed to start"
  
  ec	MR_TARERR,
! 	"Unable to extract DCM files"
  
  ec	MR_PROTO,
  	"Failed to put prototype files in new locker"
Index: gen/nfs.sh
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/gen/nfs.sh,v
retrieving revision 1.23
diff -c -r1.23 nfs.sh
*** nfs.sh	1999/09/02 21:39:03	1.23
--- nfs.sh	2000/04/20 13:42:39
***************
*** 8,13 ****
--- 8,14 ----
  set MR_NOCRED = 47836470
  set MR_MKCRED = 47836474
  set MR_TARERR = 47836476
+ set MR_MISSINGFILE = 47836473
  
  set path=(/etc /bin /usr/bin /usr/etc /usr/athena/etc)
  set nonomatch
***************
*** 19,25 ****
  
  # Alert if the tarfile does not exist
  if (! -r $TARFILE) then
!    exit $MR_TARERR
  endif
  
  # Create a fresh source directory
--- 20,26 ----
  
  # Alert if the tarfile does not exist
  if (! -r $TARFILE) then
!    exit $MR_MISSINGFILE
  endif
  
  # Create a fresh source directory
Index: gen/www.sh
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/gen/www.sh,v
retrieving revision 1.1
diff -c -r1.1 www.sh
*** www.sh	2000/01/10 21:56:36	1.1
--- www.sh	2000/04/20 13:43:48
***************
*** 11,16 ****
--- 11,17 ----
  MR_MISSINGFILE=47836473
  MR_NAMED=47836475
  MR_TARERR=47836476
+ MR_MKCRED=47836474
  
  umask 22
  
***************
*** 51,57 ****
  		fi
  		$BIN_DIR/dbmanage $file import $file.db 
  		if [ $? != 0 ]; then
! 			exit $MR_TARERR
  		fi
  		mv $DEST_DIR/$file $SRC_DIR/save/$file
  		mv $DEST_DIR/$file.db $SRC_DIR/save/$file.db
--- 52,58 ----
  		fi
  		$BIN_DIR/dbmanage $file import $file.db 
  		if [ $? != 0 ]; then
! 			exit $MR_MKCRED
  		fi
  		mv $DEST_DIR/$file $SRC_DIR/save/$file
  		mv $DEST_DIR/$file.db $SRC_DIR/save/$file.db

home help back first fref pref prev next nref lref last post