Commit 321eac3d authored by Mike Hibler's avatar Mike Hibler

Use "exports_setup -B" to handle WITHZFS && !WITHAMD case.

There are still a couple of other places this needs to be done.
parent ab817284
...@@ -532,14 +532,26 @@ sub GetHoldingProject($$) ...@@ -532,14 +532,26 @@ sub GetHoldingProject($$)
$ENV{'EMULAB_REAL_USER'} = $creator->emulab_user()->uid_idx(); $ENV{'EMULAB_REAL_USER'} = $creator->emulab_user()->uid_idx();
} }
done: done:
if ($WITHZFS && $ZFS_NOEXPORT) { if ($WITHZFS) {
# if ($ZFS_NOEXPORT) {
# Have to force the new directories to be exported. #
# See ZFS code in exports_setup # Have to force the new directories to be exported.
# # See ZFS code in exports_setup
$project->BumpActivity(); #
system($EXPORTSSETUP) == 0 or $project->BumpActivity();
fatal("$EXPORTSSETUP failed"); system($EXPORTSSETUP) == 0 or
fatal("$EXPORTSSETUP failed");
} elsif (!$WITHAMD) {
#
# If we are using autofs, we need to recreate the local autofs
# mapfile so it includes the newly created directories. Otherwise,
# accesses to those new directories will not force a mount and
# the waitForMount() calls below will always fail.
#
$project->BumpActivity();
system("$EXPORTSSETUP -B") == 0 or
fatal("$EXPORTSSETUP -B failed");
}
} }
return $group; return $group;
} }
......
...@@ -59,6 +59,7 @@ my $TBBASE = "@TBBASE@"; ...@@ -59,6 +59,7 @@ my $TBBASE = "@TBBASE@";
my $TBWWW = "@TBWWW@"; my $TBWWW = "@TBWWW@";
my $WITHZFS = @WITHZFS@; my $WITHZFS = @WITHZFS@;
my $ZFS_NOEXPORT= @ZFS_NOEXPORT@; my $ZFS_NOEXPORT= @ZFS_NOEXPORT@;
my $WITHAMD = @WITHAMD@;
my $SSH = "$TB/bin/sshtb"; my $SSH = "$TB/bin/sshtb";
my $ADDMMLIST = "$TB/sbin/addmmlist"; my $ADDMMLIST = "$TB/sbin/addmmlist";
my $OPSDBCONTROL= "$TB/sbin/opsdb_control"; my $OPSDBCONTROL= "$TB/sbin/opsdb_control";
...@@ -225,6 +226,16 @@ if ($WITHZFS) { ...@@ -225,6 +226,16 @@ if ($WITHZFS) {
$project->BumpActivity(); $project->BumpActivity();
system($EXPORTSSETUP) == 0 or system($EXPORTSSETUP) == 0 or
fatal("$EXPORTSSETUP failed"); fatal("$EXPORTSSETUP failed");
} elsif (!$WITHAMD) {
#
# If we are using autofs, we need to recreate the local autofs
# mapfile so it includes the newly created directories. Otherwise,
# accesses to those new directories will not force a mount and
# the waitForMount() calls below will always fail.
#
$project->BumpActivity();
system("$EXPORTSSETUP -B") == 0 or
fatal("$EXPORTSSETUP -B failed");
} }
# #
......
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