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($$)
$ENV{'EMULAB_REAL_USER'} = $creator->emulab_user()->uid_idx();
}
done:
if ($WITHZFS && $ZFS_NOEXPORT) {
#
# Have to force the new directories to be exported.
# See ZFS code in exports_setup
#
$project->BumpActivity();
system($EXPORTSSETUP) == 0 or
fatal("$EXPORTSSETUP failed");
if ($WITHZFS) {
if ($ZFS_NOEXPORT) {
#
# Have to force the new directories to be exported.
# See ZFS code in exports_setup
#
$project->BumpActivity();
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;
}
......
......@@ -59,6 +59,7 @@ my $TBBASE = "@TBBASE@";
my $TBWWW = "@TBWWW@";
my $WITHZFS = @WITHZFS@;
my $ZFS_NOEXPORT= @ZFS_NOEXPORT@;
my $WITHAMD = @WITHAMD@;
my $SSH = "$TB/bin/sshtb";
my $ADDMMLIST = "$TB/sbin/addmmlist";
my $OPSDBCONTROL= "$TB/sbin/opsdb_control";
......@@ -225,6 +226,16 @@ if ($WITHZFS) {
$project->BumpActivity();
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");
}
#
......
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