Commit 62b6036e authored by Mike Hibler's avatar Mike Hibler

Disentangle ZFS_NOEXPORTS option for incremental mountd updates.

The latter is a Utah-only hack while the former might be useful to
other sites. Based on a patch from Wisconsin.
parent aafcef82
......@@ -660,6 +660,7 @@ BS_IQN_PREFIX
AMD_ROOT
WITHAMD
ZFS_NOEXPORT
INCREMENTAL_MOUNTD
ZFS_QUOTA_GROUP
ZFS_QUOTA_PROJECT
ZFS_QUOTA_USER
......@@ -5137,6 +5138,7 @@ ZFS_QUOTA_USER="1G"
ZFS_QUOTA_PROJECT="100G"
ZFS_QUOTA_GROUP="10G"
ZFS_NOEXPORT=0
INCREMENTAL_MOUNTD=0
WITHAMD=0
AMD_ROOT=/.amd_mnt
BS_IQN_PREFIX=iqn.2000-10.net.emulab
......
......@@ -305,6 +305,7 @@ AC_SUBST(ZFS_QUOTA_USER)
AC_SUBST(ZFS_QUOTA_PROJECT)
AC_SUBST(ZFS_QUOTA_GROUP)
AC_SUBST(ZFS_NOEXPORT)
AC_SUBST(INCREMENTAL_MOUNTD)
AC_SUBST(WITHAMD)
AC_SUBST(AMD_ROOT)
AC_SUBST(BS_IQN_PREFIX)
......@@ -463,6 +464,7 @@ ZFS_QUOTA_USER="1G"
ZFS_QUOTA_PROJECT="100G"
ZFS_QUOTA_GROUP="10G"
ZFS_NOEXPORT=0
INCREMENTAL_MOUNTD=0
WITHAMD=0
AMD_ROOT=/.amd_mnt
BS_IQN_PREFIX=iqn.2000-10.net.emulab
......
......@@ -173,7 +173,7 @@ BROWSER_CONSOLE_ENABLE=1
IMAGEPROVENANCE=1
IMAGEDELTAS=1
# ZFS.
# Per-user/project ZFS.
WITHZFS=1
ZFS_ROOT=z
ZFS_QUOTA_USER="1G"
......@@ -182,5 +182,8 @@ ZFS_QUOTA_GROUP="5G"
ZFS_NOEXPORT=1
WITHAMD=0
# Utah-only hacked mountd
INCREMENTAL_MOUNTD=1
# Blockstores
BS_IQN_PREFIX=iqn.2000-10.net.emulab
......@@ -74,6 +74,7 @@ my $LINUX_FSNODE= @LINUX_FSNODE@;
my $NFSMAPTOUSER= "@NFSMAPTOUSER@";
my $WITHZFS = @WITHZFS@;
my $ZFS_NOEXPORT= @ZFS_NOEXPORT@;
my $INC_MOUNTD = @INCREMENTAL_MOUNTD@;
# XXX for TESTMODE: output to stdout
my $TOSTDOUT = 0;
......@@ -169,7 +170,11 @@ if (defined($options{"w"})) {
$waittildone = 1;
}
if (defined($options{"i"})) {
$incremental = 1;
if ($INC_MOUNTD) {
$incremental = 1;
} else {
print "WARNING: incremental updates not supported, ignoring option\n";
}
}
usage()
if (@ARGV);
......@@ -177,8 +182,10 @@ usage()
if ($ZFS_NOEXPORT && !$waittildone) {
print "WARNING: forcing wait mode\n";
$waittildone = 1;
print "WARNING: forcing incremental updates\n";
$incremental = 1;
if ($INC_MOUNTD) {
print "WARNING: forcing incremental updates\n";
$incremental = 1;
}
}
#
......
......@@ -43,6 +43,7 @@ getopts('Si', \%opts);
#
my $TBOPS = "@TBOPSEMAIL@";
my $LINUX_FSNODE= @LINUX_FSNODE@;
my $INC_MOUNTD = @INCREMENTAL_MOUNTD@;
my $etcdir;
my $exports;
......@@ -84,7 +85,11 @@ else {
# incremental only applies to mountd
if (defined($opts{'i'})) {
$incremental = 1;
if ($INC_MOUNTD) {
$incremental = 1;
} else {
print "WARNING: incremental updates not supported, ignoring option\n";
}
}
}
......
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