Commit 9be4cadc authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add virtnode_count to experiments table, set by the preparse, so we

can tell ahead of time of experiment has virtnodes.
parent 13da0090
......@@ -1011,6 +1011,7 @@ CREATE TABLE `experiment_templates` (
`path` tinytext,
`maximum_nodes` int(6) unsigned default NULL,
`minimum_nodes` int(6) unsigned default NULL,
`virtual_nodes` int(6) unsigned default NULL,
`logfile` tinytext,
`logfile_open` tinyint(4) NOT NULL default '0',
`prerender_pid` int(11) default '0',
......
#
# Add slot to the experiments table.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("experiments", "virtnode_count")) {
DBQueryFatal("alter table experiments add ".
"virtnode_count int(6) unsigned default NULL");
}
return 0;
}
1;
......@@ -5430,8 +5430,9 @@ sub CreateTopFile()
$minimum_nodes = POSIX::ceil($minimum_nodes);
if (! ($impotent || $regression)) {
DBQueryFatal("UPDATE experiments set maximum_nodes=$maximum_nodes, " .
" minimum_nodes=$minimum_nodes ".
DBQueryFatal("UPDATE experiments set maximum_nodes=$maximum_nodes, ".
" minimum_nodes=$minimum_nodes, ".
" virtnode_count=$virtnode_count ".
"where pid='$pid' and eid='$eid'");
}
......
......@@ -457,8 +457,9 @@ sub RunAssign($$)
if (! ($impotent || $regression)) {
if ($experiment->Update({"maximum_nodes" => $vtop->maximum_nodes(),
"minimum_nodes" => $vtop->minimum_nodes() })){
tberror("Could not update min/max nodes for $experiment\n");
"minimum_nodes" => $vtop->minimum_nodes(),
"virtnode_count"=> $vtop->virtnodecount() })){
tberror("Could not update min/max/virt nodes for $experiment\n");
return -1;
}
}
......
......@@ -120,7 +120,8 @@ $vtop->CreateVtop() == 0
if ($preassign) {
if ($experiment->Update({"maximum_nodes" => $vtop->maximum_nodes(),
"minimum_nodes" => $vtop->minimum_nodes() })){
"minimum_nodes" => $vtop->minimum_nodes(),
"virtnode_count"=> $vtop->virtnodecount() })) {
fatal("Could not update min/max nodes for $experiment");
return -1;
}
......
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