Commit c8f06bef authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 4e2aa2bf 39cd5ee4
......@@ -31,6 +31,7 @@ my $ELABINELAB = @ELABINELAB@;
my $WINSUPPORT = @WINSUPPORT@;
my $QUOTA_FSLIST= '@FS_WITH_QUOTAS@';
my $SCRATCHDIR = '@FSDIR_SCRATCH@';
my $NOSHAREDFS = @NOSHAREDFS@;
#
# Fixed paths for clients
......@@ -381,14 +382,17 @@ Phase "exports", "Setting up exports", sub {
# /share is special. We want to export to boss/ops read-write,
# but to the control network read-only.
#
my ($a,$b,$c,$d) = ($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
my $realdir = `realpath $SHAREROOT`;
chomp($realdir);
push(@exports_lines,
"$realdir\t$BOSSNODE $USERNODE -maproot=root");
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} -mask $CONTROL_NETMASK ".
"-maproot=root -ro -alldirs");
if (!$NOSHAREDFS) {
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} ".
"-mask $CONTROL_NETMASK -maproot=root -ro -alldirs");
}
#
# Put them in exports.head, and copy that to /etc/exports
......
......@@ -45,6 +45,7 @@ my $QUOTA_FSLIST= '@FS_WITH_QUOTAS@';
my $ETCDIR = "$PREFIX/etc";
my $LIBDIR = "$PREFIX/lib";
my $SCRATCHDIR = '@FSDIR_SCRATCH@';
my $NOSHAREDFS = @NOSHAREDFS@;
my $OUTER_BOSS = '@OUTERBOSS_NODENAME@';
if ($OUTER_BOSS eq '')
{ $OUTER_BOSS = "www.emulab.net"; }
......@@ -770,15 +771,17 @@ Phase "exports", "Setting up exports", sub {
# /share is special. We want to export to boss read-write,
# but to the control network read-only.
#
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
my $realdir = `realpath $SHAREROOT`;
chomp($realdir);
push(@exports_lines,
"$realdir\t$BOSSNODE -maproot=root");
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} -mask $CONTROL_NETMASK ".
"-maproot=root -ro -alldirs");
if (!$NOSHAREDFS) {
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} ".
"-mask $CONTROL_NETMASK -maproot=root -ro -alldirs");
}
}
#
......
......@@ -216,18 +216,39 @@ sub vz_rootPreConfig {
mysystem("vgchange -a y openvz");
}
else {
#
# We need to create a local filesystem.
# First see if the "extra" filesystem has already been created,
# Emulab often mounts it as /local for various purposes.
#
# about the funny quoting: don't ask... emacs perl mode foo.
if (system('grep -q '."'".'^/dev/.*/vz.*$'."'".' /etc/fstab')) {
mysystem("$VZRC stop");
mysystem("rm -rf /vz")
if (-e "/vz");
mysystem("mkdir /vz");
mysystem("$MKEXTRAFS -f /vz");
mysystem("cp -pR /vz.save/* /vz/");
mysystem("touch /vz/.nolvm");
if (!system('grep -q '."'".'^/dev/.*/local.*$'."'".' /etc/fstab')) {
# local filesystem already exists, just create a subdir
if (! -d "/local/vz") {
mysystem("$VZRC stop");
mysystem("mkdir /local/vz");
mysystem("cp -pR /vz.save/* /local/vz/");
mysystem("touch /local/vz/.nolvm");
}
if (-e "/vz") {
mysystem("rm -rf /vz");
mysystem("ln -s /local/vz /vz");
}
}
if (system('mount | grep -q \'on /vz\'')) {
mysystem("mount /vz");
else {
# about the funny quoting: don't ask... emacs perl mode foo.
if (system('grep -q '."'".'^/dev/.*/vz.*$'."'".' /etc/fstab')) {
mysystem("$VZRC stop");
mysystem("rm -rf /vz")
if (-e "/vz");
mysystem("mkdir /vz");
mysystem("$MKEXTRAFS -f /vz");
mysystem("cp -pR /vz.save/* /vz/");
mysystem("touch /vz/.nolvm");
}
if (system('mount | grep -q \'on /vz\'')) {
mysystem("mount /vz");
}
}
}
......
Supports Markdown
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