[2029] in Moira

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

Re: Some new lockers creating with quota of 1

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Sep 16 22:34:48 2003

Message-Id: <200309170234.h8H2YjZ5003055@brad-majors.mit.edu>
To: Laura Baldwin <boojum@MIT.EDU>
cc: bug-moira@MIT.EDU, accounts@MIT.EDU
In-Reply-To: Your message of "Tue, 16 Sep 2003 18:11:54 EDT."
             <200309162211.h8GMBsKt024231@brad-majors.mit.edu> 
Date: Tue, 16 Sep 2003 22:34:44 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

So, upon further reflection, we don't currently do the volume releases
for the user.$letter volumes, so I don't think the release failing
should be a fatal error.  This patch to afs_create.pl makes it retry the
release up to three times, and only warn if it fails, rather than
calling fatal().

Garry

Index: afs_create.pl
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/incremental/afs/afs_create.pl,v
retrieving revision 1.2
diff -u -r1.2 afs_create.pl
--- afs_create.pl	22 Aug 2001 02:51:21 -0000	1.2
+++ afs_create.pl	17 Sep 2003 02:05:11 -0000
@@ -67,8 +67,12 @@
 &fatal("Can't get information about $p") if ($?);
 @tmp = (split(/ /,$_));
 if ($tmp[$#tmp] !~ /user\../) {
-    system("$vos release $tmp[$#tmp] -cell $cell >/dev/null") &&
-	&fatal("Can't release $tmp[$#tmp] in cell $cell");
+    $tries = 0; $code = 1;
+    while ($tries<3 && $code) {
+	$code = system("$vos release $tmp[$#tmp] -cell $cell >/dev/null");
+	$tries++;
+    }
+    warn "Couldn't release $tmp[$#tmp] in cell $cell" if ($code) # Don't treat as fatal.
 }
 
 # Update the quota records.

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