[8791] in Athena Bugs

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

7.3 rsaix: config_afs

daemon@ATHENA.MIT.EDU (Richard Basch)
Wed Jan 1 09:44:41 1992

Date: Wed, 1 Jan 92 09:44:22 -0500
To: bugs@MIT.EDU
Cc: basch@MIT.EDU
From: "Richard Basch" <basch@MIT.EDU>


Sometimes, the CellServDB file seems to be zeroed... My suspicion is
that "cp" is not always returning the proper exit status.

Here are some patches that should improve the situation.

In addition, the following other changes should probably be made:
o Run "detach -lint -all", rather than zeroing out the attachtab.
o Run "detach -lint" from crontab once or twice per day.
o Have the copying of "aklog" be moved into config_afs out of rc & reactivate
o Run config_afs once/twice per day out of crontab if nobody is logged in
  (yes, this means writing something that checks utmp, etc.)

Rationale:
o If someone attaches an AFS fileset, a symlink is created and it may
  never get removed, and can cause other problems... for instance, on
  several servers I have seen a symlink from /srvd to an AFS system
  pack, but there was nothing in the attachtab.  Because it was a
  symlink into AFS, trying to attach a non-AFS system pack failed.
o Running "detach -lint" periodically will ensure that attachtab is
  not deleted, because it will update its modification time.
o Moving the "aklog" maintainance into config_afs simplifies the other
  scripts.  This one has to be examined a lot more closely as there are
  a couple race conditions that may result.  I doubt it, as long as the
  update of "aklog" is done first in config_afs.
o Running config_afs daily on servers will correct server's notions of
  the locations of AFS servers.  This will avoid polling of primary
  servers that no longer exist (we have heard that we have been flooding
  the transatlantic links with bogus requests).

-Richard


*** /srvd/etc/athena/config_afs	Fri Jul 26 15:49:54 1991
--- /etc/athena//config_afs	Wed Jan  1 08:50:17 1992
***************
*** 8,22 ****
  PATH=/bin:/bin/athena; export PATH
  
  VICEDIR=/usr/vice/etc
  CELLDB=${VICEDIR}/CellServDB
  SUIDFILE=${VICEDIR}/SuidCells
  
  echo "Updating cell location information"
! rm -f ${VICEDIR}/Ctmp
! cp /afs/athena.mit.edu/service/CellServDB ${VICEDIR}/Ctmp && \
! 	mv -f ${VICEDIR}/Ctmp ${CELLDB}.public && \
! 	cat ${CELLDB}.public ${CELLDB}.local >${VICEDIR}/Ctmp 2>/dev/null
! mv -f ${VICEDIR}/Ctmp ${CELLDB}
  
  /bin/awk ' \
  	  /^>/ {printf("\nfs newcell %s", substr($1,2,length($1)-1))}; \
--- 8,24 ----
  PATH=/bin:/bin/athena; export PATH
  
  VICEDIR=/usr/vice/etc
+ CELLTMP=${VICEDIR}/Ctmp
  CELLDB=${VICEDIR}/CellServDB
  SUIDFILE=${VICEDIR}/SuidCells
  
  echo "Updating cell location information"
! rm -f ${CELLTMP}
! cp /afs/athena.mit.edu/service/CellServDB ${CELLTMP} && \
! 	test -s ${CELLTMP} && \
! 	mv -f ${CELLTMP} ${CELLDB}.public && \
! 	cat ${CELLDB}.public ${CELLDB}.local > ${CELLTMP} 2>/dev/null
! mv -f ${CELLTMP} ${CELLDB}
  
  /bin/awk ' \
  	  /^>/ {printf("\nfs newcell %s", substr($1,2,length($1)-1))}; \

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