Commit a6866b8d authored by Leigh B Stoller's avatar Leigh B Stoller

Bug Fix: Add waitForMount of the group directory too, since it appears to

not always be immediately available. Mike says there is a race in mountd.
Surprise!
parent 8a29082b
...@@ -228,12 +228,15 @@ if ($WITHZFS) { ...@@ -228,12 +228,15 @@ if ($WITHZFS) {
} }
# #
# There is some lag before the automounter can mount the new # There is some lag before the automounter can mount the new volumes.
# volume. Lets delay until we can access the project directory. # Lets delay until we can access the project/group directories.
# #
if (emutil::waitForMount($projdir) < 0) { if (emutil::waitForMount($projdir) < 0) {
fatal("Could not access new project directory: $projdir"); fatal("Could not access new project directory: $projdir");
} }
if (emutil::waitForMount("$GRPROOT/$pid") < 0) {
fatal("Could not access new group directory: $GRPROOT/$pid");
}
} }
if (!$isnonlocal) { if (!$isnonlocal) {
......
...@@ -345,6 +345,9 @@ if (! -e "$PROJROOT/$pid") { ...@@ -345,6 +345,9 @@ if (! -e "$PROJROOT/$pid") {
fatal("Could not access directory $PROJROOT/$pid"); fatal("Could not access directory $PROJROOT/$pid");
} }
} }
else {
fatal("Could not access directory $PROJROOT/$pid");
}
} }
foreach my $dir (@DIRLIST) { foreach my $dir (@DIRLIST) {
if (! -e "$PROJROOT/$pid/$dir") { if (! -e "$PROJROOT/$pid/$dir") {
...@@ -353,7 +356,15 @@ foreach my $dir (@DIRLIST) { ...@@ -353,7 +356,15 @@ foreach my $dir (@DIRLIST) {
} }
if (! -e "$GRPROOT/$pid") { if (! -e "$GRPROOT/$pid") {
fatal("Could not access directory $GRPROOT/$pid"); if ($WITHZFS) {
# Wait for mountd to finish
if (emutil::waitForMount("$GRPROOT/$pid") < 0) {
fatal("Could not access directory $GRPROOT/$pid");
}
}
else {
fatal("Could not access directory $GRPROOT/$pid");
}
} }
if ($SCRATCHROOT && ! -e "$SCRATCHROOT/$pid") { if ($SCRATCHROOT && ! -e "$SCRATCHROOT/$pid") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment