Commit eb939e55 authored by Leigh Stoller's avatar Leigh Stoller

Shifting from nonfsmounts boolean in the nodes/experiments table,

to new nfsmounts slot, which is an enum. For the moment we keep them
in sync but still check nonfsmounts.
parent 78bb5f9d
......@@ -3150,7 +3150,8 @@ sub NoNFSMounts($)
my $idx = $self->idx();
return -1
if (!DBQueryWarn("update experiments set nonfsmounts=1 ".
if (!DBQueryWarn("update experiments set ".
" nonfsmounts=1,nfsmounts='none' ".
"where idx='$idx'"));
return 0;
}
......
......@@ -1813,7 +1813,7 @@ sub ClearBootAttributes($)
"sfshostid=NULL,allocstate='$allocFreeState',boot_errno=0, ".
"destination_x=NULL,destination_y=NULL, ".
"destination_orientation=NULL,reserved_memory=0,".
"nonfsmounts=0 ".
"nonfsmounts=0,nfsmounts=NULL ".
"where node_id='$node_id'")
or return -1;
......@@ -3468,7 +3468,8 @@ sub NoNFSMounts($)
my $node_id = $self->node_id();
DBQueryWarn("update nodes set nonfsmounts='1' where node_id='$node_id'")
DBQueryWarn("update nodes set nonfsmounts='1',nfsmounts='none' ".
"where node_id='$node_id'")
or return -1;
return 0;
......
......@@ -139,7 +139,8 @@ my $debug = 0;
"security_level" => 1,
"delay_capacity" => 1,
"dpdb" => 1,
"nonfsmounts" => 1);
"nonfsmounts" => 1,
"nfsmounts" => 1);
#
# Grab the virtual topo for an experiment.
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -251,7 +251,8 @@ if ($WINSUPPORT) {
$nodes_result =
DBQueryFatal("select r.node_id,r.pid,r.eid,e.gid,".
" e.nonfsmounts as enonfs,n.nonfsmounts as nnonfs,".
" i.IP,u.admin,r.sharing_mode,r.erole,nt.isvirtnode ".
" i.IP,u.admin,r.sharing_mode,r.erole,nt.isvirtnode, ".
" e.nfsmounts as e_nfsmounts,n.nfsmounts as n_nfsmounts".
"from reserved as r ".
"left join experiments as e on r.pid=e.pid and r.eid=e.eid ".
"left join nodes as n on r.node_id=n.node_id ".
......@@ -360,6 +361,8 @@ while ($row = $nodes_result->fetchrow_hashref) {
my $erole = $row->{'erole'};
my $enonfs = $row->{'enonfs'};
my $nnonfs = $row->{'nnonfs'};
my $enfs = $row->{'e_nfsmounts'};
my $nnfs = $row->{'n_nfsmounts'};
my %fslist = ();
my @dirlist = ();
my @smbshares = ();
......@@ -375,7 +378,7 @@ while ($row = $nodes_result->fetchrow_hashref) {
# Skip nodes that belong to a "no nfs" experiment or are marked "no nfs".
next
if ($enonfs || $nnonfs);
if ($enonfs || $nnonfs || $enfs == "none" || $nnfs == "none");
# Skip non-shared virtnode nodes; NFS mounts are handled differently.
next
......
......@@ -818,8 +818,12 @@ Simulator instproc run {} {
lappend values $security_level
}
lappend fields "nonfsmounts"
lappend values $nonfs
if {$nonfs} {
lappend fields "nonfsmounts"
lappend values $nonfs
lappend fields "nfsmounts"
lappend values "none"
}
if {$dpdb} {
lappend fields "dpdb"
......
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